/* Responsive Styles for All Components */

/* Home Page Responsive */
@media (max-width: 1200px) {
    .hero-content {
        gap: 3rem;
    }
    
    .book-hero-image {
        height: 380px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .companion-section {
        padding-left: 1rem;
    }
    
    .book-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    
    .book-info-section {
        padding-left: 0;
        text-align: center;
    }
    
    .quiz-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 968px) {
    .book-integration-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .companion-section {
        padding-left: 0;
        order: 1;
    }
    
    .book-section {
        order: 2;
    }
    
    .equshaala-logo {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .book-hero-image {
        height: 320px;
    }
    
    /* PDF Preview responsive */
    .book-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .pdf-preview-section {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .book-info-section {
        order: 2;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    /* Home Page */
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .quizzes-section {
        padding: 3rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .book-hero-image {
        height: 280px;
    }
    
    .equshaala-logo-image {
        height: 60px;
    }
    
    .quiz-cards-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 500px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn-book-details {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .book-integration-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 0.8rem;
    }
    
    .feature-icon {
        font-size: 1.5rem;
    }
    
    /* Book Details */
    .book-details-container {
        padding: 1rem;
    }
    
    .book-hero {
        padding: 1.5rem;
        margin-bottom: 2rem;
        grid-template-columns: 1fr;
    }
    
    .book-title {
        font-size: 2.2rem;
    }
    
    .book-subtitle {
        font-size: 1.1rem;
    }
    
    .book-description p {
        font-size: 1.1rem;
    }
    
    .quiz-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .quiz-card {
        padding: 1.5rem;
    }
    
    .impact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .book-impact {
        padding: 2rem 1.5rem;
    }
    
    .call-to-action {
        padding: 2rem 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary-large,
    .btn-secondary-large {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* PDF Preview */
    .pdf-preview-section {
        padding: 1rem;
    }
    
    .pdf-viewer-container {
        max-height: 400px;
    }
    
    .pdf-thumbnails {
        gap: 0.25rem;
    }
    
    .pdf-thumbnail {
        width: 45px;
        height: 60px;
    }
    
    /* Quiz Interface */
    .logo-image {
        height: 70px;
    }
    
    .quiz-logo {
        padding: 0.75rem 0;
    }
    
    .quiz-content {
        padding: 1rem;
        align-items: flex-start;
        min-height: auto;
    }
    
    .field-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .welcome-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .text-input,
    .email-input {
        font-size: 1.1rem;
        padding: 0.75rem 0;
    }
    
    .choice-option {
        padding: 0.9rem;
        margin-bottom: 0.75rem;
        transform: none !important;
    }
    
    .choice-option:hover {
        transform: none !important;
    }
    
    .choice-option.selected {
        transform: none !important;
        scale: 1 !important;
    }
    
    .choice-letter {
        width: 30px;
        height: 30px;
        margin-right: 0.75rem;
        font-size: 0.9rem;
    }
    
    .choice-text {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .choice-checkmark {
        font-size: 1.2rem;
    }
    
    /* Compact layout responsive */
    .choices-container.compact {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .choices-container.compact .choice-option {
        flex-direction: row;
        text-align: left;
        padding: 0.9rem;
        min-height: auto;
        justify-content: flex-start;
    }
    
    .choices-container.compact .choice-letter {
        margin-right: 0.75rem;
        margin-bottom: 0;
    }
    
    .choices-container.compact .choice-text {
        text-align: left;
        flex: 1;
    }
    
    .choices-container.compact .choice-checkmark {
        position: static;
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    /* Home Page */
    .hero-section {
        padding: 1.5rem 0.75rem;
    }

    /* Mobile Order Maintained: Title ? LOTLO ? Description ? Button */
    .hero-content {
        padding: 1rem;
        display: flex;
        flex-direction: column;
    }

    .companion-section {
        order: 1;
        display: flex;
        flex-direction: column;
    }

    .hero-title {
        order: 1;
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .book-section {
        order: 2;
        margin: 0 0 1rem 0;
        padding: 1rem;
    }

    .hero-description {
        order: 3;
        font-size: 0.9rem;
        padding: 0.75rem;
        margin: 1rem 0;
    }

    .book-cta {
        order: 4;
        margin: 1rem 0 0 0;
    }

    .book-hero-image {
        height: 240px;
    }

    .equshaala-logo-image {
        height: 50px;
    }

    .btn-book-details {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        box-sizing: border-box;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .quiz-card {
        padding: 1.25rem;
    }

    .quiz-title {
        font-size: 1.2rem;
    }

    .quiz-icon {
        font-size: 2.5rem;
    }

    .feature-item {
        padding: 0.6rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .feature-text {
        font-size: 0.9rem;
    }

    /* Book Details */
    .book-hero {
        padding: 1rem;
    }

    .book-title {
        font-size: 2rem;
    }

    .book-subtitle {
        font-size: 1rem;
    }

    .book-description p {
        font-size: 1rem;
    }

    .book-highlights li {
        font-size: 1rem;
    }

    .quiz-card {
        padding: 1.25rem;
    }

    .quiz-card h3 {
        font-size: 1.2rem;
    }

    .impact-item {
        padding: 1.5rem;
    }

    .impact-icon {
        font-size: 2rem;
    }

    .call-to-action {
        padding: 1.5rem 1rem;
    }

    .call-to-action h2 {
        font-size: 1.8rem;
    }

    .btn-primary-large,
    .btn-secondary-large {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    /* PDF Preview */
    .pdf-preview-section {
        padding: 0.75rem;
    }

    .pdf-viewer-container {
        max-height: 300px;
    }

    .pdf-thumbnails {
        gap: 0.2rem;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .pdf-thumbnail {
        width: 35px;
        height: 45px;
        flex-shrink: 0;
    }

    .pdf-purchase-cta {
        padding: 1rem;
    }

    .purchase-message {
        font-size: 0.9rem;
    }

    .btn-purchase {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Quiz Interface */
    .quiz-content {
        padding: 0.75rem;
    }

    .logo-image {
        height: 60px;
    }

    .field-title {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

    .choice-option {
        padding: 0.75rem;
    }

    .choice-letter {
        width: 28px;
        height: 28px;
        margin-right: 0.5rem;
        font-size: 0.85rem;
    }

    .choice-text {
        font-size: 0.9rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .results-header h1 {
        font-size: 1.4rem;
    }

    .category-name {
        font-size: 1.6rem;
    }

    .results-message {
        font-size: 1rem;
        padding: 1.25rem;
    }
}

/* Thank You Screen Responsive */
@media (max-width: 768px) {
    .thankyou-description {
        font-size: 1rem;
    }
    
    .email-sent-message {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .thankyou-title {
        font-size: 1.5rem;
    }
    
    .thankyou-icon {
        font-size: 2.5rem;
    }
    
    .thankyou-description {
        font-size: 0.9rem;
    }
    
    .email-sent-message {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

/* Enhanced Mobile Responsive Fixes */

/* Fix for text wrapping and overflow issues */
@media (max-width: 768px) {
    .home-container {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Hero Section Mobile Layout Override */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* Mobile Order: Title ? LOTLO ? Description ? Button */
    .companion-section {
        order: 1;
        padding-left: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .hero-title {
        order: 1;
        font-size: 2rem;
        line-height: 1.1;
        word-wrap: break-word;
        word-break: break-word;
        margin-bottom: 2rem;
    }

    .book-section {
        order: 2;
        padding: 1.5rem;
        width: 100%;
        box-sizing: border-box;
        margin: 0 0 1rem 0;
    }

    .hero-description {
        order: 3;
        font-size: 1rem;
        padding: 1rem;
        line-height: 1.6;
        word-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        text-align: left;
        margin: 1rem 0;
    }

    .book-cta {
        order: 4;
        margin: 1.5rem 0 0 0;
        width: 100%;
    }

    .book-hero-image {
        height: 280px;
        max-width: 100%;
    }

    .highlight-text {
        word-wrap: break-word;
        word-break: break-word;
        display: inline;
        white-space: normal;
    }

    /* Fix digital buddy section */
    .digital-buddy-text {
        font-size: 1rem;
        padding: 0 1rem;
        line-height: 1.6;
        word-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    .digital-buddy-content {
        padding: 2rem 1rem;
        max-width: 100%;
        overflow: hidden;
    }

    .section-description {
        font-size: 1rem;
        padding: 1rem;
        line-height: 1.6;
        word-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Fix feature items */
    .feature-text {
        font-size: 0.9rem;
        line-height: 1.4;
        word-wrap: break-word;
        word-break: break-word;
    }

    .feature-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Quiz cards mobile fix */
    .quiz-description {
        font-size: 0.9rem;
        line-height: 1.5;
        word-wrap: break-word;
        word-break: break-word;
    }

    .quiz-title {
        font-size: 1.2rem;
        line-height: 1.3;
        word-wrap: break-word;
    }

    /* Ensure buttons don't overflow */
    .btn-book-details {
        padding: 1rem 2rem;
        font-size: 1rem;
        word-wrap: break-word;
        text-align: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .hero-description {
        font-size: 0.9rem;
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .hero-title {
        font-size: 1.7rem;
        margin-bottom: 1rem;
    }

    .digital-buddy-text {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .section-description {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .digital-buddy-content {
        padding: 1.5rem 0.5rem;
    }

    .quizzes-section {
        padding: 2rem 0.5rem;
        margin: 1.5rem 0.25rem;
    }

    .feature-item {
        padding: 0.75rem;
    }

    .feature-text {
        font-size: 0.85rem;
    }

    /* Ensure buttons don't overflow */
    .btn-book-details {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        word-wrap: break-word;
        text-align: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Ultra small screens */
@media (max-width: 360px) {
    .hero-description,
    .digital-buddy-text,
    .section-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-content,
    .digital-buddy-content {
        padding: 0.75rem;
    }

    .btn-book-details {
        font-size: 0.8rem;
        padding: 0.7rem 1rem;
    }
}