/* style.css */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', Arial, sans-serif;
    color: #333;
    overflow-x: hidden;
    background: #fff;
}

nav {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 15px 40px;
    display: flex;
    align-items: center;
    gap: 40px;
    position: static;
    border-bottom: 1px solid #eee;
}

.logo {
    height: 45px;
    width: auto;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 16px;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #007ead;
}

.nav-link.active {
    color: #007ead;
    border-bottom: 2px solid #007ead;
}

/* Work Menu */
.work-menu {
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    padding: 15px 40px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.work-menu a {
    color: #666;
    text-decoration: none;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 15px;
    
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.work-menu a:hover {
    background: #fff;
    color: #007ead;
    border-color: #007ead;
}

.work-menu a.active {
    background: #007ead;
    color: white;
    border-color: #007ead;
}

/* Page Styling */
h1 {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 2.5em;
    font-weight: 700;
    color: #333;
    margin: 40px 40px 30px 40px;
    text-align: left;
}

/* Gallery Styling */
.gallery {
    padding: 0 40px 40px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.img-block {
    background: #fff;
    overflow: hidden;
}

.img-block img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    display: block;
}

.caption {
    padding: 15px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-align: center;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    nav {
        padding: 10px 20px;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .logo {
        height: 35px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .work-menu {
        padding: 10px 20px;
        gap: 15px;
    }
    
    .work-menu a {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    h1 {
        margin: 20px 20px 20px 20px;
        font-size: 2em;
    }
    
    .gallery {
        padding: 0 20px 20px 20px;
        gap: 20px;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.container {
    width: 100%;
    padding-top: 0;
}

section {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Fish Sections */
.fish-section {
    background: linear-gradient(180deg, #0088ff 0%, #0066cc 30%, #004499 70%, #003366 100%);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Enhanced water effects for all fish sections */
.fish-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 255, 255, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(0, 150, 255, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 50% 40%, rgba(64, 224, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 30% 60%, rgba(0, 206, 209, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Special styling for first fish section */
#fish1 {
    background: linear-gradient(180deg, #0088ff 0%, #0066cc 30%, #004499 70%, #003366 100%);
    position: relative;
}

/* Coral and bubbles for all fish sections */
.fish-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('backdrop.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
}


/* Scribbles overlay for first section */
#fish1 .scribbles-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('newscribbls.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1.0;
    z-index: 6;
    pointer-events: none;
}

.fish-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* Make sure Three.js canvas is visible */
.fish-container canvas {
    position: absolute !important;
    z-index: 5 !important;
    pointer-events: none !important;
}

/* Classroom Image Sections */
.classroom-image {
    background: #000000;
    position: relative;
    z-index: 100;
    padding: 40px;
    padding-top: 40px;
}

.classroom-content {
    width: 35%;
    height: 45%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: absolute;
    bottom: 60px;
    right: 140px;
}

/* Set specific background images for each classroom */
#math-class .classroom-content {
    background-image: url('classroom1.png');
}

#english-class .classroom-content {
    background-image: url('classroom2.png');
}

#science-class .classroom-content {
    background-image: url('classroom3.png');
}

/* Left Video Stack for Fish Sections */
.left-video-stack {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 150;
    overflow: visible;
}

.left-video-stack iframe {
    width: 250px;
    max-height: 150px;
    border: 2px solid transparent;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}



/* Retro Old Internet Style Polar Bear Button */
.retro-button-container {
    position: absolute;
    top: 50px;
    left: 50px;
    width: 400px;
    z-index: 200;
}

.retro-polar-bear-link {
    display: block;
    background: linear-gradient(45deg, #ff0080, #0080ff, #ff8000, #80ff00);
    background-size: 400% 400%;
    animation: retroGradient 2s ease infinite;
    border: 4px solid #ffff00;
    border-radius: 0;
    padding: 15px;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    text-align: center;
    box-shadow: 
        0 0 10px #ff0080,
        0 0 20px #0080ff,
        0 0 30px #ff8000,
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.retro-polar-bear-link:hover {
    animation-duration: 0.5s;
    transform: scale(1.05);
    box-shadow: 
        0 0 20px #ff0080,
        0 0 40px #0080ff,
        0 0 60px #ff8000,
        inset 0 0 20px rgba(255, 255, 255, 0.5);
}

.retro-polar-bear-link marquee {
    color: #ffff00;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 2px 2px 0 #000000;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px;
}

.retro-button-text {
    color: #ffffff;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 
        2px 2px 0 #000000,
        0 0 10px #ffffff;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.retro-subtitle {
    color: #ffff00;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000000;
    animation: blink 1.5s infinite;
}

@keyframes retroGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.youtube-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.youtube-grid iframe {
    position: absolute;
    width: 200px;
    height: 120px;
    border: 2px solid #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    pointer-events: auto;
}

/* Top row videos */
.youtube-grid iframe:nth-child(1) { top: 20px; left: 20px; }
.youtube-grid iframe:nth-child(2) { top: 20px; left: 240px; }
.youtube-grid iframe:nth-child(3) { top: 20px; left: 460px; }

/* Left column videos */
.youtube-grid iframe:nth-child(4) { top: 160px; left: 20px; }
.youtube-grid iframe:nth-child(5) { top: 300px; left: 20px; }
.youtube-grid iframe:nth-child(6) { top: 440px; left: 20px; }

.youtube-grid iframe:hover {
    border-color: #ff0000;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    transform: scale(1.05);
}

/* YouTube Sidebar for Fish Section */
.youtube-sidebar {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 250px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.youtube-sidebar iframe {
    width: 100%;
    height: 180px;
    border: 2px solid #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.youtube-sidebar iframe:hover {
    border-color: #ff0000;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    transform: scale(1.05);
}

/* ML Home Remodeling Banner Sliver */
.remodeling-banner-sliver {
    background: #fff;
    color: #333;
    min-height: 120px;
    max-height: 120px;
    padding: 20px 0 0 0;
    overflow: hidden;
    position: relative;
}

.fl-row {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.fl-row-full-width {
    width: 100%;
    max-width: 100%;
}

.fl-row-bg-color {
    background-color: #f8f9fa;
}

.fl-row-content-wrap {
    width: 100%;
    position: relative;
}

.fl-row-content {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.fl-row-fixed-width {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.fl-col-group {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
}

.fl-col-group-equal-height {
    align-items: stretch;
}

.fl-col-group-align-center {
    align-items: center;
}

.fl-col-group-responsive-reversed {
    flex-direction: row;
}

.fl-col {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 15px 20px 10px 20px;
}

.fl-col.col-1 {
    flex: 2;
}

.fl-col.col-2 {
    flex: 1;
}

.fl-col-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fl-module {
    margin-bottom: 30px;
}

.fl-module-pp-heading {
    margin-bottom: 40px;
}

/* Banner-specific module spacing */
.remodeling-banner-sliver .fl-module {
    margin-bottom: 10px;
}

.remodeling-banner-sliver .fl-module-pp-heading {
    margin-bottom: 15px;
}

.pp-heading-content {
    width: 100%;
}

.pp-heading {
    margin-bottom: 20px;
}

.pp-heading.pp-left {
    text-align: left;
}

.heading-title {
    margin: 0 0 8px 0;
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.title-text.pp-primary-title {
    color: #2c3e50;
}

.pp-heading-separator {
    margin: 8px 0;
    position: relative;
}

.pp-heading-separator.line_only {
    height: 3px;
    width: 80px;
}

.pp-separator-line {
    display: block;
    height: 3px;
    background: #3498db;
    width: 100%;
}

.pp-sub-heading {
    font-size: 0.95em;
    line-height: 1.4;
    color: #666;
    margin-top: 8px;
}

.pp-sub-heading p {
    margin-bottom: 8px;
}

/* Abrupt cutoff effect */
.abrupt-cutoff {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, transparent 0%, #fff 30%, #fff 100%);
    z-index: 10;
}

.abrupt-cutoff::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: repeating-linear-gradient(
        45deg,
        #ff0000,
        #ff0000 5px,
        #ffffff 5px,
        #ffffff 10px
    );
    animation: glitch 0.5s infinite;
}

@keyframes glitch {
    0% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
    100% { transform: translateX(0); }
}

.fl-module-photo {
    text-align: center;
}

.fl-photo {
    display: inline-block;
    max-width: 100%;
}

.fl-photo-align-center {
    text-align: center;
}

.fl-photo-img {
    max-width: 100%;
    height: auto;
    
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Banner-specific image sizing */
.remodeling-banner-sliver .fl-photo-img {
    max-height: 80px;
    width: auto;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
    .fl-col-group-responsive-reversed {
        flex-direction: column-reverse;
    }
    
    .fl-col {
        padding: 15px;
    }
    
    .heading-title {
        font-size: 2em;
    }
    
    .pp-sub-heading {
        font-size: 1em;
    }
}

/* Polar Bear Link Section */
.polar-bear-link-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 40px;
    text-align: center;
    position: relative;
    z-index: 100;
}

.polar-bear-link-container {
    max-width: 600px;
    margin: 0 auto;
}

.polar-bear-link {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 30px;
    border: 3px solid #ffffff;
    
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.polar-bear-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.link-text {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.link-subtitle {
    display: block;
    font-size: 1.1em;
    opacity: 0.8;
    font-style: italic;
}

/* Final Section */
.final-section {
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.final-section h2 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: white;
}

.final-section p {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: white;
    max-width: 600px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fish-container {
        width: 100%;
        height: 100%;
    }
    section {
        height: auto;
        min-height: 100vh;
    }
    .horizontal-video-line iframe {
        flex: 1 1 33.333%;
        width: 33.333%;
    }
}

@media (max-width: 480px) {
    .fish-container {
        width: 100%;
        height: 100%;
    }
    section {
        height: auto;
        min-height: 100vh;
    }
    .horizontal-video-line iframe {
        flex: 1 1 50%;
        width: 50%;
    }
}

/* Mobile adjustments for classroom sections */
@media (max-width: 768px) {
    .classroom-image {
        padding: 20px;
        padding-top: 40px;
    }
    .classroom-content {
        width: 90%;
        height: 60vh;
        left: 50%;
        right: auto;
        bottom: 20px;
        transform: translateX(-50%);
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }
}

/* Mobile adjustments for left video stack */
@media (max-width: 768px) {
    .left-video-stack {
        left: 10px;
    }
    
    .left-video-stack iframe {
        width: 200px;
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    .left-video-stack {
        left: 5px;
        gap: 10px;
    }
    
    .left-video-stack iframe {
        width: 180px;
        max-height: 110px;
    }
}