/* Opći stilovi */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    text-align: center;
}

/* Header */
header {
    background: #222;
    color: white;
    padding: 20px;
}

/* Navigacija */
.nav-menu {
    list-style: none;
    background-color: #222;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: burlywood;
    font-weight: bold;
    padding: 10px 15px;
    display: block;
    transition: all 0.3s ease;
}

.nav-menu > li > a:hover {
    background-color: #555;
    border-radius: 5px;
}

/* Padajući izbornik */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #333;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 180px;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dropdown-menu a {
    padding: 10px 15px;
    color: white;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: #555;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ========================= */
/* GLAVNI LAYOUT — FLEXBOX   */
/* ========================= */

main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    padding: 20px;
    box-sizing: border-box;
}

/* Lijeva kolona — wrapper */
.main-wrapper {
    flex: 1;
    max-width: 900px;
    display: flex;
    flex-direction: column; /* sve ide jedno ispod drugog */
    gap: 20px;
}

/* Kartice u lijevoj koloni */
.main-wrapper section,
.main-wrapper article {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
}

/* Desna kolona — asideovi */
.sidebars {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebars aside {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
}

/* Video container */
.video-container iframe {
    border-radius: 10px;
}

/* ========================= */
/* TABLICA                   */
/* ========================= */

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
}

td {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.3s ease;
}

caption {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

td:last-child {
    font-weight: bold;
    color: #f39c12;
}

td:first-child,
th:first-child {
    text-align: center;
}

td:nth-child(3),
th:nth-child(3),
td:nth-child(5),
th:nth-child(5) {
    text-align: center;
}

td:nth-child(6) {
    font-variant: small-caps;
}

/* ========================= */
/* SLIKE                     */
/* ========================= */

.film-figure {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 10px;
}

.film-image-container {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    transition: all 0.4s ease-in-out;
    opacity: 0.95;
    border-radius: 10px;
}

.film-image-container:hover {
    opacity: 1;
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Desktop slika */
@media (min-width: 769px) {
    .film-image-container {
        background-image: url('../images/filmska_industrija_desktop.png');
    }
}

/* Mobile slika */
@media (max-width: 768px) {
    .film-image-container {
        background-image: url('../images/filmska_industrija_mobile.png');
    }
}

/* Fokus pristupačnost */
.film-image-container:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ========================= */
/* FOOTER                    */
/* ========================= */

footer {
    margin-top: 30px;
    padding: 10px;
    background: #222;
    color: white;
}

footer a {
    color: burlywood;
    text-decoration: none;
}

/* ========================= */
/* MOBILNA VERZIJA           */
/* ========================= */

@media (max-width: 900px) {

    main {
        flex-direction: column;
        align-items: center;
    }

    .main-wrapper {
        max-width: 100%;
    }

    .sidebars {
        width: 100%;
        max-width: 600px;
        margin-top: 20px;
    }

    .sidebars aside {
        width: 100%;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px 10px;
    }
}
