@media (max-width: 1024px) {
    .nav-container {
        grid-template-columns: auto 1fr auto;
        padding: 0.5rem 1rem;
    }

    .nav-left {
        display: none;
    }

    .nav-social {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        justify-self: start;
    }

    .burger-line {
        background-color: var(--white);
    }

    .nav-center {
        justify-self: center;
    }

    .footer-nav {
        flex-wrap: wrap;
    }

    .section {
        padding: 3rem 1.5rem;
    }

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

    .mission-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .endeavors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .specialties-columns,
    .passions-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .motivated-section h2 {
        font-size: 2.7rem;
    }
    
    .motivated-section p {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }

    .nav {
        padding: 0.5rem;
    }

    .nav-container {
        gap: 1rem;
        align-items: center;
    }

    .nav-logo-img {
        height: 40px;
    }

    .mobile-menu {
        top: 70px; /* Match header height */
        height: calc(100vh - 70px);
        background-color: var(--secondary-color);
    }

    .mobile-nav-section {
        margin-bottom: 1.5rem;
    }

    .mobile-nav-item {
        display: block;
        font-size: 1.25rem;
        color: var(--white);
        text-decoration: none;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
    }

    .mobile-nav-item.has-submenu::after {
        content: '\f107'; /* Font Awesome down arrow */
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        transition: transform var(--transition-default);
        color: var(--white);
    }

    .mobile-nav-item.has-submenu.active::after {
        transform: translateY(-50%) rotate(180deg);
    }

    .mobile-nav-item:hover {
        color: var(--light-accent-color);
    }

    .mobile-subnav {
        display: none;
        padding-left: 1rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        overflow: hidden;
        max-height: 0;
        transition: max-height var(--transition-default);
    }

    .mobile-subnav.active {
        display: block;
        max-height: 500px; /* Large enough to contain all content */
    }

    .mobile-subnav a {
        display: block;
        padding: 0.5rem 0;
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        font-size: 1rem;
        transition: color var(--transition-fast), padding var(--transition-fast);
    }

    .mobile-subnav a:hover {
        color: var(--white);
        padding-left: 0.5rem;
    }

    .mobile-social {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        padding: 1.5rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 1.5rem;
    }

    .mobile-social a {
        color: var(--white);
        font-size: 1.5rem;
        transition: color var(--transition-fast), transform var(--transition-fast);
    }

    .mobile-social a:hover {
        color: var(--light-accent-color);
        transform: translateY(-2px);
    }

    .footer {
        padding: 3rem 1.5rem 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-legal {
        flex-direction: column;
        gap: 1rem;
    }

    .social-links {
        justify-content: center;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .hero {
        min-height: calc(100vh - 70px);
        padding: 3rem 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .hero-cta {
        margin-top: 2rem;
    }

    .project-image,
    .endeavor-image {
        padding: 0.75rem 0.75rem 0 0.75rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-card,
    .endeavor-card {
        max-width: 100%;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .endeavors-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .motivated-section {
        padding: 4rem 1.5rem;
        background-attachment: scroll;
    }

    .motivated-section h2 {
        font-size: 2.2rem;
    }

    .motivated-section p {
        font-size: 1.4rem;
    }

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

    .mission-content,
    .project-description,
    .endeavor-description {
        font-size: 1rem;
    }

    .project-content,
    .endeavor-content {
        padding: 1.25rem;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

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

    .project-image,
    .endeavor-image {
        padding: 0.5rem 0.5rem 0 0.5rem;
    }

    .project-content h3,
    .endeavor-card h3 {
        font-size: 1.25rem;
    }

    .project-description,
    .endeavor-description {
        font-size: 0.95rem;
    }

    .project-content,
    .endeavor-content {
        padding: 1rem;
    }

    .project-category {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }

    .cta-button {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }

    .hero .cta-button.outline {
        margin-left: 0;
    }

    .hero-cta {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .motivated-section h2 {
        font-size: 2rem;
    }
    
    .motivated-section p {
        font-size: 1.2rem;
    }

    .mobile-menu-toggle {
        padding: 0.5rem 0;
    }

    .specialties-list li,
    .passions-list li {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .specialties-passions h3 {
        font-size: 1.3rem;
        margin-top: 1.5rem;
    }
}

/* Mobile Menu Active States */
.mobile-menu-toggle.active .burger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active .burger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .burger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Body State when Menu is Open */
body.menu-open {
    overflow: hidden;
}
