/* ========== CSS Variables & Root ========== */
:root {
    /* Primary Colors */
    --primary-dark: #0f1729;
    --primary-blue: #1e3a5f;
    --primary-blue-deep: #16324c;
    --primary-teal: #00a8b5;
    --primary-teal-rgb: 0, 168, 181;

    /* Secondary Colors */
    --secondary-gray: #f0f4f8;
    --secondary-light: #ffffff;
    --secondary-dark-gray: #4a5568;

    /* Accent Colors */
    --accent-purple: #667eea;
    --accent-purple-rgb: 102, 126, 234;
    --accent-pink: #f5576c;
    --accent-cyan: #00f2fe;

    /* Neutral Colors */
    --border-color: #e2e8f0;
    --text-primary: #1a202c;
    --text-secondary: #718096;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
    --font-size-4xl: 3rem;
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;

    /* Elevation */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.14);
}

/* ========== Dark Mode ========== */
.dark-mode {
    --primary-dark: #0a101a;
    --primary-blue: #16243a;
    --primary-blue-deep: #0d1a2b;
    --primary-teal: #00eeff;
    --primary-teal-rgb: 0, 188, 212;
    --secondary-gray: #232b36;
    --secondary-light: #181e29;
    --secondary-dark-gray: #bfc9d1;
    --accent-purple: #8f9eff;
    --accent-purple-rgb: 143, 158, 255;
    --accent-pink: #ff6f91;
    --accent-cyan: #00e6ff;
    --border-color: #2d3748;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    background-color: var(--secondary-light);
    color: var(--text-primary);
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6,
.dark-mode p,
.dark-mode a,
.dark-mode span,
.dark-mode strong,
.dark-mode li,
.dark-mode span,
.dark-mode label {
    color: var(--text-primary) !important;
}

.leaflet-popup-content strong {
    color: var(--primary-black) !important;
}

.dark-mode .header-subtitle,
.dark-mode .hero-subtitle,
.dark-mode .feature-card:hover h3,
.dark-mode .footer-section h4,
.dark-mode .blog-footer a {
    color: var(--primary-teal) !important;
}

.dark-mode #darkModeToggle {
    border: none;
}

.dark-mode #darkModeToggle:hover {
    background: var(--secondary-dark-gray);
}

.dark-mode .btn-secondary {
    background: var(--secondary-gray);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.dark-mode .btn-secondary:hover {
    background: var(--text-primary);
    color: var(--secondary-light);
}

.dark-mode .blog-category {
    background: rgba(0, 168, 181, 0.2);
    color: var(--primary-teal);
}

.dark-mode .blog-date,
.dark-mode .read-time,
.dark-mode .blog-card p,
.dark-mode .author-info span,
.dark-mode .read-more-btn {
    color: var(--text-secondary) !important;
}

.dark-mode .read-more-btn {
    background: var(--secondary-light) !important;
    border-color: var(--border-color) !important;
}

.dark-mode .read-more-btn:hover {
    border-color: var(--primary-teal) !important;
    color: var(--primary-teal) !important;
}

.dark-mode .read-more,
.dark-mode .blog-sidebar-title,
.dark-mode .section-label {
    color: var(--primary-teal) !important;
}

.dark-mode .spotlight-badge {
    background: var(--secondary-gray) !important;
    color: #fff !important;
}

.dark-mode .filter-btn {
    background: var(--secondary-gray);
    color: var(--text-primary) !important;
    border: 1px solid transparent;
}

.dark-mode .filter-btn:hover {
    background: var(--border-color);
}

.dark-mode .filter-btn.active {
    background: var(--secondary-dark-gray);
    color: #000000 !important;
}

.dark-mode .category-header h3 {
    background: var(--secondary-light) !important;
    color: var(--text-primary) !important;
}

.dark-mode .blog-card h3,
.dark-mode .spotlight-card h3,
.dark-mode .trending-content h4,
.dark-mode .blog-main-title {
    color: var(--text-primary) !important;
}

.dark-mode .earth-btn:hover,
.dark-mode .earth-btn:focus {
    background: var(--accent-cyan);
}

/* ========== Reset & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    /* overflow-x: hidden; */
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--secondary-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* Performance optimizations */
* {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(var(--primary-teal-rgb), 0.45);
    outline-offset: 3px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-normal);
}

