/* ==========================================================================
   ULTRA-PREMIUM BRANCH COURSE DIRECTORY DESIGN SYSTEM
   ========================================================================== */

/* Hero Grid Layout */
.directory-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
    padding: 40px 0;
}

.directory-hero-grid .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.directory-hero-grid h1 {
    font-size: clamp(32px, 4.5vw, 50px);
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
}

.directory-hero-grid .lead {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.directory-hero-grid .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.directory-hero-grid .actions .btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #ffffff !important;
    border: 0;
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.directory-hero-grid .actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(14, 165, 233, 0.45);
}

.directory-hero-grid .actions .btn.secondary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff !important;
    border: 0;
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.directory-hero-grid .actions .btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.45);
}

/* Side Direction Glass Panel */
.directory-panel {
    background: rgba(15, 30, 60, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 20px;
    padding: 28px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

.directory-panel>span {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #00d2b5;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.directory-panel h2 {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.directory-directions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.directory-directions div {
    background: rgba(9, 23, 46, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 14px;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    transition: all 0.2s ease;
}

.directory-directions div:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.18);
    transform: translateY(-2px);
}

.directory-directions small {
    display: block;
    color: #94a3b8;
    font-size: 11.5px;
    font-weight: 500;
    margin-top: 4px;
}

/* Trust Stats Strip */
.directory-trust {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.directory-trust .wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.directory-trust .wrap>div {
    padding: 24px 20px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.directory-trust .wrap>div:last-child {
    border-right: 0;
}

.directory-trust strong {
    display: block;
    color: #0284c7;
    font-size: 28px;
    font-weight: 800;
    font-family: var(--font-heading, sans-serif);
    line-height: 1.1;
}

.directory-trust span {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

/* Course Finder & Search Section */
.finder {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    margin: 32px 0 40px;
}

.finder label strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.finder input[type="search"] {
    width: 100%;
    height: 52px;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 18px;
    font-size: 14.5px;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.finder input[type="search"]:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.filters button {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 99px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filters button b {
    font-weight: 800;
    opacity: 0.8;
}

.filters button:hover {
    border-color: #0ea5e9;
    color: #0284c7;
    background: #ffffff;
    transform: translateY(-1px);
}

.filters button.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #ffffff !important;
    border-color: #0ea5e9;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.result-count {
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    margin: 12px 0 0;
}

.result-count strong {
    color: #0ea5e9;
    font-weight: 800;
}

/* Course Grid Cards */
/* 4-Column Course Cards Grid (Exact Homepage Reference Match) */
.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.card {
    min-width: 0;
    border: 1px solid #dbe7e4;
    border-radius: 19px;
    background: #ffffff;
    padding: 20px;
    box-shadow: 0 9px 28px rgba(16, 63, 57, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    height: 3px;
    left: 20px;
    right: 20px;
    top: 0;
    background: #0f766e;
    opacity: 0;
    transform: scaleX(0.4);
    transition: all 0.22s ease;
}

.card:hover {
    border-color: #a8cdc8;
    transform: translateY(-3px);
    box-shadow: 0 16px 38px rgba(16, 63, 57, 0.09);
}

.card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.course-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.course-initials-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #ffffff;
    background: #0f766e;
    font-size: 11px;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.13);
    flex-shrink: 0;
}

.course-label {
    color: #405f5a;
    letter-spacing: 0.09em;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.card h3 {
    margin: 14px 0 8px;
    font-size: 20px;
    font-weight: 750;
    color: #0d3833;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

.card > p {
    color: #55706c;
    font-size: 12.5px;
    line-height: 1.58;
    margin: 0;
    min-height: 58px;
    flex-grow: 1;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 16px 0 18px;
}

.skills span {
    border: 1px solid #dbe7e4;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    color: #55706c;
    background: #fafcfb;
    font-weight: 600;
}

.course-links {
    margin: auto -20px -20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #e2ebe9;
}

.course-links a {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px 14px;
    border-right: 1px solid #e2ebe9;
    background: #ffffff;
    text-decoration: none !important;
    transition: all 0.18s ease;
}

.course-links a:last-child {
    border-right: 0;
}

.course-links a:hover, .course-links a.preferred {
    background: #f0fdfa;
}

.course-links span {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.course-links b {
    font-size: 12.5px;
    color: #0f766e;
    font-weight: 800;
}

.empty {
    display: none;
    padding: 40px;
    text-align: center;
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 20px;
    margin-top: 24px;
}

.empty.show {
    display: block;
}

.empty h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
}

.empty p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .directory-hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .directory-trust .wrap {
        grid-template-columns: 1fr 1fr;
    }

    .directory-trust .wrap>div:nth-child(2) {
        border-right: 0;
    }

    .branch-facts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .directory-directions {
        grid-template-columns: 1fr;
    }

    .directory-trust .wrap {
        grid-template-columns: 1fr 1fr;
    }

    .directory-trust .wrap>div {
        padding: 16px 12px;
    }

    .directory-trust strong {
        font-size: 22px;
    }
}

/* Location Section & Branch Facts Grid (Exact Mockup Match) */
#location {
    padding: 80px 0;
    background: #f8fafc;
}

#location .wrap {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box;
}

.location-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 44px;
    background: linear-gradient(135deg, #06152d 0%, #091e3e 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    /* border-radius: 28px; */
    padding: 48px;
    color: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Background wave pattern on the right side */
.location-grid::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
    opacity: 0.6;
}

.location-main-col {
    display: flex;
    flex-direction: column;
}

/* Header row with building / support icon badge */
.location-header-row,
.guidance-header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(37, 99, 235, 0.25) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.15);
}

.location-header-row h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.branch-area {
    color: #38bdf8 !important;
    font-size: 14px;
    font-weight: 700;
    margin: 3px 0 0 !important;
}

.branch-address {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.location-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

/* 2x2 Fact Cards Grid */
.branch-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.fact-card {
    background: rgba(8, 20, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all 0.2s ease;
}

.fact-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(14, 165, 233, 0.12);
    transform: translateY(-2px);
}

.fact-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
}

.fact-card strong {
    display: block;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.35;
}

.fact-card small {
    display: block;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 3px;
}

.fact-card small.highlight {
    color: #38bdf8;
    font-weight: 700;
}

.institute-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #00d2b5 !important;
    font-size: 14.5px;
    font-weight: 800;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.institute-link:hover {
    color: #38bdf8 !important;
    transform: translateX(4px);
}

/* Right Column: Admissions & Guidance Hub with Vertical Divider */
.location-side-col {
    position: relative;
    padding-left: 44px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
}

.guidance-header-row h3 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.guidance-direct-contacts {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 28px 0 32px;
}

.direct-contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none !important;
    color: #ffffff;
    transition: all 0.2s ease;
}

.circle-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
}

.phone-text {
    color: #38bdf8 !important;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.email-text {
    color: #e2e8f0 !important;
    font-size: 15px;
    font-weight: 500;
}

.direct-contact-row:hover .phone-text {
    color: #00d2b5 !important;
}

.direct-contact-row:hover .email-text {
    color: #ffffff !important;
}

.directions-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 30px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 800;
    border: 0;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
    text-decoration: none !important;
    transition: all 0.2s ease;
    width: fit-content;
}

.directions-pill-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.5);
}

.pill-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 900;
}

@media (max-width: 900px) {
    .location-grid {
        grid-template-columns: 1fr;
        padding: 32px;
        gap: 32px;
    }

    .location-side-col {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 32px;
    }

    .branch-facts {
        grid-template-columns: 1fr;
    }
}