@tailwind base;
@tailwind components;
@tailwind utilities;

/* Definition of the design system. All colors, gradients, fonts, etc should be defined here.
All colors MUST be HSL.
*/

@layer base {
    :root {
        --background: 210 40% 98%;
        --foreground: 220 84% 14%;

        --card: 0 0% 100%;
        --card-foreground: 220 84% 14%;

        --popover: 0 0% 100%;
        --popover-foreground: 220 84% 14%;

        --primary: 200 94% 45%;
        --primary-foreground: 0 0% 100%;
        --primary-light: 195 100% 85%;
        --primary-dark: 205 100% 35%;

        --secondary: 185 85% 92%;
        --secondary-foreground: 220 84% 14%;

        --muted: 210 40% 96%;
        --muted-foreground: 215 16% 47%;

        --accent: 180 100% 50%;
        --accent-foreground: 0 0% 100%;

        --destructive: 0 84% 60%;
        --destructive-foreground: 210 40% 98%;

        --border: 214 32% 91%;
        --input: 214 32% 91%;
        --ring: 200 94% 45%;

        /* Aquatic design system */
        --ocean-blue: 200 94% 45%;
        --ocean-light: 195 100% 85%;
        --ocean-dark: 205 100% 35%;
        --aqua-mint: 180 100% 50%;
        --wave-blue: 210 89% 65%;
        --deep-sea: 220 40% 15%;

        /* Gradients */
        --gradient-ocean: linear-gradient(
            135deg,
            hsl(var(--ocean-light)),
            hsl(var(--ocean-blue))
        );
        --gradient-wave: linear-gradient(
            180deg,
            hsl(var(--ocean-blue)),
            hsl(var(--wave-blue))
        );
        --gradient-hero: linear-gradient(
            135deg,
            hsl(var(--ocean-blue)),
            hsl(var(--aqua-mint))
        );

        /* Shadows */
        --shadow-ocean: 0 10px 30px -10px hsl(var(--ocean-blue) / 0.3);
        --shadow-card: 0 4px 20px hsl(var(--ocean-blue) / 0.1);
        --shadow-button: 0 4px 15px hsl(var(--ocean-blue) / 0.25);

        /* Animations */
        --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        --wave-animation: wave 3s ease-in-out infinite;

        --radius: 0.5rem;
    }

    .dark {
        --background: 220 40% 8%;
        --foreground: 210 40% 98%;

        --card: 220 35% 12%;
        --card-foreground: 210 40% 98%;

        --popover: 220 35% 12%;
        --popover-foreground: 210 40% 98%;

        --primary: 195 100% 65%;
        --primary-foreground: 220 40% 8%;
        --primary-light: 195 100% 75%;
        --primary-dark: 205 100% 45%;

        --secondary: 220 30% 15%;
        --secondary-foreground: 210 40% 98%;

        --muted: 220 30% 15%;
        --muted-foreground: 215 20% 65%;

        --accent: 180 100% 60%;
        --accent-foreground: 220 40% 8%;

        --destructive: 0 63% 31%;
        --destructive-foreground: 210 40% 98%;

        --border: 220 30% 18%;
        --input: 220 30% 18%;
        --ring: 195 100% 65%;

        /* Dark mode aquatic colors */
        --ocean-blue: 195 100% 65%;
        --ocean-light: 195 100% 75%;
        --ocean-dark: 205 100% 45%;
        --aqua-mint: 180 100% 60%;
        --wave-blue: 210 89% 75%;
        --deep-sea: 220 40% 8%;

        --gradient-ocean: linear-gradient(
            135deg,
            hsl(var(--ocean-dark)),
            hsl(var(--ocean-blue))
        );
        --gradient-wave: linear-gradient(
            180deg,
            hsl(var(--ocean-blue)),
            hsl(var(--wave-blue))
        );
        --gradient-hero: linear-gradient(
            135deg,
            hsl(var(--ocean-blue)),
            hsl(var(--aqua-mint))
        );

        --shadow-ocean: 0 10px 30px -10px hsl(var(--ocean-blue) / 0.4);
        --shadow-card: 0 4px 20px hsl(var(--ocean-blue) / 0.2);
        --shadow-button: 0 4px 15px hsl(var(--ocean-blue) / 0.3);
    }
}

@layer base {
    * {
        @apply border-border;
    }

    body {
        @apply bg-background text-foreground font-sans;
    }

    html {
        scroll-behavior: smooth;
    }
}

