/* =========================================
   Sgoil Lionacleit - Departments Page
   ========================================= */

/* Hero section */

.departments-hero {
    padding: 70px 0;
    background: linear-gradient(135deg, #7f1021, #b51f37);
    color: #ffffff;
}

.departments-hero .eyebrow {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.85;
}

.departments-hero h1 {
    margin: 0 0 15px;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
}

.departments-hero p {
    max-width: 700px;
    margin: 0 0 30px;
    font-size: 19px;
    line-height: 1.6;
}

/* Document buttons */

.document-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.document-btn {
    display: inline-block;
    padding: 14px 18px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.document-btn:hover,
.document-btn:focus-visible {
    background-color: #ffffff;
    color: #8f1528;
    text-decoration: none;
    transform: translateY(-2px);
}

.document-btn:focus-visible,
.subject-links a:focus-visible {
    outline: 3px solid #ffd166;
    outline-offset: 3px;
}

/* Departments section */

.departments-section {
    padding: 60px 0;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

/* Department cards */

.department-card {
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #dde2e6;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.department-heading {
    min-height: 170px;
    padding: 24px;
    background-color: #f5f7f8;
    border-bottom: 1px solid #e3e6e8;
}

.department-heading h2 {
    margin: 0 0 18px;
    font-size: 23px;
    line-height: 1.3;
    color: #252525;
}

.department-heading p {
    margin: 0;
    color: #60676d;
    font-size: 15px;
    line-height: 1.6;
}

.department-heading strong {
    color: #222222;
}

/* Subject links */

.subject-links {
    display: flex;
    flex-direction: column;
}

.subject-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px 24px;
    border-bottom: 1px solid #eceff1;
    color: #222222;
    text-decoration: none;
    font-size: 16px;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease;
}

.subject-links a:last-child {
    border-bottom: 0;
}

.subject-links a:hover,
.subject-links a:focus-visible {
    padding-left: 29px;
    background-color: #f8f9fa;
    color: #98172b;
}

.subject-links .arrow {
    flex-shrink: 0;
    color: #98172b;
    font-size: 20px;
}

/* Tablet */

@media (max-width: 991px) {
    .departments-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .departments-hero {
        padding: 55px 0;
    }
}

/* Mobile */

@media (max-width: 700px) {
    .departments-hero {
        padding: 45px 0;
    }

    .departments-hero p {
        font-size: 17px;
    }

    .document-links {
        flex-direction: column;
    }

    .document-btn {
        display: block;
        width: 100%;
    }

    .departments-section {
        padding: 35px 0;
    }

    .departments-grid {
        grid-template-columns: 1fr;
    }

    .department-heading {
        min-height: 0;
    }
}
