/* Inside Toonz Section - Premium Light Theme */

.toonz-inside-wrapper {
    width: 100%;
    background-color: #F8F7F5;
    /* Premium off-white/cream background */
    color: #1A1A1A;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.toonz-inside-container {
    display: flex;
    flex-wrap: wrap;
    /*max-width: 1400px;*/
    margin: 0 auto;
    padding: 100px 0px;
    gap: 180px;
    align-items: center;
}

/* Left Content */
.toonz-inside-content {
    flex: 1;
    min-width: 350px;
    max-width: 450px;
    position: relative;
}

.toonz-inside-eyebrow-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.toonz-inside-eyebrow-line {
    width: 40px;
    height: 2px;
    background-color: #E87722;
}

.toonz-inside-eyebrow {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #E87722;
}

.toonz-inside-heading {
    font-size: clamp(50px, 6vw, 80px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    color: #111;
    margin-bottom: 30px;
}

.toonz-inside-subtext {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 40px;
}

.toonz-inside-handwritten {
    font-family: 'Caveat', 'Just Another Hand', cursive;
    /* Assuming a handwritten Google font, fallback to cursive */
    font-size: 24px;
    color: #333;
    transform: rotate(-3deg);
    display: inline-block;
    position: relative;
    margin-top: 20px;
}

.toonz-inside-handwritten::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #111;
    border-radius: 2px;
    transform: rotate(2deg);
}

/* Right Content - Collage Canvas (Absolute Positioning) */
.toonz-inside-collage {
    flex: 1.5;
    min-width: 500px;
    position: relative;
    /* Height is controlled by the Collage Canvas Height slider in Elementor */
}

/* Base Photo Item (Absolute Layer) */
.toonz-inside-photo {
    background: #fff;
    border: 8px solid #fff;
    border-bottom-width: 25px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    position: absolute;
    /* Changed to absolute for manual freeform dragging via Elementor */
    border-radius: 2px;

    /* Animation Variables */
    --custom-rotation: 0deg;
    /* Overridden by Elementor Slider */
    --anim-y: 40px;
    /* Starting position for fade-up */

    opacity: 0;
    margin: 0;
    z-index: 1;
    /* Overridden by Elementor Slider */

    /* Combine Y translation with custom rotation so they don't break each other */
    transform: translateY(var(--anim-y)) rotate(var(--custom-rotation));
    transition: opacity 0.8s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, z-index 0s;
}

/* Base visible state */
.toonz-inside-photo.is-visible {
    opacity: 1;
    --anim-y: 0px;
}

/* Jump to top on hover, scale up, and straighten out */
.toonz-inside-photo.is-visible:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    z-index: 50 !important;
    --custom-rotation: 0deg !important;
    /* Straightens the image out cleanly */
    transform: scale(1.1) rotate(var(--custom-rotation)) translateY(0) !important;
}

.toonz-inside-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Warm/Desaturated Tone */
    filter: sepia(0.2) contrast(1.1) saturate(0.8);
    transition: filter 0.6s ease;
}

.toonz-inside-photo.is-visible:hover .toonz-inside-photo-img {
    filter: sepia(0) contrast(1.1) saturate(1.1);
    /* Bring back color on hover */
}


/* Ensure Tape renders above overlapping images */
.toonz-inside-photo.has-tape::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 80px;
    height: 25px;
    background-color: rgba(230, 225, 215, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    z-index: 10;
    border-radius: 2px;
}

.toonz-inside-photo.has-tape:nth-child(even)::before {
    transform: translateX(-50%) rotate(4deg);
    top: -8px;
    width: 90px;
}

/* Removed legacy grid span classes as they are replaced by manual Elementor sliders */

/* Tape Effect */
.toonz-inside-photo.has-tape::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 60px;
    height: 20px;
    background-color: rgba(230, 225, 215, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 5;
    border-radius: 1px;
}

.toonz-inside-photo.has-tape:nth-child(even)::before {
    transform: translateX(-50%) rotate(3deg);
    top: -8px;
    width: 75px;
}

/* Bottom Strip */
.toonz-inside-strip {
    background-color: #E87722;
    padding: 30px 20px;
    text-align: center;
    width: 100%;
}

.toonz-inside-strip-text {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .toonz-inside-container {
        flex-direction: column;
        padding: 80px 30px;
    }

    .toonz-inside-content {
        max-width: 100%;
        text-align: center;
    }

    .toonz-inside-eyebrow-wrapper {
        justify-content: center;
    }

    .toonz-inside-collage {
        width: 100%;
        min-width: 100%;
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 200px;
    }

    /* Reset spans for tablet */
    .toonz-inside-photo {
        grid-column: span 3 !important;
        grid-row: span 1 !important;
    }

    .toonz-inside-photo:nth-child(3n) {
        grid-column: span 6 !important;
    }
}

@media (max-width: 768px) {
    .toonz-inside-collage {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .toonz-inside-photo {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}