/* Apply box-sizing to all elements */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --flat-black: #4d4d4d;
    --light-gray: #e8e4e8;
    --whiteish: #fafafa;
    --flat-gray: #868682;
    --flat-green: #8aa685;
    --flat-red: #d66151;
    --light-gray-background: #d9d9d9;
}

@font-face {
    font-family: 'Glacial Indifference';
    src: url('../fonts/GlacialIndifference-Regular.woff2') format('woff2'),
         url('../fonts/GlacialIndifference-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Glacial Indifference';
    src: url('../fonts/GlacialIndifference-Bold.woff2') format('woff2'),
         url('../fonts/GlacialIndifference-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

html, body {
    font-family: 'Glacial Indifference', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray-background);
}

.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: 8px;
}

.div1 {
    grid-column: span 3 / span 3;
    display: flex;
    align-items: center;
    padding: 1rem;
    padding-left: 3rem;
}

.div2 {
    grid-column: span 4 / span 4;
    grid-column-start: 4;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
}

.div3 {
    grid-column: span 5 / span 5;
    grid-column-start: 8;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    padding: 1rem;
    padding-right: 3rem;
    flex-wrap: nowrap;
}

.div4 {
    grid-column: span 12 / span 12;
    grid-row: span 4 / span 4;
    grid-row-start: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 5rem;
    padding-bottom: 4rem;
}

.div5 {
    grid-column: span 12 / span 12;
    grid-row-start: 6;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    font-size: 1.75rem; /* Equivalent to ~28px */
    color: var(--flat-black);
    font-weight: normal;
}

.div6, .div7, .div8, .div9, .div10 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background-color: var(--light-gray-background);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 180px;
    aspect-ratio: 1/1;
}

.div6:hover, .div7:hover, .div8:hover, .div9:hover, .div10:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.div6 img, .div7 img, .div8 img, .div9 img, .div10 img {
    width: 64px;
    height: 64px;
    margin-bottom: 0.75rem;
}

.div6 p, .div7 p, .div8 p, .div9 p, .div10 p {
    margin: 0;
    font-size: 1rem;
    color: var(--flat-black);
    font-weight: 500;
}

.div6 {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
    grid-column-start: 2;
    grid-row-start: 7;
}

.div7 {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
    grid-column-start: 4;
    grid-row-start: 7;
}

.div8 {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
    grid-column-start: 6;
    grid-row-start: 7;
}

.div9 {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
    grid-column-start: 8;
    grid-row-start: 7;
}

.div10 {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
    grid-column-start: 10;
    grid-row-start: 7;
}

.div11 {
    grid-column: span 12 / span 12;
    grid-row: span 2 / span 2;
    grid-row-start: 9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    padding-top: 5rem;
    background-color: var(--light-gray-background);
}

.div12 {
    grid-column: span 12 / span 12;
    grid-row: span 2 / span 2;
    grid-row-start: 11;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--light-gray-background);
}

.div13 {
    grid-column: span 12 / span 12;
    grid-row: span 4 / span 4;
    grid-row-start: 13;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    padding-top: 5rem;
    background-color: var(--light-gray-background);
}

.div14 {
    grid-column: span 12 / span 12;
    grid-row: span 2 / span 2;
    grid-row-start: 17;
    display: flex;
    justify-content: space-between;
    padding: 3rem 2rem;
    background-color: var(--light-gray-background);
    color: var(--flat-black);
}

.div15 {
    grid-column: span 6 / span 6;
    grid-row-start: 20; /* Moved down one row to make space for the divider */
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--light-gray-background);
    color: var(--flat-black);
    position: relative;
}

/* Horizontal line between main footer and copyright section */
.footer-divider {
    grid-column: span 12 / span 12;
    grid-row-start: 19; /* Position between div14 (row 17) and div15/div16 (row 19) */
    height: 1px;
    background-color: var(--flat-gray);
    margin: 0 2rem;
}

.div16 {
    grid-column: span 6 / span 6;
    grid-column-start: 7;
    grid-row-start: 20; /* Moved down one row to make space for the divider */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    background-color: var(--light-gray-background);
    color: var(--flat-black);
    position: relative;
}

.copyright-text, .made-with-text {
    font-size: 0.9rem;
    margin: 0;
    font-family: 'Glacial Indifference', sans-serif;
}

