/* Modern Index CSS - Diseño Fluido y Moderno */

/* Variables CSS */
:root {
    --primary-gradient: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    --secondary-gradient: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --backdrop-blur: blur(10px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estilos Generales */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Text Gradient */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Navbar Moderno */
.navbar-modern {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: var(--transition-smooth);
}

.navbar-modern .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-modern .nav-link {
    color: #495057 !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition-smooth);
    position: relative;
}

.navbar-modern .nav-link:hover,
.navbar-modern .nav-link.active {
    color: #007bff !important;
    background: rgba(0, 123, 255, 0.1);
}

.navbar-modern .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.navbar-modern .nav-link:hover::after,
.navbar-modern .nav-link.active::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(108, 117, 125, 0.1) 100%);
    padding: 8rem 0 4rem;
    margin-top: 76px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    margin-top: 2rem;
}

.hero-image img {
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition-smooth);
}

.hero-image img:hover {
    transform: perspective(1000px) rotateY(0deg);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Modern Cards */
.modern-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-radius: 20px !important;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modern-card .card-body {
    padding: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    /* background: var(--primary-gradient); */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.feature-icon img {
    /* filter: brightness(0) invert(1); */
    max-height: 50px;
}

/* Glass Buttons */
.glass-btn {
    /* background: var(--glass-bg) !important; */
    /* backdrop-filter: var(--backdrop-blur); */
    /* -webkit-backdrop-filter: var(--backdrop-blur); */
    border: 1px solid var(--glass-border) !important;
    border-radius: 50px !important;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: var(--glass-shadow);
}

.glass-btn:hover {
    /* background: rgba(255, 255, 255, 0.2) !important; */
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

/* Override hover effect for secondary glass buttons */
button.btn-secondary.glass-btn:hover {
    background: var(--glass-bg) !important;
    color: #007bff !important; /* Añadido para contraste */
    transform: none;
    box-shadow: var(--glass-shadow);
}

/* Override active and focus effects for secondary glass buttons to prevent white background */
button.btn-secondary.glass-btn:active,
button.btn-secondary.glass-btn:focus {
    background: var(--glass-bg) !important;
    box-shadow: var(--glass-shadow);
    color: inherit; /* Maintain the original text color */
}

.btn-primary.glass-btn {
    background: var(--primary-gradient) !important;
    border: none !important;
}

.btn-outline-primary.glass-btn {
    background: transparent !important;
    color: #007bff;
    border: 2px solid #007bff !important;
}

.btn-outline-primary.glass-btn:hover {
    background: #007bff !important;
    color: white;
}

/* Glass Inputs */
.glass-input {
    background: rgba(255, 255, 255, 0.9) !important;
    /* border: 1px solid var(--glass-border) !important; */
    border-radius: 15px !important;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-smooth);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: translateY(-2px);
}

/* Modern Carousel */
.modern-carousel {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.modern-carousel .carousel-control-prev,
.modern-carousel .carousel-control-next {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    top: 50%;
    transform: translateY(-50%);
    margin: 0 2rem;
}

.glass-caption {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Footer Moderno */
.footer-modern {
    background: linear-gradient(135deg, #1B4965 0%, #2c3e50 100%);
    position: relative;
    overflow: hidden;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition-smooth);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    color: #007bff;
}

.back-to-top {
    color: white;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.back-to-top:hover {
    color: #007bff;
    transform: translateY(-2px);
}

/* Glass Dropdown */
.glass-dropdown {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border) !important;
    border-radius: 15px !important;
    box-shadow: var(--glass-shadow);
}

.glass-dropdown .dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--transition-smooth);
    border-radius: 10px;
}

.glass-dropdown .dropdown-item:hover {
    background: rgba(0, 123, 255, 0.1);
}

/* Glass Modal */
.glass-modal {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 2px solid rgba(0, 123, 255, 0.3) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Estilo mejorado para el botón de mostrar/ocultar contraseña */
.glass-modal .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 10px !important;
    transition: var(--transition-smooth);
}

.glass-modal .btn-outline-secondary:hover {
    background: rgba(0, 123, 255, 0.1) !important;
    border-color: #007bff !important;
    transform: translateY(-1px);
}

.glass-modal .input-group-text {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--glass-border) !important;
    border-right: none !important;
    border-radius: 10px 0 0 10px !important;
}

.glass-modal .form-control {
    border-left: none !important;
    border-radius: 0 10px 10px 0 !important;
}

.glass-modal .input-group:focus-within .input-group-text,
.glass-modal .input-group:focus-within .form-control {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

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

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

.feature-icon {
    animation: float 3s ease-in-out infinite;
}

.hero-image img {
    animation: pulse 4s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .modern-card .card-body {
        padding: 1.5rem;
    }
    
    .navbar-modern .nav-link {
        padding: 0.5rem;
        margin: 0.25rem 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* Focus States for Accessibility */
.glass-btn:focus,
.glass-input:focus,
.modern-card:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .modern-card {
        background: white !important;
        border: 2px solid #000 !important;
    }
    
    .glass-btn {
        background: white !important;
        border: 2px solid #000 !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .feature-icon,
    .hero-image img {
        animation: none;
    }
}
