/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f9fc;
    color: #333;
    padding-top: 130px; /* navbar height */
    min-height: 100vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Top Header Styles */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.99);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eee;
    z-index: 100;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05);
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    flex-wrap: nowrap;
    gap: 2.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex: 0 0 auto;
}

.logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-right: 0;
    vertical-align: middle;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #005028;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.main-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links a {
    color: #231F20;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    padding: 0.2rem 0;
    transition: color 0.2s;
}

.nav-links a.active,
.nav-links a:hover {
    color: #D12027;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.nav-links a.active {
    text-decoration: underline;
    text-underline-offset: 4px;
    color: #D12027;
    font-weight: 600;
}

/* Auth & Action Buttons */
.navbar-actions {
    display: flex;
    gap: 1.3rem;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: 2.5rem;
}

.navbar-btn {
    border-radius: 9999px;
    padding: 0.6rem 2.2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    outline: none;
    border: none;
    background: #005028;
    color: #fff;
    cursor: pointer;
    transition: background .2s, color .2s;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: none;
}

.navbar-btn.enquire-btn,
.navbar-btn.login-btn,
.navbar-btn.signup-btn {
    background: #005028;
}

.navbar-btn.enquire-btn:hover,
.navbar-btn.login-btn:hover,
.navbar-btn.signup-btn:hover {
    background: #D12027;
}

.navbar-btn i {
    font-size: 1.1em;
}

@media (max-width: 960px) {
    .header-top-content {
        flex-wrap: wrap;
        padding: 0 1rem;
        gap: 1rem;
    }
    .logo img { height: 50px; }
    .logo span { font-size: 1.3rem; }
    .nav-links { gap: 1.5rem; }
    .navbar-btn { padding: 0.6rem 1.2rem; }
}
@media (max-width: 700px) {
    .header-top-content { flex-direction: column; gap: 1rem; }
    .logo img { height: 40px; }
    .nav-links { gap: 1rem; }
    .navbar-btn { padding: 0.6rem 0.7rem; font-size: 0.9rem; }
}

/* --- Dropdown Styles for ContactUs.php --- */
/* Dropdown parent */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.2rem 0;
    background: none;
    border: none;
}

/* The chevron icon */
.dropdown-toggle i {
    margin-left: 7px;
    font-size: 0.9rem;
    transition: transform 0.18s;
}

/* Show dropdown on hover or focus */
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: flex;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 110%; /* Below the nav item */
    background: #fff;
    box-shadow: 0 8px 32px rgba(32, 58, 67, 0.13);
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    min-width: 370px;
    z-index: 999;
    gap: 2rem;
    flex-direction: row;
    transition: box-shadow 0.22s;
}

