/* ------------------------------
   ESTILO GENERAL 357SURFSAIL
------------------------------ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

:root {
    --grad-x: 50%;
    --grad-y: 50%;
    --scroll-offset: 0px;

    --glass-bg: rgba(255, 255, 255, 0.16);
    --glass-border: rgba(255, 255, 255, 0.25);
    
    /* Colores accesibles con contraste WCAG AA */
    --primary-blue: #0e3c67;
    --primary-dark: #0a2a4a;
    --primary-light: #22679a;
    --text-dark: #1a1a1a;
    --text-light: #444444;
    --white: #ffffff;
    --focus-outline: #0055aa;
}

/* Mejoras de accesibilidad en focus */
*:focus {
    outline: 3px solid var(--focus-outline);
    outline-offset: 2px;
}

/* Skip link para teclado */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-blue);
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
    outline: 3px solid var(--focus-outline);
}

/* Background general con contraste mejorado */
body {
    background-attachment: fixed;
    background: linear-gradient(to right, #FFAFBD, #C9FFBF);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px; /* Tamaño base accesible */
}

/* Mejora de contraste para texto */
p, li {
    color: var(--text-dark);
    line-height: 1.7;
}

/* ------------------------------
   NAVBAR MEJORADA
------------------------------ */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    padding: 18px 0;
    background: rgba(255, 255, 255, 0.95); /* Mayor contraste */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.navbar ul {
    display: flex;
    justify-content: center;
    gap: 40px;
    list-style: none;
    padding: 0 20px;
}

.navbar a {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
    transition: 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.navbar a:hover,
.navbar a:focus {
    color: var(--focus-outline);
    background: rgba(0, 85, 170, 0.1);
    transform: scale(1.05);
}

/* ------------------------------
   SECCIONES ACCESIBLES
------------------------------ */
.section-full {
    padding: 120px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    scroll-margin-top: 80px; /* Para anclas con navbar fijo */
}

.content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* ------------------------------
   SECCIÓN PERFIL MEJORADA
------------------------------ */
.profile-section {
    display: flex;
    justify-content: center;
    text-align: center;
}

.profile-content {
    max-width: 900px;
}

.image-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.profile-picture {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 4px solid var(--primary-blue);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transition: 0.4s ease;
}

.profile-picture:hover,
.profile-picture:focus {
    transform: scale(1.05) rotate(2deg);
}

.name {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.title {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.divider {
    width: 80px;
    height: 3px;
    background: var(--primary-blue);
    margin: 12px auto 18px auto;
    border-radius: 5px;
}

.biography-text {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Call to Action mejorado */
.cta-container {
    margin-top: 30px;
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-blue);
}

.cta-button:hover,
.cta-button:focus {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 60, 103, 0.3);
}

/* ------------------------------
   CURSOS MEJORADOS
------------------------------ */
.courses-section h2 {
    color: var(--primary-dark);
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

/* GALERÍA ACCESIBLE */
.course-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 45px;
}

.course-img {
    width: 100%;
    padding-bottom: 70%;
    border-radius: 25px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: 0.4s ease;
    cursor: pointer;
}

/* GLASS HOVER MEJORADO */
.glass {
    backdrop-filter: blur(7px);
    border: 1px solid rgba(255,255,255,0.28);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.course-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.0);
    transition: 0.4s ease;
}

.course-img:hover,
.course-img:focus {
    transform: scale(1.04);
    box-shadow: 0 12px 35px rgba(0,0,0,0.22);
}

.course-img:hover::after,
.course-img:focus::after {
    background: rgba(255,255,255,0.14);
}

/* CARD CURSO DESTACADO MEJORADO */
.course-card {
    padding: 35px;
    border-radius: 25px;
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.32);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    transition: 0.4s ease;
    animation: fadeUp 0.8s ease forwards;
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Capa brillante tipo Apple Fitness */
.course-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom right, 
        rgba(255,255,255,0.55),
        rgba(255,255,255,0.15)
    );
    opacity: 0.18;
    pointer-events: none;
}

