/* ===================================================================
   ABOUT PAGE - COMPREHENSIVE RESPONSIVE FIXES
   Desktop & Mobile Optimization
   =================================================================== */

/* ===================================================================
   DESKTOP OPTIMIZATIONS
   =================================================================== */

/* Ultra-Wide Desktop (1920px+) */
@media (min-width: 1921px) {

    .dimple-intro-section,
    .about-gallery-section,
    .how-it-began-section,
    .what-makes-different-section,
    .about-home-studio-section,
    .testimonial-slider-section,
    .final-cta {
        max-width: 1920px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .container {
        max-width: 1400px !important;
    }

    .dimple-intro-grid {
        gap: 100px !important;
    }

    .dimple-intro-text h1 {
        font-size: 42px !important;
    }

    .dimple-intro-text p {
        font-size: 20px !important;
        line-height: 32px !important;
    }
}

/* Large Desktop (1600px - 1920px) */
@media (min-width: 1600px) and (max-width: 1920px) {
    .dimple-intro-grid {
        gap: 90px !important;
    }

    .standard-section-title {
        font-size: 34px !important;
    }
}

/* Medium Desktop (1200px - 1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .dimple-intro-grid {
        gap: 60px !important;
    }

    .dimple-intro-text h1 {
        font-size: 34px !important;
    }

    .dimple-intro-image {
        max-width: 400px !important;
    }

    /* Testimonial adjustments */
    .testimonial-content {
        grid-template-columns: 220px 1fr !important;
        gap: 35px !important;
    }
}

/* Standard Desktop (993px - 1199px) */
@media (min-width: 993px) and (max-width: 1199px) {
    .dimple-intro-section {
        min-height: auto !important;
        padding: 50px 20px 60px !important;
    }

    .dimple-intro-grid {
        gap: 50px !important;
    }

    .dimple-intro-text h1 {
        font-size: 32px !important;
    }

    .dimple-intro-text p {
        font-size: 17px !important;
        line-height: 26px !important;
    }

    .dimple-intro-image {
        max-width: 350px !important;
    }

    /* Gallery adjustments */
    .gallery-row[style*="repeat(3"] {
        gap: 15px !important;
    }

    /* Home Studio features - 2 columns for medium screens */
    .about-home-studio-section div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }

    /* Testimonials - single column for better readability */
    .testimonial-content {
        grid-template-columns: 1fr !important;
        padding: 35px !important;
    }

    .testimonial-image img {
        max-width: 400px !important;
        margin: 0 auto !important;
        display: block !important;
    }
}

/* ===================================================================
   TABLET OPTIMIZATIONS (769px - 992px)
   =================================================================== */

@media (min-width: 769px) and (max-width: 992px) {

    /* Hero Section */
    .dimple-intro-section {
        min-height: auto !important;
        padding: 40px 20px !important;
    }

    .dimple-intro-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        text-align: center !important;
    }

    .dimple-intro-text {
        padding-right: 0 !important;
        order: 1 !important;
    }

    .dimple-intro-image {
        max-width: 450px !important;
        margin: 0 auto !important;
        order: 2 !important;
    }

    .dimple-intro-text h1 {
        font-size: 36px !important;
    }

    /* Gallery - 2 columns */
    .gallery-row[style*="repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .gallery-row[style*="1fr 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .gallery-row[style*="2fr 1fr 2fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Timeline - Center aligned */
    .timeline-container {
        padding: 0 30px !important;
    }

    /* Difference Cards - 2 visible at once */
    .difference-slider-container {
        padding: 0 50px !important;
    }

    .difference-card {
        min-width: calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
    }

    /* Studio Features - 2 columns */
    .about-home-studio-section div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }

    /* Testimonials - Single Column */
    .testimonial-content {
        grid-template-columns: 1fr !important;
        padding: 30px !important;
    }

    .testimonial-image img {
        max-width: 350px !important;
        height: 300px !important;
        margin: 0 auto !important;
        display: block !important;
    }
}

