:root{
    --bg:#f5f1e8;
    --card:#ffffff;
    --accent:#7b1e1e;
    --second-accent: #d4af37; /* золотой */

}

body{
     font-family:'Merriweather', serif;
    background: url("foto/directors/fon.png") no-repeat center center fixed;
    background-size: cover;

}
.inff { width: 85%;
    max-width: 1000px;
    margin: 20px auto;
    text-align: center;
    background: white;
    border-left: 6px solid var(--accent);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);}
    
.inff p {font-size: 18px;}

/* ===== SECTION ===== */

.directors-section{
    width:90%;
    max-width:1400px;
    margin:80px auto;
}

.section-title{
    text-align:center;
    font-size:42px;
    margin-bottom:60px;
}

/* ===== GRID ===== */

.directors-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:20px;
    justify-content:center;
}

/* ===== CARD ===== */

.director-card{
    background:var(--card);
    border-radius:30px;
    width:400px;
    padding:25px;
    text-align:center;
    cursor:pointer;
    transition:0.4s;
    box-shadow:0 10px 30px rgba(0,0,0,0.08);
}

.director-card:hover{
    transform:translateY(-10px) scale(1.02);
}

.director-card img{
    width:220px;
    height:280px;
    object-fit:cover;
    border-radius:25px;
    margin-bottom:20px;
    transition:0.4s;
}

.director-card:hover img{
    transform:scale(1.03);
}

.director-card h3{
    margin:10px 0 5px;
    font-size:24px;
}

.director-card p{
    color:#777;
    font-size:18px;
}

/* ===== INFO BLOCK ===== */

.director-info{
    max-height:0;
    overflow:hidden;
    opacity:0;
    transform:translateY(40px);
    transition:
        max-height 0.8s ease,
        opacity 0.6s ease,
        transform 0.6s ease,
        margin-top 0.6s ease;

    background:white;
    border-radius:35px;
    margin-top:0;
}

.director-info.active{
    max-height:2000px;
    opacity:1;
    transform:translateY(0);
    margin-top:60px;
    padding:50px;
}

.info-content h2{
    font-size:42px;
    margin-bottom:25px;
}

.info-content p{
    font-size:18px;
    line-height:1.8;
    margin-bottom:40px;
}
/* ===== GALLERY ===== */

.gallery{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
    gap:25px;
}

.gallery img{
    width:100%;
    height:240px;
    object-fit:cover;

    border-radius:25px;

    cursor:zoom-in;

    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease;
}

.gallery img:hover{
    transform:scale(1.03);

    box-shadow:0 10px 30px rgba(0,0,0,0.18);
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */

.image-modal{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,0.92);

    display:flex;
    align-items:center;
    justify-content:center;

    padding:40px;

    opacity:0;
    visibility:hidden;

    transition:
        opacity 0.4s ease,
        visibility 0.4s ease;

    z-index:9999;
}

.image-modal.active{
    opacity:1;
    visibility:visible;
}

.modal-img{
    max-width:90%;
    max-height:90%;

    border-radius:20px;

    object-fit:contain;

    transform:scale(0.8);

    transition:transform 0.4s ease;

    box-shadow:0 20px 60px rgba(0,0,0,0.5);
}

.image-modal.active .modal-img{
    transform:scale(1);
}

/* ===== КНОПКА ЗАКРЫТИЯ ===== */

.close-modal{
    position:absolute;

    top:25px;
    right:40px;

    font-size:65px;
    line-height:1;

    color:white;

    cursor:pointer;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.close-modal:hover{
    transform:rotate(90deg) scale(1.1);
    opacity:0.8;
}

/* ===== ADAPTIVE ===== */

@media(max-width:700px){

    .gallery{
        grid-template-columns:1fr;
    }

    .gallery img{
        height:280px;
    }

    .close-modal{
        top:15px;
        right:25px;
        font-size:50px;
    }

    .modal-img{
        max-width:95%;
        max-height:85%;
    }

}




/* ===== ADAPTIVE ===== */

@media(max-width:1100px){

    .directors-grid{
        grid-template-columns:repeat(2,1fr);
    }

}

@media(max-width:700px){

    .directors-grid{
        grid-template-columns:1fr;
    }

    .section-title{
        font-size:32px;
    }

    .director-card img{
        width:100%;
        height:350px;
    }

    .director-info.active{
        padding:30px;
    }

}