/* Font Declarations */
@font-face {
    font-family: 'Anko';
    src: url('fonts/Anko.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Beast vs SpreadTall';
    src: url('fonts/BvST.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Root Variables for Color Scheme */
:root {
    /* Light Mode Colors - Prairie Grass, Grecian Ivory, Cabbage Rose Theme */
    --primary-color: #B1A38E;        /* Prairie Grass - warm beige-brown primary */
    --secondary-color: #D8CFBE;      /* Grecian Ivory - soft neutral secondary */
    --accent-color: #C59F91;         /* Cabbage Rose - dusty pink accent */
    --warm-accent: #C8A296;          /* Lighter Cabbage Rose variant */
    --text-primary: #3D3630;         /* Deep warm brown for text */
    --text-secondary: #6B5F52;       /* Medium warm brown for secondary text */
    --background-primary: #FDFCFB;   /* Warm off-white - clean backdrop */
    --background-secondary: #F5F3E8; /* Warm beige background */
    --border-color: #C59F91;         /* Cabbage Rose for borders */
    --shadow-color: rgba(177, 163, 142, 0.2);
    --overlay-color: rgba(177, 163, 142, 0.95);
}

/* Dark Mode Colors - Evening Warmth */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #D8CFBE;        /* Grecian Ivory - light in dark mode */
        --secondary-color: #B1A38E;      /* Prairie Grass - supporting color */
        --accent-color: #C59F91;         /* Cabbage Rose - maintains warmth */
        --warm-accent: #C8A296;          /* Lighter Cabbage Rose */
        --text-primary: #F5F3E8;         /* Warm off-white for text */
        --text-secondary: #D8CFBE;       /* Grecian Ivory for secondary text */
        --background-primary: #2B2520;   /* Deep warm brown background */
        --background-secondary: #3D3630; /* Medium warm brown */
        --border-color: #B1A38E;         /* Prairie Grass for borders */
        --shadow-color: rgba(43, 37, 32, 0.6);
        --overlay-color: rgba(216, 207, 190, 0.95);
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Heading Styles with Anko */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Anko', Georgia, serif;
    font-weight: normal;
}


/* Navigation Styles */
.navbar {
    background-color: var(--background-primary);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    transition: background-color 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo-icon {
    height: 40px;
    width: auto;
}

.nav-logo-text {
    font-family: 'Beast vs SpreadTall', sans-serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
}

.nav-logo h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--background-secondary);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: var(--background-secondary);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--background-primary);
    min-width: 240px;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 2001;
    border: 2px solid var(--primary-color);
    overflow: hidden;
    pointer-events: none;
    padding-top: 0.5rem;
    margin-top: -0.5rem;
}

/* THIS IS THE KEY RULE - Keep dropdown visible when hovering over nav OR dropdown */
.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown .dropdown-menu:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: all !important;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-primary);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: var(--primary-color);
    color: white;
    padding-left: 1.5rem;
}

.dropdown-menu .dropdown-section-link {
    background-color: var(--background-secondary);
    font-weight: 600;
    color: var(--primary-color);
}

.dropdown-menu .dropdown-section-link:hover {
    background-color: var(--primary-color);
    color: white;
    padding-left: 1.5rem;
}

.dropdown-arrow {
    display: inline-block;
    margin-left: 0.3rem;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-item.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background-primary) 100%);
    color: var(--text-primary);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(177, 163, 142, 0.03) 0%, transparent 100%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 60%;
    text-align: left;
    margin-left: 8%;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 500px;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.cta-button {
    background: var(--accent-color);
    color: white;
    padding: 18px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 12px var(--shadow-color);
    position: relative;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-color);
    background: var(--primary-color);
}

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 4rem;
    color: var(--primary-color);
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.hero .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}


.counselors .section-title {
    text-align: center;
}

.counselors .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* About Section */

/* Counselors Section */
.counselors {
    padding: 100px 0;
    background: var(--background-primary);
    position: relative;
}

.counselors::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-color);
}

.counselors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    margin-top: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.counselor-card {
    background: var(--background-primary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--secondary-color);
    position: relative;
}

.counselor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.counselor-card:hover::before {
    opacity: 1;
}

.counselor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.counselor-card:nth-child(even):hover {
    transform: translateY(-5px);
}

.counselor-image {
    position: relative;
    height: 350px;
    overflow: hidden;
    cursor: pointer;
}