/* ===================================================================
   MOBILE OPTIMIZATIONS (up to 768px)
   =================================================================== */

@media (max-width: 768px) {

    /* Ensure no horizontal scroll */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Hero Section - Mobile */
    .dimple-intro-section {
        min-height: auto !important;
        padding: 30px 15px !important;
    }

    .dimple-intro-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important;
    }

    .dimple-intro-text {
        order: 1 !important;
        padding-right: 0 !important;
    }

    .dimple-intro-image {
        order: 2 !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }

    .dimple-intro-text h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }

    .dimple-intro-text p {
        font-size: 16px !important;
        line-height: 26px !important;
        margin-bottom: 15px !important;
    }

    /* Section Titles */
    .standard-section-title {
        font-size: 24px !important;
        line-height: 30px !important;
    }

    /* Gallery - Single Column */
    .gallery-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        margin-bottom: 15px !important;
    }

    .gallery-row>div {
        aspect-ratio: auto !important;
        max-width: 100% !important;
    }

    .gallery-row>div img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* Timeline - Vertical Left-aligned */
    .timeline-container {
        padding: 0 15px !important;
    }

    .timeline-line {
        display: none !important;
    }

    .timeline-item {
        display: block !important;
        margin-bottom: 30px !important;
        padding-left: 40px !important;
        position: relative !important;
    }

    .timeline-item>div {
        width: 100% !important;
        padding: 0 !important;
        text-align: left !important;
    }

    .timeline-item>div:empty {
        display: none !important;
    }

    .timeline-item .timeline-dot {
        left: 10px !important;
        transform: none !important;
        margin-left: 0 !important;
        top: 5px !important;
    }

    .timeline-item h3,
    .timeline-item p {
        text-align: left !important;
    }

    .timeline-item h3 {
        font-size: 19px !important;
        margin-bottom: 8px !important;
    }

    .timeline-item p {
        font-size: 16px !important;
        line-height: 25px !important;
    }

    /* Difference Cards - Mobile Slider */
    .difference-slider-container {
        padding: 0 !important;
    }

    .difference-slider-container>button {
        width: 44px !important;
        height: 44px !important;
        z-index: 100 !important;
    }

    .difference-slider-container>button:first-of-type {
        left: 10px !important;
    }

    .difference-slider-container>button:last-of-type {
        right: 10px !important;
    }

    .difference-slider-track {
        padding: 15px 60px 25px !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none !important;
    }

    .difference-slider-track::-webkit-scrollbar {
        display: none !important;
    }

    .difference-card {
        width: calc(100vw - 140px) !important;
        min-width: calc(100vw - 140px) !important;
        max-width: 400px !important;
        flex-shrink: 0 !important;
        scroll-snap-align: center;
        padding: 24px 20px !important;
    }

    .difference-card h3 {
        font-size: 19px !important;
        line-height: 1.3 !important;
    }

    .difference-card p {
        font-size: 17px !important;
        line-height: 26px !important;
        text-align: left !important;
    }

    /* Home Studio - Single Column */
    .video-container {
        max-width: 100% !important;
        margin-bottom: 30px !important;
    }

    .about-home-studio-section div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .about-home-studio-section div[style*="border-top: 4px solid"] {
        padding: 28px 20px !important;
    }

    .about-home-studio-section h4 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }

    .about-home-studio-section p {
        font-size: 17px !important;
        line-height: 27px !important;
    }

    /* Testimonials - Mobile */
    .testimonial-content {
        grid-template-columns: 1fr !important;
        padding: 25px 18px !important;
        gap: 25px !important;
    }

    .testimonial-image img {
        height: 250px !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    .testimonial-text p {
        font-size: 17px !important;
        line-height: 27px !important;
        text-align: left !important;
    }

    .testimonial-author {
        padding-top: 20px !important;
        margin-top: 20px !important;
        gap: 12px !important;
    }

    .testimonial-author i {
        font-size: 32px !important;
    }

    .author-info h3 {
        font-size: 19px !important;
        margin-bottom: 4px !important;
    }

    .author-info p {
        font-size: 15px !important;
    }

    /* CTA Section */
    .final-cta {
        padding: 50px 15px !important;
    }

    .final-cta h2 {
        font-size: 26px !important;
        line-height: 32px !important;
    }

    .cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
    }

    .cta-buttons a {
        width: 100% !important;
        max-width: 300px !important;
        text-align: center !important;
    }

    /* Section Spacing */
    section {
        padding: 40px 15px !important;
    }

    .container {
        padding: 0 15px !important;
    }
}

