/* ============================================
   MOBILE REDESIGN - FIRST 3 SECTIONS
   Only applies to mobile devices (max-width: 768px)
   ============================================ */

/* ============================================
   SECTION 1: NEW HERO - SINGLE ROTATING ICON
   ============================================ */
@media (max-width: 768px) {
    /* Make the hero section take almost full viewport height */
    .new-hero-section {
        min-height: 90vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 0 !important;
        position: relative !important;
    }

    /* Stack elements vertically with the icon in the center */
    .new-hero {
        flex-direction: column !important;
        gap: 30px !important;
        width: 100% !important;
        padding: 0 20px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
    }

    /* Hide the left and right images, keep only one */
    .new-hero-image.left {
        display: none !important;
    }

    .new-hero-image.right {
        display: block !important;
        order: 2 !important; /* Place icon in the middle */
        flex: 0 0 auto !important;
    }

    /* Make the single icon large and prominent */
    .new-hero-image.right img {
        max-width: 280px !important;
        min-width: 280px !important;
        width: 80vw !important;
        height: auto !important;
        animation: continuousRotate 8s linear infinite !important;
    }

    /* Continuous rotation animation */
    @keyframes continuousRotate {
        from {
            transform: rotate(0deg);
        }
        to {
            transform: rotate(360deg);
        }
    }

    /* Remove hover rotation since we have continuous rotation */
    .new-hero-image.right:hover img {
        transform: none;
        animation: continuousRotate 8s linear infinite;
    }

    /* Position title above the icon */
    .new-hero-title {
        order: 1 !important;
        font-size: clamp(28px, 8vw, 48px) !important;
        font-weight: 900 !important;
        text-align: center !important;
        padding: 0 15px !important;
        margin: 0 !important;
        line-height: 1.3 !important;
        flex: 0 0 auto !important;
        flex-shrink: 0 !important;
    }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    .new-hero-section {
        min-height: 85vh !important;
    }

    .new-hero {
        gap: 25px !important;
    }

    .new-hero-image.right img {
        max-width: 240px !important;
        min-width: 240px !important;
        width: 75vw !important;
    }

    .new-hero-title {
        font-size: clamp(24px, 7vw, 40px) !important;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .new-hero-section {
        min-height: 80vh !important;
    }

    .new-hero {
        gap: 20px !important;
    }

    .new-hero-image.right img {
        max-width: 200px !important;
        min-width: 200px !important;
        width: 70vw !important;
    }

    .new-hero-title {
        font-size: clamp(20px, 6vw, 36px) !important;
    }
}

/* ============================================
   SECTION 2: IMAGE FLIP - MOBILE OPTIMIZATION
   ============================================ */
@media (max-width: 768px) {
    .image-flip-section {
        padding: 40px 0 !important;
        background-color: #000 !important;
    }

    .image-flip-container {
        flex-direction: column !important;
        gap: 30px !important;
        overflow-x: visible !important;
        align-items: center !important;
    }

    .image-flip-item {
        min-width: 100% !important;
        max-width: 320px !important;
        width: 85% !important;
        flex: 0 0 auto !important;
    }

    /* Make flip work on tap for mobile */
    .image-flip-item figure {
        cursor: pointer !important;
    }

    /* Larger text for better readability on mobile */
    .flip-description {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        padding: 5% !important;
    }

    .back-content {
        padding: 15% !important;
    }
}

@media (max-width: 480px) {
    .image-flip-section {
        padding: 30px 0 !important;
    }

    .image-flip-container {
        gap: 25px !important;
    }

    .image-flip-item {
        max-width: 280px !important;
        width: 90% !important;
    }

    .flip-description {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }
}

/* ============================================
   SECTION 3: MANTRA - MOBILE OPTIMIZATION
   ============================================ */
@media (max-width: 768px) {
    .mantra-section {
        padding: 50px 0 !important;
    }

    .mantra-container {
        flex-direction: column !important;
        gap: 40px !important;
        padding: 0 20px !important;
    }

    /* Center image section - make it prominent */
    .mantra-center {
        order: 1 !important;
        width: 100% !important;
        max-width: 350px !important;
        margin: 0 auto !important;
        flex: 0 0 auto !important;
    }

    .mantra-center img {
        max-width: 100% !important;
        border-radius: 20px !important;
    }

    .mantra-center-text {
        font-size: 3rem !important;
    }

    /* Left column - place after center */
    .mantra-left {
        order: 2 !important;
        width: 100% !important;
        gap: 30px !important;
        flex: 0 0 auto !important;
    }

    /* Right column - place last */
    .mantra-right {
        order: 3 !important;
        width: 100% !important;
        gap: 30px !important;
        flex: 0 0 auto !important;
    }

    /* Make mantra items more spacious */
    .mantra-item {
        flex-direction: row !important;
        text-align: left !important;
        gap: 15px !important;
        padding: 15px !important;
        background: rgba(50, 191, 199, 0.05) !important;
        border-radius: 12px !important;
        transition: background 0.3s ease !important;
    }

    .mantra-item:hover {
        background: rgba(50, 191, 199, 0.1) !important;
    }

    /* Icons on the left side */
    .mantra-item img {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
    }

    /* Content takes remaining space */
    .mantra-content {
        flex: 1 !important;
        text-align: left !important;
    }

    .mantra-content h3 {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
    }

    .mantra-content p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }

    /* RTL support for mobile */
    html[dir="rtl"] .mantra-item {
        flex-direction: row-reverse !important;
    }

    html[dir="rtl"] .mantra-content {
        text-align: right !important;
    }
}

@media (max-width: 480px) {
    .mantra-section {
        padding: 40px 0 !important;
    }

    .mantra-container {
        gap: 30px !important;
        padding: 0 15px !important;
    }

    .mantra-center {
        max-width: 300px !important;
    }

    .mantra-center-text {
        font-size: 2.5rem !important;
    }

    .mantra-left,
    .mantra-right {
        gap: 20px !important;
    }

    .mantra-item {
        padding: 12px !important;
    }

    .mantra-item img {
        width: 50px !important;
        height: 50px !important;
    }

    .mantra-content h3 {
        font-size: 1rem !important;
        margin-bottom: 6px !important;
    }

    .mantra-content p {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }
}

@media (max-width: 360px) {
    .mantra-section {
        padding: 30px 0 !important;
    }

    .mantra-container {
        gap: 25px !important;
    }

    .mantra-center {
        max-width: 260px !important;
    }

    .mantra-center-text {
        font-size: 2rem !important;
    }

    .mantra-item {
        padding: 10px !important;
        gap: 12px !important;
    }

    .mantra-item img {
        width: 45px !important;
        height: 45px !important;
    }

    .mantra-content h3 {
        font-size: 0.9rem !important;
    }

    .mantra-content p {
        font-size: 0.7rem !important;
    }
}

/* ============================================
   TOUCH INTERACTIONS FOR MOBILE
   ============================================ */
@media (max-width: 768px) {
    /* Add touch feedback for interactive elements */
    .new-hero-title,
    .mantra-item,
    .image-flip-item {
        -webkit-tap-highlight-color: rgba(50, 191, 199, 0.2);
    }

    /* Improve touch targets */
    .mantra-item,
    .image-flip-item figure {
        min-height: 44px; /* iOS recommended minimum touch target */
    }

    /* Smooth scrolling for better mobile experience */
    html {
        scroll-behavior: smooth;
    }
}