.counselor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    filter: sepia(10%) saturate(1.1);
}

.counselor-image:hover img {
    transform: scale(1.08);
    filter: sepia(20%) saturate(1.2);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(177, 163, 142, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.counselor-image:hover .image-overlay {
    opacity: 1;
}

.counselor-info {
    padding: 2.5rem;
    background: var(--background-secondary);
}

.counselor-info h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.counselor-title {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-style: italic;
}

.counselor-details {
    display: none;
    animation: fadeIn 0.5s ease;
    margin-top: 1rem;
}

.counselor-details.active {
    display: block;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--background-primary);
    border-radius: 20px;
    max-width: 1400px;
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid var(--border-color);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background-color: var(--background-secondary);
    color: var(--primary-color);
    transform: scale(1.1);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.modal-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Gallery Styles */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gallery-main {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px var(--shadow-color);
    aspect-ratio: 4/3;
    max-height: 600px;
    background-color: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    max-height: 100%;
    cursor: zoom-in;
}

.gallery-main-img:hover {
    transform: scale(1.02);
}

.gallery-thumbnails {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.gallery-thumb:hover {
    opacity: 1;
    transform: scale(1.1);
}

.gallery-thumb.active {
    border-color: var(--primary-color);
    opacity: 1;
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Modal Details */
.modal-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-section {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.detail-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.detail-section ul {
    color: var(--text-secondary) !important;
    line-height: 1.8;
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.detail-section li {
    color: var(--text-secondary) !important;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.detail-section li::marker {
    color: var(--primary-color) !important;
}

/* Additional specific rules for modal lists */
.modal-details ul {
    color: #6B5F52 !important;
    list-style-type: disc;
}

.modal-details li {
    color: #6B5F52 !important;
}

.modal-details li::marker {
    color: #B1A38E !important;
}

.contact-section {
    background-color: var(--background-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: none;
}

.contact-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-section p {
    margin-bottom: 0.75rem;
}

.contact-section strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Contact Section */
.contact {
    background-color: var(--background-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
}

#map iframe {
    border-radius: 12px;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

#map iframe:hover {
    filter: grayscale(0%);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
    font-weight: 700;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--warm-accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animation Classes */
.scroll-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--background-primary);
        width: 100%;
        text-align: left;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow-color);
        padding: 0.5rem 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0;
    }

    .nav-link {
        padding: 0.6rem 1.5rem;
        justify-content: flex-start;
        text-align: left;
        display: block;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-content {
        max-width: 100%;
        margin-left: 0;
        text-align: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .counselors-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }


    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .container {
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }

    /* Modal Responsive */
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }

    .modal-body {
        gap: 2rem;
        padding: 1.5rem;
    }

    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .modal-header h2 {
        font-size: 1.75rem;
    }

    .gallery-thumbnails {
        gap: 0.5rem;
    }

    .gallery-thumb {
        width: 60px;
        height: 60px;
    }

    .detail-section h3 {
        font-size: 1.1rem;
    }

    /* Mobile Dropdown */
    .nav-item.has-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 0;
        border: none;
        background-color: rgba(107, 142, 35, 0.2);
        display: none;
        padding: 0;
    }

    .nav-item.has-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(161, 166, 92, 0.3);
    }

    .dropdown-menu a:last-child {
        border-bottom: none;
    }

    .nav-item.has-dropdown .nav-link {
        justify-content: flex-start;
    }

    .dropdown-menu a {
        padding: 0.4rem 2rem;
        text-align: left;
    }
}

@media screen and (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .nav-logo h2 {
        font-size: 1.2rem;
    }

    .nav-logo-icon {
        height: 30px;
    }

    .nav-logo-text {
        font-size: 1.2rem;
    }

    .counselor-info {
        padding: 1.5rem;
    }

    .contact-info h3 {
        font-size: 1.5rem;
    }

    /* Modal Mobile */
    .modal-overlay {
        padding: 10px;
    }

    .modal-content {
        border-radius: 15px;
    }

    .modal-body {
        padding: 1rem;
        gap: 1.5rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }

    .gallery-thumbnails {
        gap: 0.25rem;
    }

    .gallery-thumb {
        width: 50px;
        height: 50px;
    }

    .contact-section {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-toggle,
    .image-overlay {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
        padding: 20px 0;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --shadow-color: rgba(0, 0, 0, 0.3);
    }

    .counselor-card,
    .feature {
        border: 2px solid var(--border-color);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}