/* Navbar Logo and Brand Name Styles */
#navbar-logo-container {
    gap: 0.5rem;
}

#navbar-logo {
    height: 2.5rem;
    width: auto;
}

#navbar-brand-name {
    color: #000;
    text-decoration: none;
    font-weight: normal;
    font-size: 1.25rem;
}

#navbar-brand-name:hover, #navbar-brand-name:active, #navbar-brand-name:visited {
    color: #000;
    text-decoration: none;
}

/* Navbar Menu Styles */
#navbar-menu {
    display: flex;
    align-items: center;
}

#navbar-menu a {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    position: relative;
}

#navbar-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--flat-black);
    transition: width 0.3s ease-in-out;
}

#navbar-menu a:hover::after {
    width: 100%;
}

#navbar-menu a:hover, #navbar-menu a:active, #navbar-menu a:visited {
    color: #000;
    text-decoration: none;
}

/* Navbar Actions Styles */
#navbar-actions {
    position: relative;
}

/* Search box styles */
#search-container {
    position: relative;
    display: inline-block;
    flex-shrink: 1;
}

#search-box {
    width: 180px;
    height: 32px;
    padding: 0 32px 0 8px;
    border: 1px solid var(--flat-gray);
    background-color: transparent;
    font-family: 'Glacial Indifference', sans-serif;
    font-size: 0.9rem;
}

#search-box:focus {
    outline: none;
    border: 1px solid var(--flat-black);
}

#search-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--flat-gray);
}

/* Pricing link style */
#menu-pricing {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    position: relative;
}

#menu-pricing::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--flat-black);
    transition: width 0.3s ease-in-out;
}

#menu-pricing:hover::after {
    width: 100%;
}

#menu-pricing:hover, #menu-pricing:active, #menu-pricing:visited {
    color: #000;
    text-decoration: none;
}

/* Button styles */
#login-button, #signup-button {
    padding: 0.5rem 1.2rem;
    border: none;
    font-family: 'Glacial Indifference', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
    min-width: 90px;
    text-align: center;
    display: inline-block;
    white-space: nowrap;
}

#login-button {
    background-color: var(--flat-gray);
    color: var(--light-gray);
}

#signup-button {
    background-color: var(--flat-green);
    color: var(--light-gray);
}

#login-button:hover, #signup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hero Section Styles */
#hero-section {
    background-color: #d9d9d9;
}

#hero-heading {
    font-size: 3.5rem; /* 56px equivalent */
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--flat-black);
}

#hero-subheading {
    font-size: 1.5rem; /* 24px equivalent */
    font-weight: normal;
    margin-bottom: 2.5rem;
    color: var(--flat-black);
}

#hero-cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

#get-started-button, #view-lessons-button {
    padding: 12px 24px;
    border: none;
    font-family: 'Glacial Indifference', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
}

#get-started-button {
    background-color: var(--flat-green);
    color: var(--light-gray);
}

#view-lessons-button {
    background-color: var(--whiteish);
    color: var(--flat-gray);
}

#get-started-button:hover, #view-lessons-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Section Content Styles */
.section-subheading {
    font-size: 1.75rem;
    font-weight: normal;
    margin-bottom: 1rem;
    color: var(--flat-black);
}

.section-description {
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 750px;
    margin-bottom: 1.5rem;
    color: var(--flat-black);
    text-align: justify;
}

.feature-icon {
    width: 80px;
    height: auto;
    margin-top: 1rem;
}

.git-commits-image {
    width: 100%;
    max-width: 800px;
    height: auto;
}

/* CTA Buttons Styles */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.cta-button {
    padding: 12px 24px;
    border: none;
    font-family: 'Glacial Indifference', sans-serif;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
}

#div13-get-started {
    background-color: var(--flat-green);
    color: var(--light-gray);
}

#div13-learn-more {
    background-color: var(--whiteish);
    color: var(--flat-gray);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Footer Styles */
#footer {
    font-family: 'Glacial Indifference', sans-serif;
}

.footer-left {
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

#footer-logo {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
}

#footer-brand-name {
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--flat-black);
}

.footer-description {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--flat-black);
    margin-top: 0.5rem;
}

.footer-right {
    display: flex;
    gap: 4rem;
}

.footer-links-group {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: normal;
    margin-bottom: 1rem;
    color: var(--flat-gray);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--flat-black);
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.2s ease;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--flat-gray);
    transition: width 0.3s ease-in-out;
}

