/* ===================================
   Wavy Curved Backgrounds
   SVG-based wave patterns and dividers
   =================================== */

/* Wave Background Containers */
.wave-background-top,
.wave-background-bottom,
.wave-background-full {
    position: relative;
    overflow: hidden;
}

/* Wave Dividers - SVG Shapes */
.wave-divider {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
}

.wave-divider svg {
    display: block;
    width: calc(100% + 1.3px);
    position: relative;
}

/* Top Wave Divider */
.wave-divider.wave-top {
    top: 0;
    transform: rotate(180deg);
}

.wave-divider.wave-top svg {
    height: 80px;
}

/* Bottom Wave Divider */
.wave-divider.wave-bottom {
    bottom: 0;
}

.wave-divider.wave-bottom svg {
    height: 80px;
}

/* Responsive Wave Heights */
@media (min-width: 768px) {
    .wave-divider.wave-top svg,
    .wave-divider.wave-bottom svg {
        height: 120px;
    }
}

@media (min-width: 1024px) {
    .wave-divider.wave-top svg,
    .wave-divider.wave-bottom svg {
        height: 160px;
    }
}

/* Wave Background Sections with Pseudo-Elements */
.wave-background-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-100);
    z-index: -1;
}

.wave-background-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85%;
    background-color: var(--primary-900);
    z-index: -1;
}

.wave-background-full {
    background-color: var(--primary-100);
    padding: var(--space-20) 0;
}

/* Wave Divider Inline SVGs */
.wave-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: cover;
    transform: rotate(180deg);
}

.wave-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: cover;
}

/* Alternative Wave Styles */

/* Layered Wave Pattern */
.wave-layered {
    position: relative;
    background: linear-gradient(180deg, var(--primary-100) 0%, var(--white) 100%);
}

.wave-layered::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23EDF3F6' opacity='0.5'/%3E%3Cpath d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' fill='%23EDF3F6'/%3E%3C/svg%3E");
    background-size: cover;
    opacity: 0.8;
}

/* Smooth Curve Wave */
.wave-smooth {
    position: relative;
}

.wave-smooth::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M985.66,92.83C906.67,72,823.78,31,743.84,14.19c-82.26-17.34-168.06-16.33-250.45.39-57.84,11.73-114,31.07-172,41.86A600.21,600.21,0,0,1,0,27.35V120H1200V95.8C1132.19,118.92,1055.71,111.31,985.66,92.83Z' fill='%23002748'/%3E%3C/svg%3E");
    background-size: cover;
    transform: rotate(180deg);
}

/* Animated Waves */
@keyframes wave-animation {
    0% {
        transform: translateX(0) translateZ(0) scaleY(1);
    }
    50% {
        transform: translateX(-25%) translateZ(0) scaleY(0.9);
    }
    100% {
        transform: translateX(-50%) translateZ(0) scaleY(1);
    }
}

.wave-animated {
    position: relative;
    overflow: hidden;
}

.wave-animated::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23EDF3F6' opacity='0.3'/%3E%3C/svg%3E");
    background-size: 50% 100px;
    background-repeat: repeat-x;
    animation: wave-animation 15s linear infinite;
}

.wave-animated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23EDF3F6'/%3E%3C/svg%3E");
    background-size: 50% 100px;
    background-repeat: repeat-x;
    animation: wave-animation 20s linear infinite reverse;
}

/* Diagonal Wave */
.wave-diagonal {
    position: relative;
    background-color: var(--white);
}

.wave-diagonal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--white) 100%);
    clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%);
    z-index: -1;
}

/* Curved Section Divider */
.curve-divider {
    position: relative;
    height: 150px;
    margin: -1px 0;
}

.curve-divider svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 150px;
}

/* Multi-layer Wave Effect */
.wave-multilayer {
    position: relative;
    background: var(--primary-100);
}

.wave-multilayer .wave-layer-1,
.wave-multilayer .wave-layer-2,
.wave-multilayer .wave-layer-3 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-size: cover;
    opacity: 0.5;
}

.wave-multilayer .wave-layer-1 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23002748'/%3E%3C/svg%3E");
    animation: wave-animation 10s ease-in-out infinite;
}

.wave-multilayer .wave-layer-2 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23003B5C'/%3E%3C/svg%3E");
    animation: wave-animation 15s ease-in-out infinite reverse;
    opacity: 0.3;
}

.wave-multilayer .wave-layer-3 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M985.66,92.83C906.67,72,823.78,31,743.84,14.19c-82.26-17.34-168.06-16.33-250.45.39-57.84,11.73-114,31.07-172,41.86A600.21,600.21,0,0,1,0,27.35V120H1200V95.8C1132.19,118.92,1055.71,111.31,985.66,92.83Z' fill='%23002140'/%3E%3C/svg%3E");
    animation: wave-animation 20s ease-in-out infinite;
    opacity: 0.2;
}

/* Wave Preview Cards (for demo) */
.wave-preview {
    position: relative;
    width: 100%;
    height: 150px;
    background-color: var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: var(--space-4);
}

.wave-top-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23002748'/%3E%3C/svg%3E");
    background-size: cover;
    transform: rotate(180deg);
}

.wave-bottom-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23002748'/%3E%3C/svg%3E");
    background-size: cover;
}

.wave-full-preview {
    background: linear-gradient(180deg, var(--primary-100) 0%, var(--white) 50%, var(--primary-100) 100%);
}

.wave-full-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: cover;
    transform: rotate(180deg);
}

.wave-full-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: cover;
}
