/* ===== CSS VARIABLES ===== */
:root {
    --color-cyan: #00fff0;
    --color-red: #a22b2b;
    --color-blue: #041082;
    --color-blue-dark: #020850;
    --color-white: #ffffff;
    --color-white-translucent: rgba(255, 255, 255, 0.95);
    --color-white-glass: rgba(255, 255, 255, 0.1);
    
    --font-primary: 'Poppins', sans-serif;
    
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(0, 255, 240, 0.3);
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: var(--color-white);
}

/* Imagen de fondo fija */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.png'); /* CAMBIA ESTA RUTA */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -2;
}

/* Overlay con gradiente animado */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(2, 8, 80, 0.85) 0%, rgba(4, 16, 130, 0.75) 50%, rgba(6, 32, 153, 0.85) 50%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

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

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

/* ===== BUBBLES BACKGROUND ===== */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* CAMBIADO de 0 a 1 para que esté sobre el overlay */
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    border-radius: 50%;
    opacity: 0.3;
    animation: float-up linear infinite;
}

.bubble--cyan {
    background: radial-gradient(circle, var(--color-cyan) 0%, transparent 70%);
}

.bubble--blue {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
}

@keyframes float-up {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(var(--float-x)) scale(1.2);
        opacity: 0;
    }
}

/* ===== GEOMETRIC SHAPES ===== */
.shapes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.05;
    border: 2px solid var(--color-cyan);
}

.shape-1 {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    top: 10%;
    right: -150px;
    animation: rotate-slow 20s linear infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    left: -100px;
    transform: rotate(45deg);
    animation: rotate-slow 15s linear infinite reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    bottom: 20%;
    right: 10%;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.05;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.1;
    }
}

/* ===== MAIN CONTAINER ===== */
.container {
    position: relative;
    z-index: 2; /* CAMBIADO de 1 a 2 para estar sobre las burbujas */
    max-width: 500px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===== LOGO SECTION ===== */
.logo-section {
    margin-bottom: var(--spacing-lg);
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.logo-wrapper {
    width: 120px;
    height: 120px;
    background: var(--color-white-translucent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-base);
}

.logo-wrapper:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.logo {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* ===== HEADER SECTION ===== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: slideInUp 0.8s ease-out 0.2s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--color-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* ===== LINKS SECTION ===== */
.links-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.link-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-white-translucent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    text-decoration: none;
    color: var(--color-blue);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    overflow: hidden;
    cursor: pointer;
    animation: slideInLeft 0.6s ease-out both;
}

.link-button:nth-child(1) { animation-delay: 0.3s; }
.link-button:nth-child(2) { animation-delay: 0.4s; }
.link-button:nth-child(3) { animation-delay: 0.5s; }
.link-button:nth-child(4) { animation-delay: 0.6s; }
.link-button:nth-child(5) { animation-delay: 0.7s; }
.link-button:nth-child(6) { animation-delay: 0.8s; }
.link-button:nth-child(7) { animation-delay: 0.9s; }
.link-button:nth-child(8) { animation-delay: 1.0s; }
.link-button:nth-child(9) { animation-delay: 1.1s; }

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

.link-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--color-cyan);
}

.link-button:active {
    transform: scale(0.98);
}

/* Primary Button (Agendar Cita) */
.link-button--primary {
    background: linear-gradient(135deg, var(--color-cyan) 0%, #00d4c7 100%);
    color: var(--color-blue);
    border-color: var(--color-cyan);
    font-weight: 700;
    animation: slideInLeft 0.6s ease-out 1.0s both, pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: var(--shadow-md), 0 0 0 0 rgba(0, 255, 240, 0.7);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 20px 10px rgba(0, 255, 240, 0);
    }
}

.link-button--primary:hover {
    background: linear-gradient(135deg, #00d4c7 0%, var(--color-cyan) 100%);
}

.link-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition-bounce);
}

.link-button:hover .link-icon {
    transform: rotate(360deg) scale(1.2);
}

.link-text {
    flex: 1;
    text-align: center;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    pointer-events: none;
}

.ripple.active {
    animation: ripple-animation 0.6s ease-out;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== FOOTER SECTION ===== */
.footer {
    width: 100%;
    text-align: center;
    margin-top: auto;
    padding-top: var(--spacing-lg);
    animation: fadeIn 1s ease-out 1.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-cyan);
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}

.footer-text:last-child {
    margin-bottom: 0;
}

.footer-text a {
    color: var(--color-white);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-text a:hover {
    color: var(--color-cyan);
}

.footer-text i {
    margin-right: var(--spacing-xs);
    color: var(--color-cyan);
}

.footer-bottom {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 576px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }
    
    .container {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .link-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.95rem;
    }
    
    .logo-wrapper {
        width: 100px;
        height: 100px;
    }
}

@media screen and (min-width: 577px) and (max-width: 768px) {
    .container {
        max-width: 600px;
    }
}

/* ===== ACCESSIBILITY ===== */
.link-button:focus {
    outline: 3px solid var(--color-cyan);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .bubbles-container,
    .shapes-container {
        display: none;
    }
}