.footer-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Styles */
#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    color: var(--flat-black);
    z-index: 2000;
}

#mobile-menu-toggle i {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* Mobile Menu Container */
.mobile-menu-container {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--light-gray-background);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1500;
    padding: 0 0 7rem 0; /* Extreme bottom padding to guarantee no overflow */
    flex-direction: column;
    align-items: center;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    /* Ensure sufficient height for all content */
    min-height: 550px; /* Increased minimum height */
    width: 100vw; /* Set to viewport width */
    max-width: 100%; /* Prevent overflow */
    /* Add a bottom element to ensure space at the end */
    position: relative; /* For absolute positioning of children if needed */
}

.mobile-menu-container.mobile-active {
    display: flex;
}

/* Add a pseudo-element to ensure there's always space at the bottom */
.mobile-menu-container::after {
    content: '';
    display: block;
    height: 4rem; /* Extra space at bottom */
    width: 100%;
    position: absolute;
    bottom: 0;
}

/* Mobile Search */
.mobile-menu-search {
    width: 100%;
    padding: 1rem 5%;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--flat-gray);
}

.mobile-search-container {
    position: relative;
    width: 90%; /* Reduce width to prevent overflow */
    max-width: 500px;
    margin: 0 auto;
    box-sizing: border-box; /* Ensure padding is included in width calculation */
}

#mobile-search-box {
    width: 100%;
    height: 40px;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--flat-gray);
    border-radius: 4px;
    font-family: 'Glacial Indifference', sans-serif;
    font-size: 1rem;
    background-color: var(--whiteish);
    color: var(--flat-black);
    transition: all 0.2s ease;
    box-sizing: border-box; /* Ensure padding is included in width calculation */
}

#mobile-search-box:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--flat-green);
    border-color: var(--flat-green);
}

#mobile-search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--flat-gray);
    pointer-events: none;
}

/* Mobile Menu Links */
.mobile-menu-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-size: 1.1rem;
    color: var(--flat-black);
    text-decoration: none;
    width: 100%;
    transition: background-color 0.2s ease;
}

.mobile-menu-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Mobile Menu Actions */
.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Further increase gap between buttons */
    width: 100%;
    padding: 1.5rem 5% 5rem 5%; /* Very large bottom padding */
    margin-bottom: 3rem; /* Large bottom margin for extra space */
    box-sizing: border-box; /* Ensure padding is included in width calculation */
    position: relative; /* For absolute positioning of children if needed */
}

.mobile-menu-button {
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 4px;
    font-family: 'Glacial Indifference', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 90%; /* Reduce width to prevent overflow */
    max-width: 500px;
    margin: 0 auto 1rem auto; /* Increase bottom margin for buttons */
    display: block;
    box-sizing: border-box; /* Ensure padding is included in width calculation */
}

.mobile-login {
    background-color: var(--flat-gray);
    color: var(--whiteish);
}

.mobile-signup {
    background-color: var(--flat-green);
    color: var(--whiteish);
    margin-bottom: 2rem; /* Extra margin for the last button */
}

.mobile-menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Desktop/Mobile visibility classes */
.desktop-only {
    display: initial;
}

.mobile-only {
    display: none;
}

/* Media Queries for Responsive Design */
/* Large Desktop */
@media (max-width: 1400px) {
    .div3 {
        gap: 1.2rem;
        padding-right: 2rem;
    }

    #login-button, #signup-button {
        min-width: 80px;
        padding: 0.5rem 1rem;
    }
}

/* Medium Desktop - Specific fix for 1246px width */
@media (max-width: 1246px) {
    #login-button, #signup-button {
        min-width: 80px;
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .div3 {
        gap: 0.9rem;
        padding-right: 1.2rem;
    }

    #search-box {
        width: 150px;
    }
}

/* Medium Desktop */
@media (max-width: 1280px) {
    .div1 {
        padding-left: 2rem;
    }

    .div2 {
        gap: 1.5rem;
    }

    .div3 {
        gap: 1rem;
        padding-right: 1.5rem;
    }

    #search-container {
        margin-right: 0.5rem;
    }

    #search-box {
        width: 160px;
    }

    #login-button, #signup-button {
        min-width: 70px;
        padding: 0.5rem 0.8rem;
    }
}

