/* Enhanced Mobile-First Responsive Design */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Header Responsive Structure */
@media (max-width: 992px) {
    .header-content {
        position: relative;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }

    .nav-container {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

    .nav-container.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        flex-direction: column;
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 15px 20px;
        transition: background 0.3s ease;
    }

    .nav-menu a:hover {
        background: rgba(255,255,255,0.1);
    }

    .header-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .order-nav {
        display: flex !important;
    }

    .login-btn, .place-order-btn {
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    /* Order page specific mobile adjustments */
    body.order-page .nav-menu {
        display: none !important;
    }
    
    body.order-page .header-actions {
        flex-direction: row;
        border-top: none;
        padding: 10px 20px;
    }
    
    body.order-page .login-btn {
        width: auto;
        flex: 1;
    }
    
    body.order-page .mobile-menu-toggle {
        display: none;
    }
}

/* Hero Section Mobile Improvements */
@media (max-width: 992px) {
    .hero {
        padding: 140px 0 80px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .hero-text {
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .hero-animation {
        margin-left: 0;
        padding-left: 0;
        display: flex;
        justify-content: center;
        transform: translateX(20px);
    }
    
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }

    /* Hero CTA button improvements */
    .hero-cta {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        font-size: 1.1rem;
        padding: 15px 30px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .hero-cta {
        font-size: 1rem;
        padding: 12px 25px;
    }

    /* Book animation responsive adjustments */
    .book {
        width: 200px;
        height: 280px;
        
    }
    
    .book-spine {
        height: 280px;
    }
    
    .book-cover {
        width: 200px;
        height: 280px;
        padding: 15px;
    }
    
    .book-pages {
        width: 190px;
        height: 270px;
        padding: 20px;
    }
    
    .book-cover h1 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .content-text {
        font-size: 16px;
    }
    
    .guarantee-badge {
        font-size: 11px;
        padding: 8px 15px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 110px 0 50px;
    }

    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.4;
    }
    
    .hero p {
        font-size: 0.95rem;
    }

    .hero-cta {
        font-size: 0.95rem;
        padding: 12px 20px;
    }

    /* Smaller book for mobile */
    .book {
        width: 160px;
        height: 220px;
    }
    
    .book-spine {
        height: 220px;
        width: 12px;
        left: -6px;
    }
    
    .book-cover {
        width: 160px;
        height: 220px;
        padding: 10px;
    }
    
    .book-pages {
        width: 150px;
        height: 210px;
        padding: 15px;
    }
    
    .book-cover h1 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .book-cover .subtitle {
        font-size: 10px;
    }
    
    .content-text {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .guarantee-badge {
        font-size: 10px;
        padding: 6px 12px;
    }
}

/* Features Grid Responsiveness */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .feature-card {
        padding: 25px 20px;
        margin: 0 10px;
    }

    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
}

/* Steps Container Responsiveness */
@media (max-width: 768px) {
    .steps-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .step-item {
        padding: 20px 15px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 15px;
    }
}

/* Tutors Carousel Mobile */
@media (max-width: 768px) {
    .tutors-carousel {
        padding: 20px 10px;
        gap: 20px;
    }

    .tutor-card {
        min-width: 280px;
        max-width: 300px;
    }

    .tutor-image {
        height: 150px;
        font-size: 36px;
    }

    .tutor-info {
        padding: 15px;
    }
}

/* Reviews Grid Mobile */
@media (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .review-card {
        padding: 20px;
        margin: 0 10px;
    }
}

/* Order Form Mobile Improvements */
@media (max-width: 768px) {
    .order-page {
        padding: 100px 0 30px;
    }

    .order-container {
        margin: 0 15px;
        border-radius: 10px;
    }
    
    .order-form {
        padding: 20px;
    }
    
    .form-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .form-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group input, 
    .form-group select, 
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .price-display {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .price-amount {
        font-size: 28px;
    }
    
    .payment-amount-options {
        flex-direction: column;
        gap: 15px;
    }

    .payment-option label {
        padding: 15px;
    }

    .complete-order-btn {
        font-size: 16px !important;
        padding: 16px !important;
    }
    
    .order-header h1 {
        font-size: 2rem;
    }

    .order-header p {
        font-size: 1rem;
    }

    /* File upload mobile */
    .file-upload {
        padding: 30px 15px;
    }

    .file-upload i {
        font-size: 2rem;
        margin-bottom: 10px;
        color: #6b7280;
    }
}

/* Floating Buttons Mobile */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }

    .float-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .floating-buttons {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }

    .float-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Section Spacing Mobile */
@media (max-width: 768px) {
    .why-choose,
    .ratings,
    .steps,
    .tutors,
    .reviews,
    .faq,
    .about {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 35px;
        padding: 0 20px;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .why-choose,
    .ratings,
    .steps,
    .tutors,
    .reviews,
    .faq,
    .about {
        padding: 50px 0;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
}

/* Footer Mobile */
@media (max-width: 768px) {
    footer {
        padding: 40px 0 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section {
        padding: 0 20px;
    }

    .footer-section h3 {
        margin-bottom: 15px;
    }

    .footer-bottom {
        padding-top: 15px;
        font-size: 14px;
    }
}

/* Human Badge Mobile */
@media (max-width: 768px) {
    .human-badge {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 12px;
        border-radius: 25px;
    }
}

@media (max-width: 480px) {
    .human-badge {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin: 10px auto;
        text-align: center;
    }
}

/* Rating Circles Mobile */
@media (max-width: 768px) {
    .ratings-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 400px;
        margin: 40px auto 0;
    }

    .rating-circle {
        width: 100px;
        height: 100px;
        font-size: 20px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .rating-circle {
        width: 80px;
        height: 80px;
        font-size: 18px;
    }
}

/* FAQ Mobile Improvements */
@media (max-width: 768px) {
    .faq-container {
        margin: 0 10px;
    }

    .faq-question {
        padding: 15px;
        font-size: 15px;
    }

    .faq-answer {
        padding: 15px;
        font-size: 14px;
        line-height: 1.6;
    }
}

/* About Content Mobile */
@media (max-width: 768px) {
    .about-content {
        padding: 0 20px;
        text-align: left;
    }

    .about-content p {
        font-size: 15px;
        line-height: 1.7;
    }
}

/* Landscape Phone Optimizations */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        padding: 100px 0 40px;
    }

    .hero-content {
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }

    .hero-text {
        flex: 1;
        text-align: left;
        margin-bottom: 0;
    }

    .hero-animation {
        flex: 0 0 auto;
    }

    .book {
        width: 140px;
        height: 200px;
    }

    .book-spine {
        height: 200px;
    }

    .book-cover {
        width: 140px;
        height: 200px;
        padding: 8px;
    }

    .book-pages {
        width: 132px;
        height: 192px;
        padding: 12px;
    }
}