@layer utilities {
    .gradient-ocean {
        background: var(--gradient-ocean);
    }

    .gradient-wave {
        background: var(--gradient-wave);
    }

    .gradient-hero {
        background: var(--gradient-hero);
    }

    .shadow-ocean {
        box-shadow: var(--shadow-ocean);
    }

    .shadow-card {
        box-shadow: var(--shadow-card);
    }

    .shadow-button {
        box-shadow: var(--shadow-button);
    }

    .wave-animation {
        animation: var(--wave-animation);
    }

    .text-gradient {
        background: var(--gradient-ocean);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

@layer components {
    .btn-ocean {
        @apply bg-primary text-primary-foreground hover:bg-primary/90 shadow-button transition-all duration-300 hover:shadow-ocean;
    }

    .btn-secondary {
        @apply bg-secondary text-secondary-foreground hover:bg-secondary/90 shadow-button transition-all duration-300 hover:shadow-ocean;
    }

    .btn-outline {
        @apply bg-transparent text-primary border-2 border-primary hover:bg-primary hover:text-primary-foreground transition-all duration-300;
    }

    .btn-wave {
        @apply bg-accent text-accent-foreground hover:bg-accent/90 transition-all duration-300;
    }

    .card-float {
        @apply transform transition-all duration-500 ease-out hover:scale-105 hover:shadow-ocean hover:-translate-y-2;
    }
}

@keyframes wave {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--ocean-light) / 0.1);
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--ocean-blue) / 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--ocean-blue) / 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: all 0.3s ease-in-out;
    }

    .mobile-menu.show {
        max-height: 400px;
        opacity: 1;
    }
}

/* Efecto de burbujas de agua */
.bubble {
    position: absolute;
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.3) 0%,
        rgba(59, 130, 246, 0.1) 70%,
        transparent 100%
    );
    border-radius: 50%;
    animation: bubble-float 6s ease-in-out infinite;
    opacity: 0.7;
}

.bubble-1 {
    width: 20px;
    height: 20px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.bubble-2 {
    width: 15px;
    height: 15px;
    left: 25%;
    animation-delay: 1s;
    animation-duration: 7s;
}

.bubble-3 {
    width: 25px;
    height: 25px;
    left: 40%;
    animation-delay: 2s;
    animation-duration: 9s;
}

.bubble-4 {
    width: 18px;
    height: 18px;
    left: 55%;
    animation-delay: 3s;
    animation-duration: 6s;
}

.bubble-5 {
    width: 22px;
    height: 22px;
    left: 70%;
    animation-delay: 4s;
    animation-duration: 8s;
}

.bubble-6 {
    width: 16px;
    height: 16px;
    left: 85%;
    animation-delay: 5s;
    animation-duration: 7s;
}

.bubble-7 {
    width: 19px;
    height: 19px;
    left: 15%;
    animation-delay: 2.5s;
    animation-duration: 9s;
}

.bubble-8 {
    width: 24px;
    height: 24px;
    left: 80%;
    animation-delay: 1.5s;
    animation-duration: 6s;
}

@keyframes bubble-float {
    0% {
        transform: translateY(100px) scale(0);
        opacity: 0;
    }
    20% {
        opacity: 0.7;
        transform: translateY(80px) scale(1);
    }
    80% {
        opacity: 0.7;
        transform: translateY(-20px) scale(1);
    }
    100% {
        transform: translateY(-40px) scale(0);
        opacity: 0;
    }
}

/* Hero Slider Styles */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    opacity: 0;
    transition: all 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide[data-slide] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Animation variants */
.hero-slide[data-animation="fade"] {
    transition: opacity 0.8s ease-in-out;
}

.hero-slide[data-animation="slide"] {
    transform: translateX(100%);
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.hero-slide[data-animation="slide"].active {
    transform: translateX(0);
}

.hero-slide[data-animation="zoom"] {
    transform: scale(1.1);
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.hero-slide[data-animation="zoom"].active {
    transform: scale(1);
}

/* Navigation styles */
.hero-nav {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-nav:hover {
    backdrop-filter: blur(15px);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.hero-dot {
    transition: all 0.3s ease;
}

.hero-dot:hover {
    transform: scale(1.2);
}

.hero-progress {
    background: linear-gradient(90deg, hsl(199 89% 48%), hsl(201 96% 32%));
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

/* Content animations */
.hero-content {
    animation: slideInFromLeft 1s ease-out;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-nav {
        width: 2.5rem;
        height: 2.5rem;
    }

    .hero-nav svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}