/* ========== Navigation ========== */
.navbar {
    background: var(--secondary-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 10000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    display: flex;
    justify-content: center;
}

.logo-icon img {
    background-color: rgb(83, 255, 255);
    padding: 8px;
    border-radius: 10%;
    width: 45px;
    height: 45px;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.logo-subtext {
    font-size: 0.75rem;
    color: var(--secondary-dark-gray);
    font-weight: 600;
}

.nav-items {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    justify-content: center;
}

.nav-items button {
    margin: 0px;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: var(--secondary-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-items button .fa-moon {
    color: var(--secondary-dark-gray);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: color var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-teal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-teal);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.hamburger:focus-visible {
    border-radius: var(--radius-md);
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    color: var(--secondary-light);
    padding: var(--spacing-2xl) var(--spacing-lg);
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 168, 181, 0.1) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.home .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px 400px at 15% 20%, rgba(var(--primary-teal-rgb), 0.20), transparent 55%),
        radial-gradient(600px 360px at 85% 65%, rgba(var(--accent-purple-rgb), 0.16), transparent 55%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-teal);
    font-weight: 600;
}

.hero-description {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xl);
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== Buttons ========== */
.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--font-size-base);
    cursor: pointer;
    display: inline-block;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-teal);
    color: var(--primary-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 168, 181, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary-light);
    border-color: var(--secondary-light);
}

.btn-secondary:hover {
    background: var(--secondary-dark-gray);
    transform: translateY(-2px);
}

.btn-secondary:hover .fa-moon {
    color: var(--secondary-light-gray);
}

/* ========== Features Section ========== */
.features {
    padding: var(--spacing-2xl) var(--spacing-lg);
    background: var(--secondary-gray);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    text-align: center;
    color: var(--primary-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background: var(--secondary-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition:
        transform var(--transition-normal),
        box-shadow var(--transition-normal),
        opacity 0.6s ease;
    opacity: 1;
    transform: translateY(0);
    will-change: transform, opacity;
}

.js .feature-card {
    opacity: 0;
    transform: translateY(18px);
}

.js .feature-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.js .feature-card:nth-child(1) {
    transition-delay: 0.05s;
}

.js .feature-card:nth-child(2) {
    transition-delay: 0.12s;
}

.js .feature-card:nth-child(3) {
    transition-delay: 0.19s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    display: flex;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    transition: transform var(--transition-normal);
}

.feature-icon img {
    background-color: rgb(83, 255, 255);
    padding: 10px;
    border-radius: 10%;
    width: 60px;
    height: 60px;
}

.feature-card:hover .feature-icon {
    transform: translateY(-2px) scale(1.03);
}

.feature-card h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-blue);
}

.feature-card:hover h3 {
    color: var(--primary-teal);
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.feature-link {
    color: var(--primary-teal);
    font-weight: 600;
    display: inline-block;
    transition: all var(--transition-normal);
}

.feature-card:hover .feature-link {
    transform: translateX(4px);
}

/* ========== Info Section ========== */
.info-section {
    padding: var(--spacing-2xl) var(--spacing-lg);    
    background: var(--secondary-gray);
}

.info-container {
    display: flex;
    gap: var(--spacing-2xl);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.info-left {
    max-width: 50%;
    margin: 0 auto;
}

.info-right {
    max-width: 50%;
    margin: 0 auto;
}

.info-right div {
    background: var(--secondary-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

/* ========== Footer ========== */
.footer {
    background: var(--primary-dark);
    color: var(--secondary-light);
    padding: var(--spacing-md) var(--spacing-lg);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-teal);
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.footer-section li {
    margin-bottom: var(--spacing-sm);
}

.footer-section a {
    opacity: 0.8;
    transition: opacity var(--transition-normal);
}

.footer-section a:hover {
    opacity: 1;
    color: var(--primary-teal);
}

.footer-bottom {
    text-align: center;
    /* padding-top: var(--spacing-lg); */
    /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
    opacity: 0.7;
}

/* ========== Animations ========== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }

    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-delay-1 {
    animation: fadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        width: 100%;
        background: var(--secondary-light);
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-md) 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: var(--spacing-md) var(--spacing-lg);
        display: block;
        border-bottom: 1px solid var(--border-color);
    }

    .hamburger {
        display: flex;
    }

    .nav-items {
        justify-content: flex-end;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .hero {
        min-height: 400px;
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .hero-buttons {
        flex-direction: column;
    }

    .features-grid,
    .activities-grid {
        grid-template-columns: 1fr;
    }

    .info-container {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-xl);
    }

    .info-left,
    .info-right {
        max-width: 100%;
    }

    .info-right div {
        padding: var(--spacing-lg);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .nav-logo {
        font-size: var(--font-size-base);
    }

    .logo-icon img {
        width: 35px;
        height: 35px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: var(--font-size-base);
    }

    .section-title {
        font-size: 1.75rem;
    }

    .info-section {
        /* padding: var(--spacing-xl) var(--spacing-md); */
        padding: calc(var(--spacing-lg) * 0.8) var(--spacing-md);
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .cta-content h2 {
        font-size: var(--font-size-2xl);
    }
}

/* Home Page Specific Animations & Features */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* Stats Section */
.stats-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-bold));
    color: #ffffff;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item h3 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Modules Preview Section */
.modules-section {
    padding: 5rem 2rem;
    background: var(--bg-secondary);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 3rem;
}

.module-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--border-color);
}

