/**
 * IYA Medical - MAJESTIC Rainbow Hero Design
 * Rainbow waves CONTAINED to hero section only
 * Subtle floating particles everywhere
 */

/* ============================================
   HIDE OLD BACKGROUND ELEMENTS
============================================ */
#oldDotGridCanvas,
#oldParticleCanvas,
#wavyCanvas,
#bubbleCanvas,
#pulseCanvas,
.bg-canvas,
.gradient-overlay,
.hero-waves {
    display: none !important;
}

/* ============================================
   SUBTLE PARTICLE CANVAS - Full page, very gentle
============================================ */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

/* ============================================
   RAINBOW WAVES CANVAS - HERO ONLY (position: absolute)
============================================ */
#rainbowWavesCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* ============================================
   DOT GRID CANVAS - Hero section only
============================================ */
#dotGridCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

/* ============================================
   LEADING IMAGE HERO - Deep gradient base
============================================ */
.leading-image-wrapper {
    background: linear-gradient(
        135deg,
        #0c4a6e 0%,
        #0e7490 25%,
        #0891b2 50%,
        #06b6d4 75%,
        #22d3ee 100%
    ) !important;
    min-height: 520px;
    position: relative;
    overflow: hidden;
}

/* Subtle inner glow */
.leading-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(139, 92, 246, 0.12) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 70% 80%,
        rgba(236, 72, 153, 0.08) 0%,
        transparent 50%
    );
    z-index: 1;
    pointer-events: none;
}

/* Smooth transition at bottom of hero */
.leading-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%23ffffff' d='M0,30 C240,90 480,10 720,50 C960,90 1200,20 1440,40 L1440,100 L0,100 Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom center;
    background-size: cover;
    z-index: 10;
    pointer-events: none;
}

/* ============================================
   HERO TEXT STYLING
============================================ */
.leading-image-wrapper .leading-copy h1,
.leading-image-wrapper #leading-title {
    color: #ffffff !important;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(139, 92, 246, 0.15),
        0 2px 20px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    font-size: 2.75rem;
    line-height: 1.25;
    position: relative;
    z-index: 20;
}

.leading-image-wrapper .leading-copy {
    position: relative;
    z-index: 20;
}

.leading-image-wrapper .container {
    position: relative;
    z-index: 20;
}

/* Get Started button */
.leading-image-wrapper .cssbuttons-io-button {
    background: #ffffff !important;
    color: #0891b2 !important;
    font-weight: 600;
    border-radius: 50px;
    padding: 16px 36px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 20;
}

.leading-image-wrapper .cssbuttons-io-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.25),
        0 0 40px rgba(139, 92, 246, 0.2);
}

.leading-image-wrapper .cssbuttons-io-button .icon {
    background: linear-gradient(135deg, #0891b2, #8b5cf6) !important;
    color: #ffffff !important;
}

/* ============================================
   PAGE HEADERS - CLEAN GRADIENT
============================================ */
.page-header {
    background: linear-gradient(
        135deg,
        #0c4a6e 0%,
        #0e7490 50%,
        #0891b2 100%
    ) !important;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.page-header .carousel-item-img,
.page-header .carouselItem,
.page-header-carousel,
.page-header .owl-carousel,
.carouselItem {
    background-image: none !important;
    background: transparent !important;
}

.carouselItem .carousel-item-img {
    display: none !important;
}

.page-header .header-text h1,
.page-header .header-text h2,
.page-header .header-text h3,
.page-header .header-text .page-title {
    color: #ffffff !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    position: relative;
    z-index: 5;
}

.page-header .header-text p {
    color: rgba(255, 255, 255, 0.95) !important;
    position: relative;
    z-index: 5;
}

.page-header .header-text {
    position: relative;
    z-index: 5;
}

.page-header:not(.page-header-animated)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%23ffffff' d='M0,40 C360,100 720,0 1080,50 C1260,75 1380,60 1440,40 L1440,100 L0,100 Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom center;
    background-size: cover;
    z-index: 2;
    pointer-events: none;
}

/* ============================================
   CONTENT SECTIONS - White background, above particles
============================================ */
body {
    background-color: #ffffff;
    position: relative;
}

/* Ensure all content sections have solid white background */
main,
.main-content,
.content-area,
section:not(.leading-image-wrapper),
.container-fluid,
footer,
.footer,
.trust-badges-section,
[class*="trust-badge"],
.services-section,
.about-section,
.contact-section,
.testimonials-section,
.cta-section {
    background-color: #ffffff;
    position: relative;
    z-index: 5;
}

/* Make sure cards and content boxes are solid */
.card,
.box,
.content-box,
.service-card,
.team-card {
    background-color: #ffffff;
}

/* ============================================
   FOOTER - Ensure fully visible
============================================ */
.main-footer {
    position: relative !important;
    z-index: 100 !important;
    background: linear-gradient(135deg, #0c4a6e 0%, #164e63 100%) !important;
}

.main-footer .container,
.main-footer .row {
    position: relative;
    z-index: 1;
}

/* Ensure footer content is visible */
.main-footer h6,
.main-footer p,
.main-footer a,
.main-footer ul,
.main-footer li,
.main-footer .newsletter {
    color: rgba(255, 255, 255, 0.95) !important;
}

.main-footer h6 {
    color: #ffffff !important;
}

/* ============================================
   REDUCED MOTION & MOBILE
============================================ */
@media (prefers-reduced-motion: reduce) {
    #particleCanvas,
    #rainbowWavesCanvas,
    #dotGridCanvas {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .leading-image-wrapper {
        min-height: 400px;
    }

    .leading-image-wrapper .leading-copy h1,
    .leading-image-wrapper #leading-title {
        font-size: 1.75rem;
    }

    .leading-image-wrapper::after,
    .page-header:not(.page-header-animated)::after {
        height: 50px;
    }

    .page-header {
        min-height: 200px;
    }

    .page-header .header-text h1 {
        font-size: 1.5rem !important;
    }

    /* Reduce effects on mobile */
    #particleCanvas {
        opacity: 0.3;
    }
}

@media (max-width: 991.98px) {
    .leading-image-wrapper {
        min-height: 450px;
    }

    .leading-image-wrapper .leading-copy h1,
    .leading-image-wrapper #leading-title {
        font-size: 2rem;
    }

    .page-header {
        min-height: 240px;
    }
}

/* ============================================
   PRINT STYLES
============================================ */
@media print {
    .leading-image-wrapper,
    .page-header {
        background: #0891b2 !important;
    }

    .leading-image-wrapper::after,
    .leading-image-wrapper::before,
    .page-header::after,
    #particleCanvas,
    #rainbowWavesCanvas,
    #dotGridCanvas {
        display: none !important;
    }
}