/* ===================================================================
   SMALL MOBILE (up to 480px)
   =================================================================== */

@media (max-width: 480px) {

    /* Hero Section - Compact */
    .dimple-intro-section {
        padding: 25px 12px !important;
    }

    .dimple-intro-text h1 {
        font-size: 26px !important;
    }

    .dimple-intro-text p {
        font-size: 15px !important;
        line-height: 24px !important;
    }

    .dimple-intro-image {
        max-width: 250px !important;
    }

    /* Section Titles */
    .standard-section-title {
        font-size: 22px !important;
        line-height: 28px !important;
    }

    /* Timeline - Compact */
    .timeline-item {
        padding-left: 35px !important;
        margin-bottom: 25px !important;
    }

    .timeline-item h3 {
        font-size: 18px !important;
    }

    .timeline-item p {
        font-size: 15px !important;
        line-height: 24px !important;
    }

    /* Difference Cards - Smaller */
    .difference-card {
        width: calc(100vw - 100px) !important;
        min-width: calc(100vw - 100px) !important;
        padding: 20px 16px !important;
    }

    .difference-card h3 {
        font-size: 18px !important;
    }

    .difference-card p {
        font-size: 16px !important;
        line-height: 24px !important;
    }

    .difference-slider-track {
        padding: 12px 50px 22px !important;
    }

    .difference-slider-container>button {
        width: 40px !important;
        height: 40px !important;
    }

    /* Home Studio - Compact */
    .about-home-studio-section div[style*="border-top: 4px solid"] {
        padding: 24px 16px !important;
    }

    .about-home-studio-section h4 {
        font-size: 18px !important;
    }

    .about-home-studio-section p {
        font-size: 16px !important;
        line-height: 25px !important;
    }

    /* Testimonials - Compact */
    .testimonial-content {
        padding: 20px 15px !important;
    }

    .testimonial-image img {
        height: 220px !important;
    }

    .testimonial-text p {
        font-size: 16px !important;
        line-height: 25px !important;
    }

    .author-info h3 {
        font-size: 18px !important;
    }

    .author-info p {
        font-size: 14px !important;
    }

    /* CTA Section */
    .final-cta h2 {
        font-size: 24px !important;
        line-height: 30px !important;
    }

    .final-cta p {
        font-size: 16px !important;
    }

    /* Section Spacing */
    section {
        padding: 35px 12px !important;
    }
}

/* ===================================================================
   EXTRA NAVIGATION & GENERAL FIXES
   =================================================================== */

/* Ensure buttons are properly sized on all devices */
.btn-enquire,
.cta-btn,
.cta-btn-secondary {
    padding: 12px 30px !important;
    font-size: 16px !important;
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {

    .btn-enquire,
    .cta-btn,
    .cta-btn-secondary {
        padding: 14px 28px !important;
        font-size: 15px !important;
        width: auto;
        display: inline-block;
    }
}

/* Fix for potential overflow issues */
.dimple-intro-section,
.about-gallery-section,
.how-it-began-section,
.what-makes-different-section,
.about-home-studio-section,
.testimonial-slider-section,
.final-cta {
    position: relative;
    overflow-x: hidden;
}

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for decorative elements on small screens */
@media (max-width: 768px) {

    .dimple-intro-image>div:first-child,
    .dimple-intro-image>div:nth-child(2) {
        width: 60px !important;
        height: 60px !important;
    }

    .dimple-intro-image>div:last-child {
        right: -15px !important;
        bottom: 15px !important;
        padding: 10px 16px !important;
        font-size: 12px !important;
    }
}