/* Small Desktop and Tablets */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(12, 1fr);
        gap: 4px;
    }

    .div1 {
        grid-column: span 2 / span 2;
        padding-left: 1rem;
    }

    .div2 {
        grid-column: span 4 / span 4;
        grid-column-start: 3;
        gap: 1rem;
    }

    .div3 {
        grid-column: span 6 / span 6;
        grid-column-start: 7;
        gap: 0.8rem;
        padding-right: 1rem;
    }

    #navbar-brand-name {
        font-size: 1.4rem;
    }

    #search-box {
        width: 120px;
    }

    #login-button, #signup-button {
        min-width: 70px;
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }

    #menu-pricing, #menu-topics, #menu-lessons, #menu-tools {
        font-size: 0.9rem;
    }
}

/* Additional intermediate breakpoint */
@media (max-width: 900px) {
    .div1 {
        grid-column: span 2 / span 2;
        padding-left: 0.8rem;
    }

    .div2 {
        grid-column: span 3 / span 3;
        grid-column-start: 3;
        gap: 0.8rem;
    }

    .div3 {
        grid-column: span 7 / span 7;
        grid-column-start: 6;
        gap: 0.6rem;
        padding-right: 0.8rem;
    }

    #navbar-brand-name {
        font-size: 1.3rem;
    }

    #search-box {
        width: 100px;
    }

    #login-button, #signup-button {
        min-width: 65px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    #menu-pricing, #menu-topics, #menu-lessons, #menu-tools {
        font-size: 0.85rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Show hamburger menu on mobile */
    #mobile-menu-toggle {
        display: flex;
    }

    /* Hide desktop-only elements on mobile */
    .desktop-only {
        display: none !important;
    }

    /* Mobile-specific adjustments */

    /* Show mobile-only elements on mobile */
    .mobile-only {
        display: initial !important;
    }

    /* Adjust logo container for mobile */
    .div1 {
        grid-column: span 12 / span 12;
        padding: 1rem 2rem;
        justify-content: space-between;
    }

    /* Set up baseline for the navigation divs in mobile */
    div.div2, div.div3 {
        display: none !important;
        grid-column: 1 / -1 !important;
        grid-row: initial !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Position the mobile menu as an overlay when active */
    div#navbar-menu, div#navbar-actions {
        display: none !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        background-color: var(--light-gray-background) !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    }

    /* Define the active state rules separately with simpler selectors */
    .mobile-active {
        display: block !important;
        position: absolute !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
        opacity: 1 !important;
    }

    /* Mobile menu active state with simpler specificity */
    #navbar-menu.mobile-active, #navbar-actions.mobile-active {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        padding: 1rem 0 !important;
    }

    /* Ensure the links inside the mobile menu are visible */
    #navbar-menu.mobile-active a, #navbar-actions.mobile-active a, #navbar-actions.mobile-active button {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Navbar menu links in mobile view */
    #navbar-menu.mobile-active {
        border-bottom: 1px solid var(--flat-gray);
        padding: 0.5rem 0;
    }

    #navbar-menu.mobile-active a {
        display: block;
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
        margin: 0.25rem 0;
        font-size: 1.1rem;
    }

    /* Navbar actions in mobile view */
    #navbar-actions.mobile-active {
        gap: 1rem;
        padding: 1rem 0;
    }

    #search-container {
        width: 80%;
        max-width: 300px;
        margin: 0.5rem 0;
    }

    #search-box {
        width: 100%;
    }

    #login-button, #signup-button {
        margin: 0.5rem 0;
        width: 80%;
        max-width: 300px;
    }

    /* Adjust other sections for mobile */
    .div4, .div5, .div11, .div13 {
        padding: 2rem 1rem;
    }
    
    /* Ensure div11, div12, and div13 are properly positioned on mobile */
    .div11 {
        grid-column: 1 / span 12 !important;
        grid-row: 10 / span 2 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }
    
    .div11 .section-subheading,
    .div11 .section-description {
        width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .div11 .feature-icon {
        width: 80px;
        height: auto;
        margin: 1rem auto;
        display: block;
    }
    
    .div12 {
        grid-column: 1 / span 12 !important;
        grid-row: 12 / span 2 !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .div13 {
        grid-column: 1 / span 12 !important;
        grid-row: 14 / span 4 !important;
    }
    
    .div13 .feature-icon {
        width: 80px;
        height: auto;
        margin: 1rem auto;
        display: block;
    }

    #hero-heading {
        font-size: 2.5rem;
    }

    #hero-subheading {
        font-size: 1.2rem;
    }

    #hero-cta-buttons, .cta-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        align-items: center;
    }

    #get-started-button, #view-lessons-button, .cta-button {
        width: 80%;
        max-width: 300px;
    }

    /* Footer adjustments for mobile */
    .div14 {
        grid-column: 1 / span 12 !important;
        grid-row: 18 / span 2 !important;
        flex-direction: column;
    }

    .footer-right {
        margin-top: 2rem;
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: center;
    }

    /* Ensure navigation links from hamburger menu don't overlap with footer content */
    .container {
        position: relative;
        padding-top: 0; /* Reset any padding that might create space */
        overflow-x: hidden; /* Prevent horizontal scrolling */
        grid-template-columns: repeat(12, 1fr);  /* Ensure 12 column grid on mobile */
    }

    .div15, .div16 {
        text-align: center;
        justify-content: center;
        grid-column: 1 / span 12 !important;
        grid-row: 20 / span 1 !important;
        padding: 1rem;
    }
    
    .footer-divider {
        grid-column: 1 / span 12 !important;
        grid-row: 19 / span 1 !important;
    }

    /* Testing feature cards adjustments - 2 column layout */
    .div6, .div7, .div8, .div9, .div10 {
        aspect-ratio: auto;
        height: auto;
        padding: 1rem;
        grid-column: span 6 / span 6;
        margin: 0.5rem 0;
        grid-row: span 1 / span 1;
    }
    
    /* Position cards in 2 columns */
    .div6 {
        grid-column-start: 1;
        grid-row-start: 7;
    }
    
    .div7 {
        grid-column-start: 7;
        grid-row-start: 7;
    }
    
    .div8 {
        grid-column-start: 1;
        grid-row-start: 8;
    }
    
    .div9 {
        grid-column-start: 7;
        grid-row-start: 8;
    }
    
    .div10 {
        grid-column: span 6 / span 6;
        grid-column-start: 4;
        grid-row-start: 9;
    }
    
    /* Adjust image and text sizes for mobile */
    .div6 img, .div7 img, .div8 img, .div9 img, .div10 img {
        width: 48px;
        height: 48px;
        margin-bottom: 0.5rem;
    }
    
    .div6 p, .div7 p, .div8 p, .div9 p, .div10 p {
        font-size: 0.85rem;
        line-height: 1.2;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    /* Stack technique cards in 2 columns on very small screens */
    .div6, .div7, .div8, .div9, .div10 {
        grid-column: span 6 / span 6;
        padding: 0.75rem;
    }
    
    .div6, .div8, .div10 {
        grid-column-start: 1;
    }
    
    .div7, .div9 {
        grid-column-start: 7;
    }
    
    /* Even smaller screens - single column */
    @media (max-width: 360px) {
        .div6, .div7, .div8, .div9, .div10 {
            grid-column: span 12 / span 12;
            grid-column-start: 1;
        }
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(77, 77, 77, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--whiteish);
    border-radius: 8px;
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--flat-gray);
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--flat-black);
}

.modal-close i {
    width: 24px;
    height: 24px;
}

.modal-title {
    font-size: 2rem;
    color: var(--flat-black);
    margin: 0 0 1rem 0;
    font-weight: bold;
    text-align: center;
}

.modal-description {
    font-size: 1.125rem;
    color: var(--flat-gray);
    margin: 0 0 2rem 0;
    line-height: 1.6;
    text-align: center;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-input {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    font-family: 'Glacial Indifference', sans-serif;
    transition: border-color 0.2s ease;
    background-color: var(--whiteish);
}

.modal-input:focus {
    outline: none;
    border-color: var(--flat-green);
}

.modal-input::placeholder {
    color: var(--flat-gray);
}

.modal-submit {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    background-color: var(--flat-green);
    color: var(--whiteish);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Glacial Indifference', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(138, 166, 133, 0.3);
}

.modal-success {
    text-align: center;
    color: var(--flat-green);
    font-size: 1.125rem;
    margin: 1rem 0 0 0;
    font-weight: bold;
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 2rem;
        margin: 1rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-description {
        font-size: 1rem;
    }
}
