/* 
 * Rinsa Inc. - Estilos personalizados
 * Diseño moderno, fresco, tecnológico y profesional
 */

/* ===== Variables y configuración base ===== */
:root {
    --primary: #05305a;
    --primary-dark: #042544;
    --primary-light: #0a4a85;
    --secondary: #587764;
    --secondary-dark: #3e5346;
    --accent: #a78736;
    --accent-light: #c9a44d;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --transition-fast: 0.3s;
    --transition-medium: 0.5s;
    --transition-slow: 0.8s;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* ===== Estilos generales ===== */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    color: var(--gray-800);
}

::selection {
    background-color: var(--accent);
    color: white;
}

/* ===== Preloader ===== */
#preloader {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* ===== Navbar ===== */
#navbar {
    background-color: transparent;
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background-color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-link {
    color: white;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-nav-link {
    color: white;
    font-size: 1.25rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--accent);
}

/* ===== Botones ===== */
.btn-primary {
    background-color: var(--accent);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid var(--accent);
    text-decoration: none;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(167, 135, 54, 0.2);
}

.btn-accent {
    background-color: white;
    color: var(--primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid white;
    text-decoration: none;
}

.btn-accent:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

/* ===== Hero Section con animación interactiva ===== */
#interactive-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.typewrite {
    position: relative;
    display: inline-block;
}

.typewrite::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== Nosotros Section ===== */
.principle-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1;
    min-width: 100px;
}

.principle-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.metric-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.metric-circle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.world-map {
    background-image: url('https://cdn.jsdelivr.net/npm/world-map-svg@1.0.0/world-map.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    position: absolute;
    inset: 0;
}

/* ===== Servicios Section ===== */
.filter-btn {
    background-color: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.service-card {
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.service-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent);
    z-index: -1;
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.service-card:hover .service-icon::before {
    transform: scale(1);
}

.service-link {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary);
    font-weight: 600;
    padding-top: 1.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.service-link i {
    transition: transform 0.3s ease;
}

.service-card:hover .service-link {
    color: var(--accent);
}

.service-card:hover .service-link i {
    transform: translateX(5px);
}

/* ===== Programas Section ===== */
.program-tab {
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--gray-600);
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.program-tab:hover {
    color: var(--primary);
}

.program-tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tab-pane.active {
    display: block;
}

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

/* ===== Club Section ===== */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.club-card {
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.5s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.club-card:hover {
    transform: translateY(-10px) rotateY(5deg);
    box-shadow: var(--shadow-xl);
}

.club-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background-color: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.club-card:hover .club-icon {
    background-color: var(--accent);
    transform: rotate(10deg);
    border-radius: 50%;
}

.club-link {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary);
    font-weight: 600;
    padding-top: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.club-link i {
    transition: transform 0.3s ease;
}

.club-card:hover .club-link {
    color: var(--accent);
}

.club-card:hover .club-link i {
    transform: translateX(5px);
}

.testimonials-slider {
    padding: 2rem 0;
}

.testimonial-item {
    padding: 1rem;
}

/* ===== Agenda del Mes Section ===== */
.agenda-card {
    background-color: white;
    border-radius: 1.5rem;
    padding: 0;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--gray-200);
}

.agenda-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
}

.agenda-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.agenda-card:hover::before {
    transform: scaleX(1);
}

.agenda-date {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.agenda-date::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.agenda-card:hover .agenda-date::before {
    transform: scale(1);
}

.date-day {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.date-month {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

.agenda-content {
    padding: 1.5rem;
}

.agenda-category {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.agenda-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.agenda-card:hover .agenda-title {
    color: var(--accent);
}

.agenda-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.agenda-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.agenda-time,
.agenda-location {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.agenda-time i,
.agenda-location i {
    color: var(--accent);
    margin-right: 0.25rem;
}

/* Estadísticas de agenda */
.agenda-stat {
    padding: 1rem;
    text-align: center;
    position: relative;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.agenda-stat::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agenda-stat:hover::after {
    opacity: 1;
}

/* ===== Contacto Section ===== */
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(167, 135, 54, 0.2);
    outline: none;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--accent);
    transform: translateY(-5px);
}

/* ===== Footer ===== */
.footer-link {
    color: var(--gray-400);
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent);
}

/* ===== Botón volver arriba ===== */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top:hover {
    background-color: var(--primary);
    transform: translateY(-5px);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.3;
    }
    25% { 
        transform: translateY(-20px) translateX(10px) rotate(90deg);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-10px) translateX(-15px) rotate(180deg);
        opacity: 0.5;
    }
    75% { 
        transform: translateY(-30px) translateX(5px) rotate(270deg);
        opacity: 0.9;
    }
}

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

/* ===== Efectos especiales para la agenda ===== */
.agenda-card {
    position: relative;
    overflow: hidden;
}

.agenda-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.agenda-card:hover::after {
    left: 100%;
}

/* Efectos de partículas para elementos decorativos */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

/* ===== Media Queries ===== */
@media (max-width: 768px) {
    .principle-card {
        min-width: 80px;
        padding: 0.75rem;
    }
    
    .service-icon, .club-icon {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }
    
    .program-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .agenda-card {
        margin-bottom: 1.5rem;
    }
    
    .agenda-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .date-day {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .agenda-content {
        padding: 1rem;
    }
    
    .agenda-date {
        padding: 1rem;
    }
}

/* ===== Utilidades ===== */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.bg-primary-dark {
    background-color: var(--primary-dark);
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

/* ===== Efectos de cursor personalizado ===== */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent), transparent);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ===== Animaciones de entrada ===== */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out;
}