.module-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.module-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: rgba(var(--primary-rgb), 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 6rem 2rem;
    background: url('../assets/header.jpg') center/cover fixed;
    position: relative;
    color: #fff;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 25, 47, 0.85);
}

.cta-content-wrapper {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content-wrapper h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.info-topics li {
    padding-top: 1rem;
    list-style-type: none;
}


/* HOME PAGE RESPONSIVENESS */
/* Reduce bottom spacing for modules section when it's visible on tablet and mobile */
@media (max-width: 768px) {
    .modules-section.fade-up.visible {
        padding-bottom: 2rem;
        /* smaller than desktop */
    }
}

@media (max-width: 480px) {
    .modules-section.fade-up.visible {
        padding-bottom: 1.25rem;
        /* tighter on small phones */
    }
}

/* Reduce top spacing for modules section when visible on tablet and mobile */
@media (max-width: 768px) {
    .modules-section.fade-up.visible {
        padding-top: 1.5rem;
        margin-top: 0.75rem;
    }
}

@media (max-width: 480px) {
    .modules-section.fade-up.visible {
        padding-top: 1rem;
        margin-top: 0.5rem;
    }
}

/* MOBILE: add spacing between right info card and CTA when fade-up is visible */
@media (max-width: 480px) {
    .info-right div {
        margin-bottom: var(--spacing-xl);
    }

    /* Add extra top padding to CTA when it animates into view */
    .cta-section.fade-up.visible {
        padding-top: calc(var(--spacing-lg) + 0.5rem);
    }
}



/* Ensure section subtitles have comfortable horizontal spacing */
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

@media (max-width: 768px) {
    .section-subtitle {
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .section-subtitle {
        padding-left: calc(var(--spacing-md));
        padding-right: calc(var(--spacing-md));
    }
}


.hero-content {
    padding: 0 1rem;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    padding-top: var(--spacing-sm);
    /* space between text and buttons */
}

/* Make the primary (Explore Maps) button a bit larger and more touch-friendly */
.hero-buttons .btn-primary {
    padding: calc(var(--spacing-sm) + 0.25rem) calc(var(--spacing-lg) + 0.5rem);
    border-radius: calc(var(--radius-md) + 0.25rem);
}

/* Ensure stacked buttons on small screens have breathing room */
@media (max-width: 480px) {
    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
    }

    .hero-buttons {
        padding-top: var(--spacing-md);
    }
}

/* On tablet and smaller, make info columns match width and stack cleanly */
@media (max-width: 768px) {
    .info-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        align-items: start;
        width: 100%;
        margin: 0 auto;
        padding: 0 var(--spacing-md);
        box-sizing: border-box;
        padding-top: var(--spacing-sm);
        /* smaller top gap on tablet */
    }

    .info-left,
    .info-right {
        max-width: none;
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .info-left {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    /* tighten the top of left content on tablet */
    .info-left {
        padding-top: calc(var(--spacing-sm) * 0.6);
    }

    .info-right {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .info-right div {
        padding: var(--spacing-lg);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 480px) {

    /* Tighter spacing and scaled typography for small phones */
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 0.75rem;
        --spacing-lg: 1rem;
        --spacing-xl: 1.5rem;
        --font-size-base: 0.95rem;
        --font-size-lg: 1rem;
        --font-size-xl: 1.15rem;
        --font-size-2xl: 1.4rem;
        --font-size-3xl: 1.75rem;
        --font-size-4xl: 2.25rem;
    }

    .nav-container {
        padding: var(--spacing-xs) var(--spacing-md);
    }

    .logo-icon img {
        width: 40px;
        height: 40px;
        padding: 6px;
    }

    .nav-logo {
        font-size: var(--font-size-lg);
    }

    .hero {
        min-height: 320px;
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .hero-content {
        padding: 0 var(--spacing-sm);
    }

    .hero-title {
        font-size: 1.6rem;
        margin-bottom: var(--spacing-sm);
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-xs);
    }

    .hero-description {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-md);
    }

    .hero-buttons {
        gap: var(--spacing-sm);
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        padding: 0.5rem 0.85rem;
        font-size: 0.95rem;
        border-radius: 0.75rem;
        width: 100%;
        max-width: 260px;
    }

    .features {
        /* padding: var(--spacing-xl) var(--spacing-md); */
        padding: var(--spacing-xl) 2rem;
    }

    .features-grid {
        gap: var(--spacing-md);
    }

    .feature-card {
        padding: var(--spacing-lg);
    }

    .feature-icon img {
        width: 48px;
        height: 48px;
        padding: 8px;
    }

    .feature-card h3 {
        font-size: 1.05rem;
    }

    .info-section {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .info-container {
        gap: var(--spacing-md);
    }

    /* Ensure left and right occupy the same full width on small screens */
    .info-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        align-items: start;
    }

    .info-left,
    .info-right {
        max-width: none;
        width: 100%;
        margin: 0;
    }

    .map-wrapper {
        min-height: 360px;
    }

    .map {
        min-height: 320px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .cta-content h2 {
        font-size: var(--font-size-2xl);
    }

    /* MOBILE: Improve info-section padding and make right card full-width */
    .info-left {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    .info-left p {
        padding-bottom: var(--spacing-sm);
    }

    .info-right {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    /* make the card on the right expand and breathe on small screens */
    .info-right div {
        width: 100%;
        box-sizing: border-box;
        padding: calc(var(--spacing-md));
        margin-top: var(--spacing-sm);
        border-radius: var(--radius-md);
    }

    /* Improve list spacing inside the right card */
    .info-topics {
        padding: 0.6rem 0.9rem;
    }

    .info-topics li {
        margin-bottom: 0.5rem;
    }
}

/* ========== CTA RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {

    .cta-section,
    .cta-section.fade-up.visible {
        padding: 3rem 1.25rem;
        background-position: center top;
        background-size: cover;
    }

    .cta-content-wrapper {
        max-width: 700px;
        padding: 0 var(--spacing-sm);
        text-align: center;
    }

    .cta-content-wrapper h2 {
        font-size: 2rem;
        line-height: 1.05;
        margin-bottom: var(--spacing-sm);
    }

    .cta-content-wrapper p {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
        opacity: 0.95;
    }

    /* Buttons inside CTA: make them friendlier on touch and layout well */
    .cta-section .btn {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
        border-radius: 0.75rem;
    }

    .cta-section .btn+.btn {
        margin-left: 0.5rem;
    }
}

@media (max-width: 480px) {

    .cta-section,
    .cta-section.fade-up.visible {
        padding: 2rem 2rem;
        background-position: center center;
    }

    .cta-content-wrapper {
        max-width: 360px;
        padding: 0 var(--spacing-xs);
    }

    .cta-content-wrapper h2 {
        font-size: 1.5rem;
        line-height: 1.05;
        margin-bottom: 0.4rem;
    }

    .cta-content-wrapper p {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }

    .cta-section .btn {
        display: block;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        margin: 0.35rem 0 0.35rem 0;
        /* vertical spacing only */
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    /* ensure stacked buttons align and have consistent spacing */
    .cta-section .btn+.btn {
        margin-left: 0;
        margin-top: -0.5rem;
        /* increased gap between stacked CTA buttons */
    }
}