/* ==========================================
   AG FILMS — CONSERVATION CINEMA
========================================== */

.ag-films,
.ag-films * {
    box-sizing: border-box;
}

.ag-films {
    --ag-background: #e9e6df;
    --ag-heading: #282828;
    --ag-gold: #a88b58;
    --ag-card-border: rgba(255, 255, 255, 0.18);
    --ag-panel: rgba(37, 34, 27, 0.88);

    width: 100%;
    background: var(--ag-background);
    padding: 76px 30px 72px;
}

.ag-container {
    width: 100%;
    max-width: 792px;
    margin: 0 auto;
}

/* Header */

.ag-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 33px;
}

.ag-heading {
    min-width: 0;
}

.ag-subtitle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0 0 7px;

    color: var(--ag-gold);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;
    font-weight: 700;
    line-height: 1;

    letter-spacing: 2.1px;
    text-transform: uppercase;
}

.ag-subtitle::before {
    content: "";

    display: block;

    width: 20px;
    height: 1px;

    background: var(--ag-gold);
}

.ag-header h2 {
    margin: 0;

    color: var(--ag-heading);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(42px, 5vw, 53px);
    font-weight: 700;
    line-height: 0.96;

    letter-spacing: -1.6px;
}

/* View all button */

.ag-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    flex: 0 0 auto;

    min-height: 36px;

    padding: 0 15px;

    border: 1px solid rgba(40, 40, 40, 0.17);
    border-radius: 999px;

    color: #303030;
    background: transparent;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;
    font-weight: 600;

    line-height: 1;
    text-decoration: none;

    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.ag-button span {
    font-size: 11px;
    line-height: 1;
}

.ag-button:hover,
.ag-button:focus-visible {
    color: #ffffff;
    background: #292825;
    border-color: #292825;

    transform: translateY(-1px);
}

/* Film grid */

.ag-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 19px;
}

/* Film card */

.ag-card {
    position: relative;

    min-width: 0;

    overflow: hidden;

    border-radius: 15px;

    background: #20201c;

    box-shadow:
        0 15px 27px
        rgba(44, 40, 31, 0.12);
}

.ag-card-link {
    position: relative;

    display: block;

    width: 100%;
    height: 319px;

    overflow: hidden;

    color: inherit;
    text-decoration: none;
}

.ag-card-image,
.ag-card-placeholder {
    position: absolute;

    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 700ms
        cubic-bezier(.2, .65, .2, 1);
}

.ag-card-placeholder {
    background:
        linear-gradient(
            135deg,
            #384034,
            #161a16
        );
}

/* Subtle image darkening */

.ag-card-shade {
    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.02) 32%,
            rgba(0, 0, 0, 0.08) 53%,
            rgba(0, 0, 0, 0.57) 100%
        );
}

/* Bottom information panel */

.ag-overlay {
    position: absolute;

    right: 11px;
    bottom: 15px;
    left: 11px;

    z-index: 2;

    min-height: 55px;

    padding: 10px 12px 9px;

    border:
        1px solid
        var(--ag-card-border);

    border-radius: 11px;

    background: var(--ag-panel);

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.05);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        background-color 220ms ease,
        transform 220ms ease;
}

.ag-category {
    display: block;

    margin: 0 0 4px;

    color: #b69a68;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 7px;
    font-weight: 700;
    line-height: 1;

    letter-spacing: 1.45px;
    text-transform: uppercase;
}

.ag-overlay h3 {
    margin: 0;

    overflow: hidden;

    color: #eeeeea;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;

    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Hover */

.ag-card:hover .ag-card-image,
.ag-card:focus-within .ag-card-image {
    transform: scale(1.045);
}

.ag-card:hover .ag-overlay,
.ag-card:focus-within .ag-overlay {
    background:
        rgba(37, 34, 27, 0.94);

    transform:
        translateY(-2px);
}

/* Tablet */

@media (max-width: 850px) {

    .ag-films {
        padding:
            65px 24px
            60px;
    }

    .ag-container {
        max-width: 680px;
    }

    .ag-grid {
        gap: 15px;
    }

    .ag-card-link {
        height: 285px;
    }

    .ag-overlay h3 {
        font-size: 16px;
    }
}

/* Mobile */

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 650px) {

    .ag-films {
        padding: 48px 16px 52px;
    }

    .ag-container {
        max-width: 100%;
    }

    /* Header */

    .ag-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;

        gap: 20px;

        margin-bottom: 26px;
    }

    .ag-subtitle {
        margin-bottom: 7px;

        font-size: 7px;
        letter-spacing: 1.8px;
    }

    .ag-subtitle::before {
        width: 17px;
    }

    .ag-header h2 {
        font-size: 43px;
        line-height: 0.98;

        letter-spacing: -1.2px;
    }

    /* Button */

    .ag-button {
        min-height: 36px;

        padding: 0 16px;

        font-size: 8px;
    }

    /* Cards */

    .ag-grid {
        grid-template-columns: 1fr;

        gap: 16px;
    }

    .ag-card {
        width: 100%;

        border-radius: 14px;
    }

    .ag-card-link {
        height: 390px;
    }

    /* Bottom title panel */

    .ag-overlay {
        right: 12px;
        bottom: 12px;
        left: 12px;

        min-height: 58px;

        padding: 11px 13px 10px;

        border-radius: 10px;
    }

    .ag-category {
        margin-bottom: 5px;

        font-size: 7px;
        letter-spacing: 1.35px;
    }

    .ag-overlay h3 {
        font-size: 19px;
        line-height: 1.15;
    }
}


