/* ==========================================================================
   Instagram Promotional Section — New Redesign
   ========================================================================== */

.insta-promo-section {
    background-color: #fcfbfa; /* Clean warm white */
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0 2.5rem !important; /* Elongated 1cm top and bottom padding */
    font-family: 'Inter', sans-serif;
}

/* Big center glow */
.insta-glow-bg {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw; height: 80vw;
    background: radial-gradient(circle, rgba(240, 80, 48, 0.05) 0%, rgba(220, 39, 67, 0.03) 40%, rgba(255,255,255,0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* Background Doodles */
.doodle-bg {
    position: absolute;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}
.doodle-dumbbell { bottom: -5%; left: 1%; transform: rotate(-20deg) scale(0.7); }
.doodle-camera { top: 5%; left: 5%; transform: rotate(-15deg); opacity: 0.3; scale: 0.8; }
.doodle-insta-corner { display: none; }

/* Top Header */
.insta-journey-pill {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.insta-main-heading {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    line-height: 1.1;
    letter-spacing: -1px;
    color: #111827;
    margin-bottom: 0.5rem;
}

.insta-gradient-text {
    background: linear-gradient(90deg, #f05030 0%, #dc2743 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.insta-icon-gradient {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sunburst {
    position: absolute;
    top: 5px;
    width: 35px; height: 35px;
    pointer-events: none;
}
.sunburst-left { left: -45px; transform: rotate(-15deg); }
.sunburst-right { right: -45px; transform: rotate(15deg); }

.insta-subtitle-text {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto; /* Ensure centered */
}

/* Left Column - Profile Cards */
.insta-left-col {
    transform: translateX(-90px); /* Move significantly left */
}

.profile-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.8rem; /* Increased padding to make bigger */
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.08);
}

.profile-pic-ring {
    position: relative;
    width: 94px; height: 94px; /* Increased by 10% to fit larger image */
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    isolation: isolate; /* Ensures z-index:-1 stays inside this container */
}

/* The gradient ring behind the image */
.profile-pic-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    z-index: -1;
    opacity: 0; /* Only hide the ring initially */
}

.insta-scroll-reveal.in-view .profile-pic-ring::before {
    animation: storyUploadAnim 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 0.3s;
}

@keyframes storyUploadAnim {
    0% { opacity: 0; transform: scale(0.5) rotate(-180deg); }
    50% { opacity: 1; transform: scale(1.1) rotate(45deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.profile-pic {
    width: 86px; height: 86px; /* Increased size by 10% */
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff; /* Thick border hides the baked-in ring without clipping the logo */
    background-color: #fff;
}

.insta-logo-small {
    transform: translateY(-36px); /* Moved 0.6cm down from previous position */
}

.role-text { font-size: 0.75rem; color: #9ca3af; font-weight: 700; letter-spacing: 1px; }
.handle-text { font-size: 1.05rem; color: #1f2937; font-weight: 800; }

.topics-text {
    font-size: 0.95rem !important;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 20px;
}

.btn-profile-gradient {
    background: linear-gradient(90deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff !important;
    padding: 0.8rem; /* Reverted padding */
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem; /* Reverted font size so text fits */
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
    white-space: nowrap;
}
.btn-profile-gradient:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Features Row */
.features-row {
    border-top: 1px solid #f3f4f6;
    padding-top: 2rem;
}
.feature-col { flex: 1; min-width: 130px; margin-bottom: 1rem; }
.feature-col h6 { font-size: 0.95rem !important; }
.feature-col p { font-size: 0.8rem !important; }

.feat-icon-new {
    width: 45px; height: 45px;
    background: #ffe4e6;
    color: #e11d48;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto;
}
.feat-divider {
    width: 1px;
    background-color: #e5e7eb;
    margin: 0 1rem;
    height: 60px;
    align-self: center;
}

/* Base states for scroll reveal animations */
.insta-scroll-reveal { 
    opacity: 0; 
    filter: blur(8px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); 
}
.insta-scroll-reveal.in-view { 
    opacity: 1; 
    filter: blur(0);
}

/* Phone Mockup Area + Interactive Right Col */
.right-col-interactive {
    perspective: 2000px;
}

.insta-phone-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* iPhone 16 Pro Max 3D CSS Mockup */
.iphone-3d-scene {
    position: relative;
    width: 240px; /* Further reduced from 300px to significantly reduce vertical section height */
    max-width: 100%;
    margin: -20px auto 0; /* Shifted up by 0.5cm */
    left: 40px; /* Shifted right by 1cm */
    perspective: 2000px;
    opacity: 0;
    z-index: 5;
    transform: scale(0.9);
}

.iphone-3d-model {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Animations */
.iphone-3d-scene.do-spin {
    animation: sceneFade 0.5s forwards;
}

.iphone-3d-scene.do-spin .iphone-3d-model {
    animation: 
        spin3D 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
        float3D 6s ease-in-out 1.8s infinite alternate forwards;
}

@keyframes sceneFade {
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin3D {
    0% { transform: translateY(150px) rotateY(-200deg) rotateX(25deg) scale(0.5); }
    100% { transform: translateY(0) rotateY(-15deg) rotateX(5deg) scale(1.1); } /* End slightly tilted left */
}

@keyframes float3D {
    0%, 100% { transform: translateY(0) rotateY(-15deg) rotateX(5deg) scale(1.1); }
    50% { transform: translateY(-15px) rotateY(-10deg) rotateX(2deg) scale(1.1); }
}
/* Hardware Buttons */
.iphone-button {
    position: absolute;
    background: #111;
    border-radius: 4px;
    box-shadow: inset -1px 0 2px rgba(255,255,255,0.2), inset 1px 0 2px rgba(0,0,0,0.8);
    transform: translateZ(-2px); /* attach to rim */
    z-index: -1;
}

.action-btn { width: 3px; height: 18px; left: -3px; top: 110px; }
.vol-up { width: 3px; height: 40px; left: -3px; top: 145px; }
.vol-down { width: 3px; height: 40px; left: -3px; top: 195px; }
.power-btn { width: 3px; height: 60px; right: -3px; top: 160px; }

/* Shared Layer Styles */
.iphone-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border-radius: 45px;
    border: 3px solid #1a1a1a;
    background-color: #111;
    transform-style: preserve-3d;
}

/* Titanium Rim Extrusion (Z-Stacking) */
.layer-1 { transform: translateZ(-1px); border-color: #222; }
.layer-2 { transform: translateZ(-2px); border-color: #161616; }
.layer-3 { transform: translateZ(-3px); border-color: #111; }

/* Front Face */
.layer-front {
    transform: translateZ(0px);
    background-color: #000;
    border: 10px solid #050505; /* Realistic thin bezels */
    overflow: hidden;
    backface-visibility: hidden;
    box-shadow: 
        inset 0 0 0 1px #222,
        inset 0 0 0 3px #000;
}

.screen-glare {
    position: absolute;
    top: 0; left: 0;
    width: 150%;
    height: 150%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 40%);
    pointer-events: none;
    z-index: 20;
    transform: translate(-10%, -10%);
}

.zoom-target-container {
    width: 100%;
    height: 100%;
    transform-origin: center center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.iphone-screen {
    width: 100%;
    height: auto;
    display: block;
}

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 32px;
    background-color: #000;
    border-radius: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    box-shadow: inset 0 0 3px rgba(255,255,255,0.15);
}

.dynamic-island .sensor {
    width: 10px;
    height: 10px;
    background: #111;
    border-radius: 50%;
    box-shadow: inset 0 0 2px rgba(255,255,255,0.2);
}
.dynamic-island .camera {
    width: 12px;
    height: 12px;
    background: #111;
    border-radius: 50%;
    border: 1px solid #222;
    box-shadow: inset 0 0 5px rgba(0,50,255,0.3);
}

/* Back Face (Camera & Glass) */
.layer-back {
    transform: translateZ(-11px) rotateY(180deg);
    background: linear-gradient(135deg, #1f1f1f, #0a0a0a);
    border: 4px solid #1a1a1a;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.9);
    backface-visibility: hidden;
}

.apple-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5rem;
    color: rgba(255,255,255,0.06);
}

.camera-bump {
    position: absolute;
    top: 25px;
    right: 25px; /* Right side because back face is flipped */
    width: 110px;
    height: 115px;
    background: rgba(30, 30, 30, 0.9);
    border-radius: 25px;
    border: 1px solid #333;
    box-shadow: 
        -5px 5px 15px rgba(0,0,0,0.5),
        inset 2px -2px 5px rgba(0,0,0,0.8),
        inset -2px 2px 5px rgba(255,255,255,0.1);
    transform: translateZ(2px);
    transform-style: preserve-3d;
}

.lens {
    position: absolute;
    width: 38px;
    height: 38px;
    background: #000;
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: 
        inset 0 0 10px rgba(255,255,255,0.1),
        0 2px 5px rgba(0,0,0,0.8);
}

.lens::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 30% 30%, #3a3a4a, #000);
    border-radius: 50%;
}

.lens-top { top: 10px; right: 10px; }
.lens-bottom { bottom: 10px; right: 10px; }
.lens-right { top: 38px; left: 10px; }

.flash {
    position: absolute;
    top: 15px;
    left: 25px;
    width: 16px;
    height: 16px;
    background: #ffecb3;
    border-radius: 50%;
    box-shadow: inset 0 0 5px #ffcc80, 0 0 8px rgba(255,236,179,0.5);
}

.lidar {
    position: absolute;
    bottom: 20px;
    left: 25px;
    width: 16px;
    height: 16px;
    background: #0a0a0a;
    border-radius: 50%;
    border: 1px solid #222;
}

/* Floor Shadow */
.iphone-shadow {
    position: absolute;
    bottom: -30px;
    left: 15%;
    width: 70%;
    height: 15px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
}

.iphone-3d-scene.do-spin .iphone-shadow {
    animation: 
        shadowFade 2s ease forwards,
        shadowFloat 5s ease-in-out 2s infinite forwards;
}

@keyframes shadowFade {
    0% { opacity: 0; transform: scale(0.6); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes shadowFloat {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.85); opacity: 0.6; }
}

/* ==========================================================================
   Responsive / Mobile Adjustments
   ========================================================================== */
@media (max-width: 739.98px) {
    .insta-promo-section {
        padding: 0.5rem 0 0 0 !important; /* Reduced heavily to remove top space */
        position: relative;
    }
    
    /* Blur fade at the bottom - remove if we are hard cropping the phone */
    .insta-promo-section::after {
        display: none !important;
    }

    .insta-header-area {
        margin-bottom: 0.5rem !important; /* Packed closer to cards */
    }

    .insta-main-heading {
        font-size: clamp(1.2rem, 4.6vw, 1.6rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 0 !important;
        margin-top: 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        max-width: 86vw !important;
        position: relative !important;
    }
    
    /* Ensure doodles beside heading fit within all model mobile phones */
    .sunburst {
        width: 20px !important;
        height: 20px !important;
    }
    .sunburst-left {
        left: -24px !important;
        top: 2px !important;
    }
    .sunburst-right {
        right: -24px !important;
        top: 2px !important;
    }
    
    /* Hide subtitle and journey pill on mobile as requested */
    .insta-subtitle-text,
    .insta-journey-pill {
        display: none !important;
    }
    
    /* Fix column shifting off-screen on mobile */
    .insta-left-col {
        transform: none !important; 
    }
    
    /* Fix the small instagram icon placement inside the cards */
    .insta-logo-small {
        transform: none !important;
        position: absolute !important;
        top: 1rem !important;
        right: 1rem !important;
        margin: 0 !important;
    }
    
    /* Center the 4 features properly on mobile */
    .features-row {
        justify-content: center !important;
        gap: 15px;
    }
    .feature-col {
        min-width: 120px;
    }
    /* Hide the descriptions below the feature icons on mobile */
    .feature-col p {
        display: none !important;
    }
    
    /* Profile cards styling - compact and never overflows mobile */
    .insta-left-col .row {
        justify-content: center !important;
    }
    
    /* Profile cards styling - compact, names bigger and strictly contained inside */
    .insta-left-col .row {
        justify-content: center !important;
    }
    
    .profile-card {
        padding: 1.1rem 0.85rem !important;
        max-width: 100% !important;
        margin: 0 auto;
        position: relative !important;
        overflow: hidden !important;
    }

    .profile-card .profile-pic-ring {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        flex-shrink: 0 !important;
    }

    .profile-card .profile-pic {
        width: 48px !important;
        height: 48px !important;
        border-width: 2.5px !important;
    }

    .profile-card .role-text {
        font-size: 0.7rem !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 2px !important;
    }

    /* Make handle names bigger, prominent, and strictly inside the card without going out the right */
    .profile-card .handle-text {
        font-size: clamp(0.85rem, 3.8vw, 1.02rem) !important;
        font-weight: 800 !important;
        letter-spacing: -0.3px !important;
        white-space: nowrap !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    .profile-card > .d-flex {
        margin-bottom: 0.8rem !important;
        gap: 0.5rem !important;
        padding-right: 1.8rem !important; /* Protects from overlapping the small top-right icon */
    }

    .btn-profile-gradient {
        font-size: clamp(0.76rem, 3.2vw, 0.88rem) !important;
        padding: 0.65rem 0.5rem !important;
        gap: 0.35rem !important;
        white-space: nowrap !important;
    }
    
    .profile-card .topics-text {
        margin-bottom: 0.8rem !important; /* Tighter gap */
    }
    
    .profile-card > .d-flex {
        margin-bottom: 0.8rem !important; /* Override mb-3 to be shorter */
        gap: 0.6rem !important;
    }
    
    .insta-benefits-list {
        margin: 1.5rem 0;
    }
    
    .insta-benefits-list li {
        margin-bottom: 0.75rem;
        gap: 0.75rem;
        font-size: 1rem;
    }

    .insta-buttons-group {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-instagram-secondary {
        font-size: 0.8rem;
        padding: 0.7rem 1.2rem;
    }
    
    .btn-instagram-pro {
        font-size: 0.8rem;
        padding: 0.7rem 1.2rem;
    }
    
    .btn-instagram-handle {
        display: none;
    }
    
    .btn-instagram {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .insta-phone-wrapper {
        flex-direction: column;
    }

    /* Completely hide the phone mockup on mobile */
    .iphone-3d-scene {
        display: none !important;
    }
}
