/*
Theme Name: AT-Education
Theme URI: https://example.com/at-education
Author: AT Education Dev Team
Author URI: https://example.com
Description: Modern, lightweight, Elementor-compatible education theme that renders existing WordPress content dynamically.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: at-education
Tags: education, custom-logo, custom-menu, blog, one-column, two-columns, right-sidebar
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --at-primary: var(--primary-color, #0b2d5b);
    --at-secondary: var(--secondary-color, #f97316);
    --at-body-font: "Manrope", sans-serif;
    --at-head-font: "Merriweather", serif;
}

.at-top-bar {
    background: #eff6ff;
    border-bottom: 1px solid rgba(11, 45, 91, 0.1);
}

.at-top-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.at-top-link:hover {
    color: var(--at-secondary);
}

.at-social-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.at-social-link:hover {
    background: var(--at-secondary);
    color: #fff;
    transform: translateY(-2px);
}

.at-main-header {
    background:
        radial-gradient(circle at 18% 58%, rgba(209, 228, 245, 0.38) 0, rgba(209, 228, 245, 0) 34%),
        radial-gradient(circle at 82% 18%, rgba(244, 248, 252, 0.9) 0, rgba(244, 248, 252, 0) 30%),
        linear-gradient(90deg, #eef5fb 0%, #f4f8fc 48%, #ffffff 100%);
    border-bottom: 1px solid rgba(11, 45, 91, 0.08);
}

.at-main-header .hero-section {
    background: transparent;
    padding: 0;
    margin: 0;
}

.at-main-header .container {
    position: relative;
}

.at-main-header .container-fluid,
.at-top-bar .container-fluid,
.at-nav-bar .container-fluid {
    padding-left: clamp(12px, 2vw, 28px);
    padding-right: clamp(12px, 2vw, 28px);
}

.at-logo-wrap .custom-logo,
.at-logo-wrap .custom-logo-link img,
.custom-logo {
    max-height: var(--at-logo-max-h, 92px);
    width: auto;
}

.at-header-brand-row {
    padding: 1.6rem 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 2.75rem;
    align-items: center;
}

.hero-inner.no-hero-image {
    grid-template-columns: 1fr;
}

.hero-content.at-header-title-col {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.1rem;
}

.school-logo.at-header-logo-col {
    width: 90px;
    min-width: 90px;
    display: flex;
    align-items: center;
}

.at-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.at-college-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    max-width: 100%;
    margin: 0;
}

.at-college-info.at-text-align-left {
    align-items: flex-start;
    text-align: left;
}

.at-college-info.at-text-align-center {
    align-items: center;
    text-align: center;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.at-college-info.at-text-align-right {
    align-items: flex-end;
    text-align: right;
}

.at-logo-wrap .custom-logo-link {
    display: inline-block;
    line-height: 0;
}

.hero-image.at-header-badge-col {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
}

.at-header-hero-image {
    width: 100%;
    height: 100%;
    min-height: 340px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.12);
}

.at-college-title {
    font-family: var(--at-head-font);
    color: var(--secondary-color);
    font-size: clamp(1.15rem, 2.2vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.15;
    text-transform: uppercase;
    margin-bottom: 0.18rem;
}

.at-college-society {
    color: var(--primary-color);
    font-weight: 700;
    font-size: clamp(0.78rem, 0.95vw, 1.02rem);
    letter-spacing: 0.02em;
    line-height: 1.35;
    text-transform: uppercase;
    margin-bottom: 0.16rem;
}

.at-college-affiliation,
.at-college-address {
    color: #1e293b;
    font-weight: 500;
    font-size: clamp(0.94rem, 1.05vw, 1.15rem);
    line-height: 1.35;
    margin-bottom: 0.14rem;
}

.at-college-statutory {
    color: #0f172a;
    font-weight: 600;
    font-size: clamp(0.94rem, 1.05vw, 1.15rem);
    line-height: 1.35;
    margin-bottom: 0.14rem;
}

.at-college-details {
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.55;
}

.at-college-details p {
    margin: 0;
}

.at-badge-img {
    max-height: 88px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.15);
}

.at-header-meta-row {
    border-top: 1px dashed rgba(11, 45, 91, 0.2);
}

.at-header-meta {
    color: var(--primary-color);
    font-size: 0.92rem;
    font-weight: 600;
}

@media (min-width: 992px) {
    .at-main-header {
        border-bottom: 0;
    }

    .at-header-brand-row {
        padding: 1.15rem 0 0.8rem;
    }

    .hero-inner {
        grid-template-columns: 140px minmax(0, 1fr) 140px;
        gap: 1.25rem;
        align-items: center;
    }

    .hero-content.at-header-title-col {
        grid-column: 2;
        justify-content: center;
        text-align: center;
        gap: 0;
    }

    .hero-inner.no-hero-image .hero-content.at-header-title-col {
        grid-column: 1;
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        display: grid;
        grid-template-columns: max-content max-content;
        align-items: center;
        gap: 3.25rem;
        justify-content: center;
    }

    .school-logo.at-header-logo-col {
        grid-column: 1;
        width: 140px;
        min-width: 140px;
        justify-content: flex-start;
    }

    .hero-inner.no-hero-image .school-logo.at-header-logo-col {
        grid-column: 1;
        width: max-content;
        min-width: 0;
        justify-content: center;
    }

    .school-text.at-college-info {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .hero-inner.no-hero-image .school-text.at-college-info {
        grid-column: 2;
    }

    .hero-inner.no-hero-image .school-text.at-college-info.at-text-align-left {
        align-items: flex-start;
        text-align: left;
    }

    .hero-inner.no-hero-image .school-text.at-college-info.at-text-align-center {
        align-items: center;
        text-align: center;
        width: max-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-inner.no-hero-image .school-text.at-college-info.at-text-align-right {
        align-items: flex-end;
        text-align: right;
    }

    .hero-image.at-header-badge-col {
        grid-column: 3;
        width: 140px;
        min-width: 140px;
        justify-content: center;
    }

    .at-header-hero-image {
        width: 78px;
        min-height: 0;
        height: auto;
        border-radius: 12px;
    }

    .at-logo-wrap .custom-logo,
    .at-logo-wrap .custom-logo-link img,
    .custom-logo {
        max-height: 90px;
    }

    .at-college-society {
        font-size: clamp(0.86rem, 1.02vw, 1.05rem);
        margin-bottom: 0.2rem;
    }

    .at-college-title {
        font-size: clamp(1.75rem, 2.6vw, 2.85rem);
        line-height: 1.1;
        margin-bottom: 0.22rem;
    }

    .at-college-affiliation,
    .at-college-statutory,
    .at-college-address {
        font-size: clamp(0.95rem, 1.3vw, 1.35rem);
        margin-bottom: 0.12rem;
    }

    .at-college-details {
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .at-header-meta-row {
        margin-top: 0.2rem;
        border-top: 1px dashed rgba(11, 45, 91, 0.22);
        padding-top: 0.7rem !important;
    }

    .at-header-meta {
        font-size: clamp(1rem, 1.05vw, 1.15rem);
    }
}

.at-nav-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 82%, #ffffff) 60%, var(--primary-color) 100%);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.15);
    z-index: 1020;
}

.at-nav-bar .container {
    min-height: 64px;
}

.at-nav-bar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    background: #fff;
}

.mobile-nav-toggle {
    min-width: 46px;
    min-height: 46px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.at-main-menu {
    gap: 0.15rem;
}

.at-main-menu > .menu-item > .nav-link {
    color: #fff;
    padding: 0.78rem 0.92rem;
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.at-main-menu .menu-item.current-menu-item > .nav-link,
.at-main-menu .menu-item.current-menu-ancestor > .nav-link,
.at-main-menu .menu-item > .nav-link:hover {
    background: var(--secondary-color);
    color: #fff;
}

.at-main-menu .dropdown-menu {
    position: absolute;
    inset: auto auto auto 0;
    width: auto;
    max-width: 22rem;
    border: 0;
    border-radius: 0.5rem;
    padding: 0.4rem 0;
    margin-top: 0.15rem;
    background: #fff;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.14);
    min-width: 14rem;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.at-main-menu .dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.at-main-menu .dropdown-menu li {
    list-style: none;
    margin: 0;
}

.at-main-menu .dropdown-item {
    display: block;
    padding: 0.6rem 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
    color: #0f172a;
}

.at-main-menu .dropdown-menu .menu-item > .dropdown-item {
    display: block;
    width: 100%;
    color: #0f172a;
    background: transparent;
}

.at-main-menu .dropdown-item:hover,
.at-main-menu .dropdown-item:focus,
.at-main-menu .current-menu-item > .dropdown-item {
    background: #e0f2fe;
    color: var(--primary-color);
}

@media (min-width: 992px) {
    .at-main-menu > .menu-item.dropdown {
        position: relative;
    }

    .at-main-menu .menu-item.dropdown:hover > .dropdown-menu,
    .at-main-menu .menu-item.dropdown:focus-within > .dropdown-menu {
        display: block;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .at-main-menu .dropdown-menu > .menu-item.dropdown {
        position: relative;
    }

    .at-main-menu .dropdown-menu .dropdown-menu {
        left: 100%;
        top: 0;
        margin-left: 0.35rem;
        margin-top: -0.35rem;
    }
}
