/* Mobile-Responsive Styles for Morphology Website */

/* Hamburger Menu Button */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    width: 30px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Responsive Breakpoints */
@media (max-width: 768px) {
    /* Show hamburger menu on mobile */
    .mobile-menu-toggle {
        display: block;
    }

    /* Navbar adjustments */
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .nav-brand {
        gap: 0.5rem;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
    }

    .brand-title {
        font-size: 1.2rem;
    }

    /* Hide nav links by default on mobile */
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-teal) 100%);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem 1rem;
        gap: 0;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 0 4px 20px var(--shadow-dark);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
        margin: 0.5rem 0;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    /* Music toggle button positioning */
    .music-toggle {
        position: absolute;
        right: 70px;
        top: 50%;
        transform: translateY(-50%);
    }

    /* Hero Section */
    .hero-section {
        min-height: 60vh;
        padding: 2rem 1rem;
    }

    .anemo-symbol {
        width: 80px;
        height: 80px;
    }

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

    .subtitle {
        font-size: 1.2rem;
    }

    .author {
        font-size: 1rem;
    }

    /* Content Cards */
    .main-content {
        padding: 1rem;
    }

    .content-card {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .card-content p {
        font-size: 1rem;
    }

    /* Page Title */
    .page-title {
        font-size: 2rem;
    }

    /* Objective Cards */
    .objective-grid {
        grid-template-columns: 1fr;
    }

    .objective-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .objective-number {
        margin-bottom: 1rem;
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Comparison Cards */
    .comparison-container {
        flex-direction: column;
        gap: 2rem;
    }

    .comparison-card {
        width: 100%;
    }

    .vs-divider {
        transform: rotate(90deg);
        margin: 1rem 0;
    }

    /* Examples Grid */
    .examples-grid {
        grid-template-columns: 1fr;
    }

    /* Activity Section */
    .activity-container {
        padding: 1.5rem;
    }

    .word-input {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .submit-btn,
    .reset-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* Navigation Footer */
    .navigation-footer {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .btn-prev,
    .btn-next {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }

    .btn-prev {
        order: 2;
    }

    .btn-next {
        order: 1;
    }

    /* Decorative Elements - reduce on mobile */
    .decorative-element {
        width: 150px;
        height: 150px;
    }

    /* Tables */
    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.6rem;
    }

    /* Example Boxes */
    .example-box,
    .definition {
        font-size: 0.95rem;
        padding: 1rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .nav-container {
        padding: 0.8rem 1rem;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-icon {
        width: 28px;
        height: 28px;
    }

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

    .subtitle {
        font-size: 1rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .card-header h2 {
        font-size: 1.3rem;
    }

    .content-card {
        padding: 1rem;
    }

    .objective-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .anemo-symbol {
        width: 60px;
        height: 60px;
    }

    .music-toggle {
        right: 60px;
    }

    .hamburger {
        width: 25px;
        height: 18px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 80vh;
    }

    .nav-links {
        height: calc(100vh - 60px);
        top: 60px;
        padding: 1rem;
    }

    .nav-link {
        padding: 0.7rem;
        margin: 0.3rem 0;
    }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}