/* Hover con efecto de luz igual a las imágenes */
.course-card:hover,
.course-card:focus {
    transform: scale(1.03);
    box-shadow: 0 18px 45px rgba(0,0,0,0.22);
}

.course-card:hover::before,
.course-card:focus::before {
    opacity: 0.30;
}

.course-card h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 18px;
    font-weight: 700;
}

.course-card p, 
.course-card li {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.course-card ul {
    margin-top: 15px;
    padding-left: 20px;
    color: var(--text-dark);
}

/* Detalles del curso mejorados */
.course-details {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
}

.course-details p {
    margin-bottom: 8px;
    font-size: 1rem;
}

/* ANIMACIÓN */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------
   CONTACTO MEJORADO
------------------------------ */
.contact-section h2 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-bottom: 20px;
}

.contact-details {
    margin: 25px 0;
}

.contact-details p {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.contact-details a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover,
.contact-details a:focus {
    color: var(--primary-dark);
    text-decoration: underline;
}

.social-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.social-btn {
    padding: 12px 22px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    transition: 0.3s ease;
    border: 2px solid transparent;
}

.social-btn:hover,
.social-btn:focus {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    border-color: rgba(255,255,255,0.5);
}

.whatsapp { background: #25D366; }
.instagram { background: #E1306C; }
.facebook { background: #1877F2; }

/* Formulario de contacto */
.contact-form-container {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.contact-form-container h3 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    background: rgba(255,255,255,0.8);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 60, 103, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover,
.submit-btn:focus {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(14, 60, 103, 0.3);
}

/* ------------------------------
   FOOTER MEJORADO
------------------------------ */
footer {
    text-align: center;
    padding: 25px;
    background: var(--primary-dark);
    color: white;
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: white;
    text-decoration: underline;
}

/* ------------------------------
   RESPONSIVE MEJORADO
------------------------------ */
@media (max-width: 900px) {
    .course-gallery { 
        grid-template-columns: 1fr 1fr; 
        gap: 20px;
    }
    
    .section-full {
        padding: 100px 20px;
    }
}

@media (max-width: 700px) {
    .course-gallery { 
        grid-template-columns: 1fr; 
    }
    
    .navbar ul { 
        gap: 20px; 
        flex-wrap: wrap;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-btn {
        width: 200px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .name { 
        font-size: 2rem; 
    }
    
    .profile-picture { 
        width: 150px; 
        height: 150px; 
    }
    
    .course-card {
        padding: 25px 20px;
    }
    
    .contact-form-container {
        padding: 20px 15px;
    }
}

@media (max-width: 400px) {
    .navbar ul {
        gap: 10px;
    }
    
    .navbar a {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

/* Título de Cursos animado */
#titulo-cursos {
    transition: 0.6s ease;
}

/* Cuando el usuario entra a la sección */
.titulo-activo {
    background: linear-gradient(90deg, var(--primary-dark), #0aa8d8, #00eaff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.4));
}

/* Mejora de contraste para modo alto contraste */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #003366;
        --primary-dark: #001a33;
        --text-dark: #000000;
    }
    
    .glass {
        background: rgba(255,255,255,0.9) !important;
        border: 2px solid #000 !important;
    }
}

/* Reduce motion para usuarios sensibles */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}

/* Fondo animado solo en la sección cursos */
#cursos {
    background: radial-gradient(
        circle at var(--grad-x) var(--grad-y),
        rgba(255, 255, 255, 0.12),
        rgba(0, 0, 0, 0)
    );
    background-size: 200% 200%;
    transition: background 0.3s ease-out;
}

/* Tarjetas movimiento parallax */
.course-card {
    transform: translateY(calc(var(--scroll-offset) / 12));
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* -------------------------- */
/* 🎇 PARTÍCULAS FLOTANTES */
/* -------------------------- */
.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.45);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
    filter: blur(2px);
    animation: floatUp 8s linear forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-260px) scale(0.35);
        opacity: 0;
    }
}

/* -------------------------- */
/* ✨ REVEAL ANIMADO TARJETAS */
/* -------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    filter: blur(6px);
    transition: all 0.9s cubic-bezier(.2,.9,.3,1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
}
.hidden {
    display: none !important;
}