/* Dropdown columns */
.dropdown-column {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.dropdown-column h4 {
    font-size: 1rem;
    color: #005028;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.dropdown-column a {
    color: #231F20;
    text-decoration: none;
    font-size: 1.01rem;
    margin: 0.2rem 0;
    transition: color 0.16s;
    padding: 0.1rem 0;
}

.dropdown-column a:hover {
    color: #D12027;
}

/* ===== Hero Section ===== */
.hero.small-hero {
    background:
        linear-gradient(rgba(15, 32, 39, 0.82), rgba(32, 58, 67, 0.77)),
        url('../Img/hero.jpg') center/cover no-repeat;
    min-height: calc(30vh + 120px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
    color: #fff;
}

.hero.small-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero.small-hero p {
    font-size: 1.1rem;
    color: #eaf6fb;
}

/* ===== Section & Resources Cards ===== */
.section {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #004c66;
    margin-bottom: 2.5rem;
}

/* --- Search & Filter Section --- */
.resources-tools {
    padding: 1rem 0;
    background: #f9f9f9;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.resources-tools .container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.resources-tools input, .resources-tools select {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    min-width: 180px;
}

/* --- Resources Grid --- */
.resources-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-top: 2rem;
}
.resource-card {
    background: #fff;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
.resource-card i {
    font-size: 2.2rem;
    color: #28a745;
    margin-bottom: 0.5rem;
}
.resource-card h3 {
    font-size: 1.25rem;
    color: #005028;
    font-weight: 600;
    margin-bottom: 0.7rem;
}
.resource-card p {
    color: #555;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.resource-card .btn {
    display: inline-block;
    margin-top: auto;
    padding: 0.7rem 1.2rem;
    background: #28a745;
    color: #fff;
    border-radius: 7px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s ease;
    box-shadow: 0 2px 8px rgba(40,167,69,0.09);
}
.resource-card .btn:hover {
    background: #218838;
}

/* --- Extra: Grid alignment for smaller screens --- */
@media (max-width: 900px) {
    .resources-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.2rem;
    }
    .hero.small-hero h1 {
        font-size: 1.8rem;
    }
    .hero.small-hero p {
        font-size: 1rem;
    }
}
@media (max-width: 700px) {
    .resources-tools .container {
        flex-direction: column;
        gap: 0.7rem;
    }
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .section-title {
        font-size: 1.33rem;
    }
    .hero.small-hero h1 {
        font-size: 1.25rem;
    }
    .hero.small-hero {
        min-height: 40vh;
        padding: 1.2rem 0.5rem;
    }
}

/* --- Hamburger Styles --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1200;
    padding: 0;
    margin-right: 12px;
}
.hamburger .bar {
    height: 4px;
    width: 28px;
    margin: 4px auto;
    background: #231F20;
    border-radius: 2px;
    transition: all 0.3s;
    display: block;
}
.hamburger.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.is-active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Hide nav, show hamburger on screens smaller than a tablet --- */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .main-nav {
        position: fixed;
        top: 80px; /* below header */
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 8px 32px rgba(32, 58, 67, 0.13);
        z-index: 1100;
        transform: translateY(-120%);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        opacity: 0;
        pointer-events: none;
        flex-direction: column;
        align-items: center;
        width: 100vw;
        padding: 2.5rem 0 2rem 0;
        min-height: 50vh;
        max-height: 90vh;
        overflow-y: auto;
    }
    .main-nav.nav-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-links {
        flex-direction: column;
        gap: 1.8rem;
        width: 100%;
        align-items: center;
    }
    .dropdown-content {
        position: static;
        box-shadow: none;
        background: none;
        border-radius: 0;
        padding: 0.6rem 0;
        min-width: unset;
        width: 100%;
        gap: 1.4rem;
    }
    .dropdown:hover .dropdown-content,
    .dropdown:focus-within .dropdown-content {
        display: flex;
    }
    .top-header {
        position: static !important;
        box-shadow: none !important;
        border-bottom: none !important;
    }
    body {
        padding-top: 0 !important; /* Remove extra space added for fixed header */
    }
}

@media (max-width: 768px) {
    .header-top-content {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    .main-nav {
        top: 65px;
    }
    .logo img { height: 100px; width: 100px;}
    .logo span { font-size: 1.5rem; }
    .navbar-btn { padding: 0.1rem 1rem; font-size: 0.8rem; }
}

/* Ensure nav is visible on desktop/tablet and hamburger hidden */
@media (min-width: 769px) {
    .main-nav {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        padding: 0 !important;
        min-height: unset !important;
        max-height: unset !important;
        overflow-y: visible !important;
        display: flex !important;
    }
    .hamburger {
        display: none !important;
    }
}

/* --- Footer --- */
.modern-footer {
    background: linear-gradient(90deg, #F1F1F1 0%, #fff 100%);
    color: #231F20;
    text-align: center;
    padding: 2.5rem 0 1rem 0;
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.1rem;
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 1rem;
}
.footer-col {
    text-align: center;
}
.footer-heading {
    font-weight: bold;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}
.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.4rem;
    margin-top: 0.5rem;
}
.footer-social a {
    color: #231F20;
    font-size: 1.5rem;
    transition: color 0.18s, transform 0.18s, text-shadow 0.18s;
    will-change: transform, color, text-shadow;
    text-shadow: 0 0 0px #D12027, 0 0 0px #ffb200;
}
.footer-social a:hover {
    color: #D12027;
    transform: scale(1.18) translateY(-4px);
    text-shadow: 0 0 8px #D12027, 0 0 16px #ffb200, 0 0 4px #fff;
}
.footer-social a:active {
    animation: bounce 0.35s;
}
@keyframes bounce {
    0% { transform: scale(1.18) translateY(-4px);}
    40% { transform: scale(0.93) translateY(2px);}
    100% { transform: scale(1.18) translateY(-4px);}
}
.footer-bottom {
    color: #58595B;
    font-size: 1rem;
    margin-top: 1.2rem;
    text-align: center;
}

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; justify-content: center; margin-top: 1.5rem; gap: 1rem; }
}
@media (min-width: 769px) {
  .desktop-only { display: flex !important; }
  .mobile-only { display: none !important; }
}