/*!
Theme Name: JGDesign
Description: Projects page styles - cleaned and organized with mobile responsiveness and fixed hero background
Version: 1.0.1
*/

/* ==============================================
   PROJECTS PAGE CSS - CLEANED VERSION WITH MOBILE FIXES
   ============================================== */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #fff5d6;
    color: #412234;
    line-height: 1.6;
    min-height: 100vh;
}

/* Remove default list styles globally */
li {
    list-style: none !important;
    list-style-type: none !important;
}

/* ==============================================
   HERO SECTION - FIXED FOR MOBILE
   ============================================== */
.hero-section-projects {
    background: url('http://www.jgriffithmedia.com/wp-content/uploads/2025/07/Jelena-Griffith-1-1-scaled.png') no-repeat center center;
    background-size: cover;
    height: 50vh;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-top: 0;
    margin-bottom: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: none !important;
    box-sizing: border-box;
    border-bottom: 4px solid #C6034B;
}

.hero-section-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1;
}

.hero-section-projects > .hero-content {
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.projects-title {
    font-size: 6rem;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
}

.projects-title::before, 
.projects-title::after {
    content: '✦';
    font-size: 5rem;
    color: white;
}

.projects-subtitle {
    font-size: 1.5rem;
    color: white;
    font-weight: 400;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ==============================================
   PINNED SCROLL CONTAINER
   ============================================== */

.pinned-container {
    position: relative;
    height: 1300vh;
}

.pinned-wrapper {
    position: sticky;
    top: 0;
    height: 120vh;
    display: flex;
    overflow: hidden;
}

/* ==============================================
   LEFT CONTENT (TEXT SECTIONS)
   ============================================== */

.left-content {
    width: 50%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #fff5d6;
    position: relative;
    z-index: 2;
}

.content-section {
    opacity: 0;
    line-height: 1.4;
    transform: translateY(30px);
    transition: all 0.6s ease;
    position: absolute;
    width: calc(100% - 6rem);
    top: 10%;
    height: 80%;
    overflow-y: auto;
}

.content-section.active {
    opacity: 1;
    transform: translateY(0);
}

.content-section h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    margin-top: 1.3rem;
    color: #C6034B;
    line-height: 1.2;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.content-section p {
    font-size: 1.2rem;
    color: #412234;
    margin-bottom: 1rem;
    font-weight: 450;
    line-height: 1.6;
    font-family: 'Montserrat', sans-serif;
}

.content-section:not(.active) {
    display: none;
}

/* ==============================================
   PROJECT DETAILS
   ============================================== */

.project-details {
    margin: 1rem 0;
}

.project-details h3 {
    font-size: 2.5rem;
    color: #C6034B;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.project-details ul {
    list-style: none !important;
    padding: 0;
    margin-bottom: 1rem;
}

.project-details li {
    padding: 0.4rem 0;
    color: #412234;
    font-weight: 450;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    padding-left: 1.6rem;
    font-size: 1.3rem;
    line-height: 1.4;
    list-style: none !important;
}

.project-details li:before {
    content: "•";
    color: #C6034B;
    position: absolute;
    left: 0;
    top: 0.4rem;
    font-weight: bold;
    line-height: 1;
}

/* Inline sections for Tools and Package */
.inline-section {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.inline-section h3 {
    margin: 0;
    white-space: nowrap;
    font-size: 2rem;
    font-weight: 600;
    color: #C6034B;
    font-family: 'Baloo 2', cursive;
}

.inline-section p {
    margin: 0;
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.2;
    font-size: 1.3rem;
    font-weight: 450;
}

/* ==============================================
   STATS SECTIONS
   ============================================== */

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #C6034B;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(198, 3, 75, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 3, 75, 0.3);
    border-color: #3BFAD4;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #C6034B;
    font-family: 'Baloo 2', cursive;
}

.stat-item div:last-child {
    color: #412234;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==============================================
   RIGHT IMAGES (SCROLLING SECTION)
   ============================================== */

.right-images {
    width: 50%;
    position: relative;
    background: #fff5d6;
    overflow: hidden;
}

/* Base image slide styles */
.image-slide,
.image-slide2-EF,
.image-slide-square-EF,
.image-slide-squareeat,
.image-duck,
.image-slide1-EF,
.image-slide2eat,
.image-slide1eat,
.image-slide1buttall,
.image-slide1buttall2,
.image-slide-square,
.image-slide-square2,
.image-slide1,
.image-slide2-long,
.image-slide2 {
    position: absolute;
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.70), opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    will-change: transform;
}

/* Specific positioning and sizing for each image type */
.image-slide {
    left: 50%;
    top: 30%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 40vh;
}

.image-duck,
.image-slide-squareeat,
.image-slide-square-EF,
.image-slide-square {
    left: 30%;
    top: 30%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 40vh;
}

.image-slide-square2 {
    left: 30%;
    top: 40%;
    transform: translate(-50%, -50%);
    width: 30%;
    height: 30vh;
}

.image-slide1eat,
.image-slide2-EF,
.image-slide1-EF,
.image-slide1 {
    left: 73%;
    top: 30%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 30vh;
}

.image-slide1buttall2,
.image-slide1buttall {
    left: 73%;
    top: 30%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 40vh;
}

.image-slide2eat,
.image-slide2 {
    left: 25%;
    top: 40%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 70vh;
}

.image-slide2-long {
    left: 70%;
    top: 40%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 70vh;
}

/* Hover effects */
.image-slide:hover,
.image-slide2-EF:hover,
.image-slide1-EF:hover,
.image-slide-square-EF:hover,
.image-slide1eat:hover,
.image-slide-squareeat:hover,
.image-slide2eat:hover,
.image-duck:hover,
.image-slide1buttall2:hover,
.image-slide1buttall:hover,
.image-slide-square2:hover,
.image-slide2-long:hover,
.image-slide-square:hover,
.image-slide1:hover,
.image-slide2:hover {
    transform: translate(-50%, -50%) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Video-specific styles */
.nonna-video1,
.EF-Video1,
.nonna-video2,
.image-slide[data-type="video"] {
    aspect-ratio: 16/9;
    border-radius: 20px;
}

/* Play button */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(198, 3, 75, 0.8);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.play-button:hover {
    background: rgba(59, 250, 212, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Nonna's Video-Specific Styles */
.nonna-video1,
.EF-Video1,
.nonna-video2 {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    height: 45vh;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.70), opacity 0.2s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    will-change: transform;
    overflow: hidden;
}

/* Nonna Video Hover Effects */
.nonna-video1:hover,
.EF-Video1:hover,
.nonna-video2:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

/* Optional: Add a subtle overlay for better text/button visibility */
.nonna-video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 69, 19, 0.1), rgba(0, 0, 0, 0.2));
    border-radius: 20px;
    pointer-events: none;
}

/* ==============================================
   MOBILE NAVIGATION (Hidden on Desktop)
   ============================================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(198, 3, 75, 0.95);
    border-radius: 25px;
    padding: 10px 20px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.mobile-nav button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 8px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-nav button:hover,
.mobile-nav button.active {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-nav .nav-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==============================================
   RESPONSIVE DESIGN - MOBILE FIRST WITH FIXED HERO
   ============================================== */

/* Large Mobile Devices (up to 480px) */
@media (max-width: 480px) {
    /* FIXED: Hero Section Mobile Background */
    .hero-section-projects {
        background-image: url('http://www.jgriffithmedia.com/wp-content/uploads/2025/07/Jelena-Griffith-1-1-scaled.png') !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
        background-size: cover !important;
        background-attachment: scroll !important;
        height: 60vh;
        min-height: 300px;
        padding: 15px;
        /* Force hardware acceleration for better performance */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    /* Enhanced ::before pseudo-element for mobile backup */
    .hero-section-projects::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('http://www.jgriffithmedia.com/wp-content/uploads/2025/07/Jelena-Griffith-1-1-scaled.png') no-repeat center center;
        background-size: cover;
        z-index: 0;
        /* Fallback background color in case image doesn't load */
        background-color: #C6034B;
    }
    
    /* Ensure content is above background */
    .hero-section-projects > .hero-content {
        position: relative;
        z-index: 2;
    }
    
    .projects-title {
        font-size: 2.5rem;
        gap: 8px;
        letter-spacing: 1px;
        flex-direction: column;
    }
    
    .projects-title::before, 
    .projects-title::after {
        font-size: 2rem;
        display: none; /* Hide decorative stars on very small screens */
    }
    
    .projects-subtitle {
        font-size: 1rem;
        letter-spacing: 1px;
        line-height: 1.4;
    }

    /* Mobile Layout: Stack vertically */
    .pinned-container {
        height: auto; /* Remove scroll-triggered height */
        position: relative;
    }

    .pinned-wrapper {
        position: relative; /* Remove sticky positioning */
        height: auto;
        flex-direction: column;
        overflow: visible;
    }

    /* Left Content Mobile */
    .left-content {
        width: 100%;
        padding: 1.5rem;
        position: relative;
        height: auto;
        background: #fff5d6;
    }

    .content-section {
        position: relative; /* Remove absolute positioning */
        opacity: 1; /* Always visible on mobile */
        transform: none;
        width: 100%;
        top: auto;
        height: auto;
        overflow-y: visible;
        margin-bottom: 3rem;
    }

    .content-section:not(.active) {
        display: block; /* Show all sections on mobile */
    }

    .content-section h2 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
        margin-top: 0;
    }

    .content-section p {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Project Details Mobile */
    .project-details h3 {
        font-size: 1.8rem;
        margin-top: 1.5rem;
    }

    .project-details li {
        font-size: 1rem;
        padding: 0.3rem 0;
        padding-left: 1.2rem;
    }

    .inline-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .inline-section h3 {
        font-size: 1.5rem;
        white-space: normal;
    }

    .inline-section p {
        font-size: 1rem;
    }

    /* Stats Mobile */
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* Right Images Mobile - Gallery Style */
    .right-images {
        width: 100%;
        position: relative;
        height: auto;
        overflow: visible;
        padding: 1rem;
        background: #fff5d6;
        display: block !important; /* Force display */
    }

    /* Reset all image positioning for mobile */
    .image-slide,
    .image-slide2-EF,
    .image-slide-square-EF,
    .image-slide-squareeat,
    .image-duck,
    .image-slide1-EF,
    .image-slide2eat,
    .image-slide1eat,
    .image-slide1buttall,
    .image-slide1buttall2,
    .image-slide-square,
    .image-slide-square2,
    .image-slide1,
    .image-slide2ama,
    .image-slide2-long,
    .image-slide2,
    .nonna-video1,
    .EF-Video1,
    .nonna-video2 {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: 200px !important;
        margin-bottom: 1rem;
        opacity: 1 !important;
        display: block !important; /* Force display */
        background-size: cover !important;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    /* Videos get more height on mobile */
    .nonna-video1,
    .EF-Video1,
    .nonna-video2 {
        height: 250px !important;
    }

    /* Play button mobile */
    .play-button {
        width: 60px;
        height: 60px;
    }

    .play-button svg {
        width: 30px;
        height: 30px;
    }

    /* Mobile hover effects (touch friendly) */
    .image-slide:hover,
    .image-slide2-EF:hover,
    .image-slide1-EF:hover,
    .image-slide-square-EF:hover,
    .image-slide1eat:hover,
    .image-slide-squareeat:hover,
    .image-slide2eat:hover,
    .image-duck:hover,
    .image-slide1buttall2:hover,
    .image-slide1buttall:hover,
    .image-slide-square2:hover,
    .image-slide2-long:hover,
    .image-slide-square:hover,
    .image-slide1:hover,
    .image-slide2:hover,
    .nonna-video1:hover,
    .EF-Video1:hover,
    .nonna-video2:hover {
        transform: scale(1.02) !important;
    }

    /* Show mobile navigation */
    .mobile-nav {
        display: block;
    }
}

/* Medium Mobile to Small Tablet (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    /* FIXED: Hero Section Tablet Background - LARGER SIZE */
    .hero-section-projects {
        background-image: url('http://www.jgriffithmedia.com/wp-content/uploads/2025/07/Jelena-Griffith-1-1-scaled.png') !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
        background-size: cover !important;
        background-attachment: scroll !important;
        height: 55vh; /* Increased from 45vh */
        min-height: 450px; /* Increased from 350px */
    }
    
    /* Enhanced ::before pseudo-element for tablets */
    .hero-section-projects::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('http://www.jgriffithmedia.com/wp-content/uploads/2025/07/Jelena-Griffith-1-1-scaled.png') no-repeat center center;
        background-size: cover;
        z-index: 0;
        /* Fallback background color */
        background-color: #C6034B;
    }
    
    .projects-title {
        font-size: 3.5rem;
        gap: 10px;
    }
    
    .projects-title::before, 
    .projects-title::after {
        font-size: 3rem;
    }
    
    .projects-subtitle {
        font-size: 1.2rem;
    }

    /* Similar mobile treatment but with more space */
    .pinned-container {
        height: auto;
    }

    .pinned-wrapper {
        position: relative;
        height: auto;
        flex-direction: column;
        overflow: visible;
    }

    .left-content {
        width: 100%;
        padding: 2rem;
        height: auto;
    }

    .content-section {
        position: relative;
        opacity: 1;
        transform: none;
        width: 100%;
        top: auto;
        height: auto;
        overflow-y: visible;
        margin-bottom: 3rem;
    }

    .content-section:not(.active) {
        display: block;
    }

    .content-section h2 {
        font-size: 2.5rem;
    }

    .content-section p {
        font-size: 1.1rem;
    }

    .right-images {
        width: 100%;
        height: auto;
        overflow: visible;
        padding: 1.5rem;
        display: block !important; /* Force display */
    }

    /* Reset positioning for tablet */
    .image-slide,
    .image-slide2-EF,
    .image-slide-square-EF,
    .image-slide-squareeat,
    .image-duck,
    .image-slide1-EF,
    .image-slide2eat,
    .image-slide1eat,
    .image-slide1buttall,
    .image-slide1buttall2,
    .image-slide-square,
    .image-slide-square2,
    .image-slide1,
    .image-slide2ama,
    .image-slide2-long,
    .image-slide2,
    .nonna-video1,
    .EF-Video1,
    .nonna-video2 {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        height: 250px !important;
        margin-bottom: 1rem;
        opacity: 1 !important;
        display: block !important; /* Force display */
        background-size: cover !important;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .nonna-video1,
    .EF-Video1,
    .nonna-video2 {
        height: 300px !important;
    }

    .play-button {
        width: 80px;
        height: 80px;
    }

    .mobile-nav {
        display: block;
    }
}

/* Desktop styles remain unchanged for screens larger than 768px */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
    
    /* Ensure desktop layout is preserved */
    .pinned-container {
        height: 1300vh;
    }
    
    .pinned-wrapper {
        position: sticky;
        top: 0;
        height: 120vh;
        display: flex;
        flex-direction: row;
        overflow: hidden;
    }
    
    .left-content {
        width: 50%;
    }
    
    .right-images {
        width: 50%;
    }
    
    .content-section:not(.active) {
        display: none;
    }
}

/* ==============================================
   DEBUG STYLES (REMOVE AFTER TESTING)
   ============================================== */

/* Uncomment these styles temporarily to debug mobile hero issues */
/*
@media (max-width: 480px) {
    .hero-section-projects {
        border: 3px solid yellow !important;
        background-color: #C6034B !important;
    }
    
    .hero-content {
        background-color: rgba(0, 0, 0, 0.5) !important;
        padding: 1rem !important;
        border-radius: 10px !important;
    }
}
*/