/* ====================================
   Compa?ia Ventura - Modern CSS Styles
   Maintaining original structure with modern design
   ==================================== */

/* CSS Custom Properties */
:root {
    --primary-color: #0f70b7;
    --primary-hover: #0a436f;
    --secondary-color: #0a436f;
    --success-color: #28a745;
    --success-hover: #218838;
    --warning-color: #ffc107;
    --warning-hover: #d97706;
    --danger-color: #dc3545;
    --danger-hover: #bb2d3b;
    --info-color: #0d6efd;
    --info-hover: #0b5ed7;
    --light-bg: #f8fafb;
    --white: #ffffff;
    --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;
    /* Modern Gradients */
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 6px 15px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
    --border-radius-full: 50rem;
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);

    /* Table action buttons */
    --btn-table-padding: 0.2rem 0.4rem;
    --btn-table-font-size: 0.65rem;
    --btn-table-line-height: 1;

    /* Hover backgrounds */
    --primary-hover-bg: rgba(15, 112, 183, 0.1);

    /* Overlays */
    --hero-overlay-bg: rgba(0, 0, 0, 0.55);
    --modal-backdrop: rgba(0, 0, 0, 0.5);

    /* Auth pages */
    --auth-card-bg: var(--white);
    --auth-border-accent: rgba(15, 112, 183, 0.2);

    /* Bank brand colors */
    --bank-bcp-color: #0033A0;
    --bank-bbva-color: #004481;
    --bank-ibk-color: #009A44;
    --bank-ibk-alt-color: #00A650;
    --bank-ibk-emp-color: #00694B;
    --bank-bn-color: #8B0000;

    /* Yape/Plin */
    --yape-color: #6B21A8;
    --plin-color: #00A650;

    /* White transparency scale */
    --white-alpha-5: rgba(255, 255, 255, 0.05);
    --white-alpha-8: rgba(255, 255, 255, 0.08);
    --white-alpha-10: rgba(255, 255, 255, 0.1);
    --white-alpha-12: rgba(255, 255, 255, 0.12);
    --white-alpha-15: rgba(255, 255, 255, 0.15);
    --white-alpha-20: rgba(255, 255, 255, 0.2);
    --white-alpha-25: rgba(255, 255, 255, 0.25);
    --white-alpha-30: rgba(255, 255, 255, 0.3);
    --white-alpha-50: rgba(255, 255, 255, 0.5);
    --white-alpha-60: rgba(255, 255, 255, 0.6);
    --white-alpha-70: rgba(255, 255, 255, 0.7);
    --white-alpha-80: rgba(255, 255, 255, 0.8);
    --white-alpha-90: rgba(255, 255, 255, 0.9);
    --white-alpha-95: rgba(255, 255, 255, 0.95);

    /* Black transparency scale */
    --black-alpha-10: rgba(0, 0, 0, 0.1);
    --black-alpha-15: rgba(0, 0, 0, 0.15);
    --black-alpha-20: rgba(0, 0, 0, 0.2);
    --black-alpha-25: rgba(0, 0, 0, 0.25);
    --black-alpha-30: rgba(0, 0, 0, 0.3);
    --black-alpha-40: rgba(0, 0, 0, 0.4);
    --black-alpha-45: rgba(0, 0, 0, 0.45);
    --black-alpha-50: rgba(0, 0, 0, 0.5);
    --black-alpha-60: rgba(0, 0, 0, 0.6);

    /* Primary/Danger transparency */
    --primary-alpha-15: rgba(15, 112, 183, 0.15);
    --primary-alpha-25: rgba(15, 112, 183, 0.25);
    --danger-alpha-40: rgba(220, 53, 69, 0.4);
    --danger-alpha-70: rgba(220, 53, 69, 0.7);
    --danger-alpha-80: rgba(220, 53, 69, 0.8);

    /* WhatsApp */
    --whatsapp-green: #25d366;

    /* Chat */
    --chat-bot-bg: #f0f2f5;
    --chat-text-dark: #1a1a1a;
    --chat-text-muted: #666666;
    --chat-border: #e0e0e0;
    --chat-disabled: #cccccc;
    --chat-hint-color: #e67e22;
    --chat-input-border: #dddddd;
    --chat-divider: #e8e8e8;
    --chat-dot-color: #999999;

    /* Landing */
    --landing-dropdown-bg: rgba(15, 23, 42, 0.92);
}

/* Table action buttons — standardized size for all admin tables */
.btn.btn-table {
    padding: var(--btn-table-padding) !important;
    font-size: var(--btn-table-font-size) !important;
    line-height: var(--btn-table-line-height) !important;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed header */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--light-bg);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
}

/* Navigation Styles */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    transition: all var(--transition-normal);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1030; /* Ensure navbar stays on top */
}

    .navbar.scrolled {
        background-color: rgba(255, 255, 255, 0.98) !important;
        box-shadow: var(--shadow-md);
    }

/* Fix any potential white space issues */
#header-container {
    position: relative;
    z-index: 1030;
}

#home {
    position: relative;
    z-index: 1;
}

/* Ensure hero carousel takes full viewport */
#heroCarousel .carousel-inner,
#heroCarousel .carousel-item {
    height: 100vh;
}

.carousel-item {
    background-color: transparent;
}

.navbar-brand {
    transition: transform var(--transition-normal);
}

    .navbar-brand:hover {
        transform: scale(1.05);
    }

    .navbar-brand img {
        transition: filter var(--transition-normal);
    }

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--gray-700) !important;
    transition: all var(--transition-normal);
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
    position: relative;
}

    .navbar-nav .nav-link:hover {
        color: var(--primary-color) !important;
        background-color: var(--primary-hover-bg);
        transform: translateY(-1px);
    }

    .navbar-nav .nav-link.btn-primary {
        color: white !important;
        background-color: var(--primary-color);
        border: none;
    }

        .navbar-nav .nav-link.btn-primary:hover {
            color: white !important;
            background: var(--primary-hover);
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

/* Dropdown Styles */
.dropdown-menu {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 280px;
}

.dropdown-header {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.875rem;
    padding: 0.75rem 1rem 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    transition: all var(--transition-fast);
    border-radius: 0;
}

    .dropdown-item:hover {
        background-color: var(--gray-100);
        color: var(--primary-color);
        padding-left: 1.25rem;
    }

    .dropdown-item i {
        width: 20px;
        text-align: center;
        margin-right: 0.5rem;
        color: var(--primary-color);
    }

    .dropdown-item:hover i {
        color: var(--primary-color);
    }

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--gray-200);
}

/* User dropdown toggle - override nav-link gray color */
.navbar-nav .nav-link.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color);
    font-weight: 600;
}

    .navbar-nav .nav-link.btn-outline-primary:hover,
    .navbar-nav .nav-link.btn-outline-primary:focus,
    .navbar-nav .nav-link.btn-outline-primary.show {
        color: var(--white) !important;
        background-color: var(--primary-color);
        border-color: var(--primary-color);
        transform: none;
    }

    .navbar-nav .nav-link.btn-outline-primary:hover i,
    .navbar-nav .nav-link.btn-outline-primary:focus i,
    .navbar-nav .nav-link.btn-outline-primary.show i {
        color: var(--white) !important;
    }

/* Mobile Navigation */
.navbar-toggler {
    border: none;
    padding: 0.375rem 0.5rem;
}

    .navbar-toggler:focus {
        box-shadow: none;
    }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }

        .navbar-nav .nav-link {
            padding: 0.75rem 1rem;
            margin: 0.25rem 0;
        }

    .dropdown-menu {
        box-shadow: none;
        border: 1px solid var(--gray-200);
        margin-top: 0;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

    .loading-screen.hidden {
        opacity: 0;
        visibility: hidden;
    }

    .loading-screen p {
        color: white;
        margin-top: 2rem;
        font-size: 1rem;
        font-weight: 500;
    }

.spinner {
    width: 70px;
    text-align: center;
}

    .spinner > div {
        width: 18px;
        height: 18px;
        background-color: white;
        border-radius: 100%;
        display: inline-block;
        animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    }

    .spinner .bounce1 {
        animation-delay: -0.32s;
    }

    .spinner .bounce2 {
        animation-delay: -0.16s;
    }

@keyframes sk-bouncedelay {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.8rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.55rem;
}

h4 {
    font-size: 1.35rem;
}

h5 {
    font-size: 1.15rem;
}

h6 {
    font-size: 0.9rem;
}

.display-4 {
    font-size: 3.15rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6;
}

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

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-muted {
    color: var(--gray-600) !important;
}

/* Section Styling */
section {
    padding: 5rem 0;
    position: relative;
}

    section h2.fw-bold {
        color: var(--primary-color) !important;
        position: relative;
        display: inline-block;
        margin: 0 auto 3rem;
    }

        section h2.fw-bold::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 4px;
            background-color: var(--primary-color);
            border-radius: var(--border-radius-sm);
        }

    section h2.fw-bold.text-white {
        color: var(--white) !important;
    }

        section h2.fw-bold.text-white::after {
            background-color: rgba(255, 255, 255, 0.5);
        }

/* Carousel arrows — service color (recomendados, etc.) */
.recomendados-arrow.carousel-control-prev,
.recomendados-arrow.carousel-control-next {
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 9999px;
    background: var(--service-color);
    opacity: 0.85;
}

.recomendados-arrow.carousel-control-prev:hover,
.recomendados-arrow.carousel-control-next:hover {
    opacity: 1;
}

.recomendados-arrow .carousel-control-prev-icon,
.recomendados-arrow .carousel-control-next-icon {
    width: 1.2rem;
    height: 1.2rem;
    filter: brightness(0) invert(1);
}

/* Hero Section */
#heroCarousel {
    position: relative;
    overflow: hidden;
    margin-top: 0;
    min-height: 100vh;
    height: 100vh;
}

#home {
    margin-top: 0;
    padding-top: 0;
}

.hero-slide-content {
    height: 100vh;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 0;
}

.main-hero {
    background-image: url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?ixlib=rb-4.0.3&auto=format&fit=crop&w=2071&q=80');
    background-color: var(--primary-color);
    background-blend-mode: overlay;
}

/* Ensure sections after hero have proper spacing */
section:not(#home) {
    margin-top: 0;
}

#nosotros {
    padding-top: 5rem;
}

.hero-overlay {
    background-color: rgba(0, 0, 0, 0.3);
}

.hero-slide-content .container {
    position: relative;
    z-index: 2;
}

.hero-logo {
    max-width: 300px;
    height: auto;
    filter: drop-shadow(var(--shadow-lg));
    transition: transform var(--transition-normal);
}

    .hero-logo:hover {
        transform: scale(1.05);
    }

/* UNIFIED Carousel Controls - ELIMINAR DUPLICADOS */
.carousel {
    z-index: 1;
}

    .carousel.carousel-fade .carousel-item {
        transition-property: opacity;
        transform: none;
    }

        .carousel.carousel-fade .carousel-item.active {
            opacity: 1;
        }

        .carousel.carousel-fade .carousel-item:not(.active) {
            opacity: 0;
        }

/* Carousel Indicators - REGLA UNIFICADA */
.carousel-indicators {
    z-index: 2;
}

    .carousel-indicators button {
        width: 18px;
        height: 4px;
        border-radius: 999px;
        margin: 0 6px;
        background-color: rgba(0, 0, 0, 0.2);
        border: 0;
        opacity: 0.8;
        transition: all var(--transition-normal);
        cursor: pointer;
    }

        .carousel-indicators button.active {
            opacity: 1;
            width: 28px;
            background-color: var(--primary-color);
            transform: none;
        }

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: opacity var(--transition-normal);
    z-index: 2;
}

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        opacity: 1;
    }

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    filter: drop-shadow(var(--shadow));
}

/* Button Styles */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius-full);
    padding: 0.75rem 2rem;
    transition: all var(--transition-normal);
    text-decoration: none;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

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

.modal-body .btn-outline-primary,
.modal-body .btn-outline-danger,
.modal-footer .btn {
    padding: 0.42rem 1.5rem;
}

.modal-body .nav-pills .nav-link:not(.active) {
    border: 1px solid var(--gray-400);
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

    .btn-primary:hover {
        background: var(--primary-hover);
        border-color: var(--primary-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        color: white;
    }

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

    .btn-success:hover {
        background: var(--success-hover);
        border-color: var(--success-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        color: white;
    }

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    transition: all var(--transition-normal);
    overflow: hidden;
    background: var(--white);
}

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

.card-body {
    padding: 2rem;
}

/* Icons */
.mission-icon,
.vision-icon,
.feature-icon {
    font-size: 3rem !important;
}

.mission-icon {
    color: var(--primary-color);
}

.vision-icon {
    color: var(--success-color);
}

.feature-icon {
    color: var(--primary-color);
}

/* Products Section */
#productos .list-group {
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
}

#productos .list-group-item {
    border: none;
    padding: 1.25rem 1.5rem;
    transition: all var(--transition-normal);
    background: var(--white);
}

    #productos .list-group-item:hover {
        background: var(--gray-100);
        transform: translateX(5px);
    }

    #productos .list-group-item.active {
        background-color: var(--primary-color);
        color: white;
        transform: translateX(10px);
    }

#productosCarousel {
    overflow: hidden;
}

.product-description {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Products, Testimonials, Team - see consolidated rules below */

/* Contact Form */
#contacto .card {
    border: 1px solid var(--gray-200);
    backdrop-filter: blur(10px);
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.375rem 0.75rem;
    transition: all var(--transition-normal);
    background: var(--white);
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(15, 112, 183, 0.25);
        background: var(--white);
    }

    .form-control.is-invalid {
        border-color: var(--danger-color);
    }

    .form-control.is-valid {
        border-color: var(--success-color);
    }

.invalid-feedback {
    display: block;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Social Icons - see consolidated rules below */

/* MODAL FIXES - VERSI?N MEJORADA */
.modal-content {
    border-radius: var(--border-radius-2xl);
    border: none;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background-color: var(--primary-color);
    border: none;
    padding: 1.5rem 2rem;
}

    .modal-header.bg-warning {
        background-color: var(--warning-color) !important;
        color: var(--gray-800) !important;
    }

.modal-title {
    color: white;
    font-weight: 700;
}

.modal-header.bg-warning .modal-title {
    color: var(--gray-800) !important;
}

.modal-body {
    padding: 2.5rem;
}

.promo-image {
    max-height: 350px;
    object-fit: cover;
    width: 100%;
    border-radius: var(--border-radius-lg);
}

/* CR?TICO: Modal Backdrop Fix */
.modal-backdrop {
    z-index: 1040;
    background-color: rgba(0, 0, 0, 0.5);
}

    .modal-backdrop.fade {
        opacity: 0;
        transition: opacity 0.15s linear;
    }

    .modal-backdrop.show {
        opacity: 0.5;
    }

/* Prevenir problemas de scroll cuando el modal est? abierto */
body.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
}

/* Under Construction Modal Specific Styles */
#underConstructionModal .modal-body {
    background-color: var(--light-bg);
}

#underConstructionModal .bi-cone-striped {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Utilities */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded-2 {
    border-radius: var(--border-radius) !important;
}

.rounded-3 {
    border-radius: var(--border-radius-lg) !important;
}

.rounded-4 {
    border-radius: var(--border-radius-xl) !important;
}

.rounded-pill {
    border-radius: var(--border-radius-full) !important;
}

/* Background Colors */
.bg-light {
    background-color: var(--light-bg) !important;
}

.bg-white {
    background-color: var(--white) !important;
}

/* Loading screen que no interfiera */
.loading-screen {
    z-index: 9999;
}

/* Prevenir overflow horizontal */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .display-4 {
        font-size: 2.7rem;
    }
}

@media (max-width: 992px) {
    section {
        padding: 4rem 0;
    }

    .display-4 {
        font-size: 2.25rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    .display-4 {
        font-size: 1.8rem;
    }

    .hero-slide-content {
        height: auto;
        min-height: 100vh;
        padding: 2rem 0;
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }

    .btn-lg {
        padding: 1rem 2rem;
        font-size: 0.95rem;
    }

    .hero-logo {
        max-width: 250px;
    }

    #productos .list-group-item {
        text-align: center;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.55rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    section {
        padding: 2rem 0;
    }

    .display-4 {
        font-size: 1.55rem;
    }

    .lead {
        font-size: 1rem;
    }

    .hero-logo {
        max-width: 200px;
    }

    .btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-header {
        padding: 1rem 1.25rem;
    }

    section h2.fw-bold::after {
        width: 40px;
        height: 3px;
    }
}

/* Animation Enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

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

    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.list-group-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators,
    #promoModal,
    #loading-screen {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid var(--gray-300) !important;
    }
}



/* CSS Adicional para optimizar con datos reales */

/* Team Member Cards Mejoradas */
.team-member-card {
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

.team-member-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    transition: all var(--transition-normal);
}

    .team-member-img:hover {
        transform: scale(1.05);
        border-color: var(--secondary-color);
        box-shadow: var(--shadow-lg);
    }

/* Social Icons */
.social-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all var(--transition-normal);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

    .social-icon:hover {
        transform: translateY(-3px) scale(1.1);
        background: rgba(255, 255, 255, 0.2);
        box-shadow: var(--shadow);
    }

/* Product slides con mejor espaciado */
.product-slide-img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
}

/* Testimonial cards mejoradas */
.testimonial-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.stars i {
    color: var(--warning-color);
    font-size: 1rem;
    margin: 0 1px;
}

/* Hero slides con overlay solido */
.hero-slide-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--hero-overlay-bg, rgba(0, 0, 0, 0.55));
    z-index: 1;
}

/* Botones de acci?n mejorados */
.btn-group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .btn-group-actions {
        justify-content: flex-start;
    }
}

/* Loading screen con mejor animaci?n */
.loading-screen {
    backdrop-filter: blur(10px);
}

    .loading-screen .spinner > div {
        animation-duration: 1.2s;
    }

/* Cards con hover effect mejorado */
.card {
    position: relative;
    overflow: hidden;
}

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.05);
        transition: left 0.5s ease;
        z-index: 1;
    }

    .card:hover::before {
        left: 100%;
    }

.card-body {
    position: relative;
    z-index: 2;
}

/* Verificaci?n badge para testimonios */
.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .team-member-img {
        width: 100px;
        height: 100px;
    }

    .team-member-card {
        padding: 1rem;
    }

    .product-slide-img {
        max-width: 80px;
        max-height: 80px;
    }

    .social-icon {
        font-size: 1.5rem !important;
        padding: 0.375rem;
    }
}

/* Error messages styling */
.alert-warning {
    border-left: 4px solid var(--warning-color);
    background: rgba(255, 193, 7, 0.1);
    backdrop-filter: blur(10px);
}

/* Smooth transitions for all elements */
* {
    transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

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

    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-hover);
    }

/* Focus improvements for accessibility */
.btn:focus-visible,
.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible,
.carousel-indicators button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(15, 112, 183, 0.25);
}

/* Print optimizations */
@media print {
    .social-icon,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators,
    .btn {
        display: none !important;
    }

    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}





/* ====================================
   Image Loading Optimization
   ==================================== */
img[loading="lazy"] {
    background-color: var(--gray-200);
    transition: opacity 0.3s ease;
}

/* ====================================
   Shared Utility Classes
   ==================================== */

/* Modal backdrop custom overlay */
.modal-backdrop-custom {
    background-color: var(--modal-backdrop);
    transition: opacity var(--transition-normal);
}

/* Search input */
.search-input {
    max-width: 300px;
}

/* Table thumbnail */
.table-thumbnail {
    height: 40px;
    width: auto;
}

/* Footer logo small */
.footer-logo-sm {
    max-width: 80px;
}

/* ===== FOOTER SHARED (Footer + ServiceFooter) ===== */
.footer {
    background-color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.footer::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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: 1;
}

.footer .container {
    position: relative;
    z-index: 2;
}

.footer h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--warning-color);
    border-radius: 2px;
}

.footer h6 {
    color: var(--warning-color);
    font-weight: 600;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--white-alpha-70) !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    color: var(--white) !important;
    transform: translateX(8px);
    text-shadow: 0 0 10px var(--white-alpha-30);
}

.footer-links a i {
    width: 20px;
    color: var(--warning-color);
    transition: all var(--transition-normal);
}

.footer-links a:hover i {
    color: var(--white);
    transform: scale(1.2);
}

.contact-info div {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.contact-info div:hover {
    background: var(--white-alpha-10);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

.contact-info a {
    color: var(--white-alpha-70) !important;
    text-decoration: none !important;
    transition: all var(--transition-normal);
}

.contact-info a:hover {
    color: var(--white) !important;
    text-shadow: 0 0 8px var(--white-alpha-50);
}

.contact-info i {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--white-alpha-10);
    color: var(--white-alpha-80) !important;
    text-decoration: none !important;
    border-radius: 50%;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    border: 1px solid var(--white-alpha-20);
}

.footer-social-icon:hover {
    background: var(--white-alpha-20);
    color: var(--white) !important;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px var(--black-alpha-30);
}

.footer-social-icon:hover .bi-facebook  { color: #1877f2 !important; }
.footer-social-icon:hover .bi-tiktok    { color: #ff0050 !important; }
.footer-social-icon:hover .bi-youtube   { color: #ff0000 !important; }
.footer-social-icon:hover .bi-instagram { color: #e4405f !important; }
.footer-social-icon:hover .bi-whatsapp  { color: #25d366 !important; }
.footer-social-icon:hover .bi-linkedin  { color: #0077b5 !important; }
.footer-social-icon:hover .bi-twitter   { color: #1da1f2 !important; }

.company-info {
    text-align: center;
}

.company-info .text-warning {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.footer-logo {
    transition: all var(--transition-normal);
    opacity: 0.85;
    border-radius: var(--border-radius-sm);
    max-width: 80px;
    filter: brightness(0) invert(1);
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px var(--white-alpha-50));
}

.footer hr {
    border-color: var(--white-alpha-20) !important;
    margin: 2rem 0 1.5rem !important;
}

.footer .text-white-50 {
    color: var(--white-alpha-70) !important;
}

.footer .text-white {
    color: var(--white) !important;
}

@media (max-width: 768px) {
    .footer {
        padding: 3rem 0 2rem !important;
    }
    .footer h5 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    .footer-social-icon {
        width: 45px;
        height: 45px;
    }
    .footer-links a {
        font-size: 0.9rem;
    }
    .contact-info {
        text-align: center;
    }
    .company-info {
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .footer .col-lg-3,
    .footer .col-lg-4,
    .footer .col-lg-2 {
        margin-bottom: 2rem;
    }
    .footer .row:last-child .col-md-8,
    .footer .row:last-child .col-md-4 {
        text-align: center !important;
    }
    .footer .row:last-child .col-md-4 {
        margin-top: 1rem;
    }
}

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

.footer .col-lg-3,
.footer .col-lg-4,
.footer .col-lg-2,
.footer .col-md-6 {
    animation: footerFadeIn 0.6s ease-out forwards;
}

.footer .col-lg-3:nth-child(1) { animation-delay: 0.1s; }
.footer .col-lg-4:nth-child(2) { animation-delay: 0.2s; }
.footer .col-lg-3:nth-child(3) { animation-delay: 0.3s; }
.footer .col-lg-2:nth-child(4) { animation-delay: 0.4s; }

.footer a:focus {
    outline: 2px solid var(--warning-color);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

@media print {
    .footer {
        background: var(--primary-color) !important;
        color: white !important;
        padding: 1rem 0 !important;
    }
    .footer-social-icon,
    .footer a[href^="tel:"],
    .footer a[href^="mailto:"],
    .footer a[href^="https://wa.me"] {
        display: none !important;
    }
}

/* Icon sizing */
.icon-lg {
    font-size: 2.5rem;
}

.icon-xl {
    font-size: 3rem;
}

/* Min-height utilities */
.min-h-300 {
    min-height: 300px;
}

.min-h-200 {
    min-height: 200px;
}

/* Course card image sizing */
.course-card-img {
    height: 180px;
    object-fit: cover;
    object-position: top;
    aspect-ratio: 400 / 180;
}

/* Pulse glow animation */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 0 20px rgba(220, 53, 69, 0.7); }
}

/* Readonly field styling */
.field-readonly {
    background-color: var(--gray-100) !important;
    border: 1px solid var(--gray-200) !important;
    color: var(--gray-700);
    cursor: default;
}

.field-readonly:focus {
    border-color: var(--gray-200) !important;
    box-shadow: none !important;
    background-color: var(--gray-100) !important;
}

/* Sub-group heading */
.subgroup-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0;
}

/* Alumno info section */
.alumno-info-section {
    background-color: var(--gray-100);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--gray-200);
}

.alumno-data-grid .alumno-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-500);
    margin-bottom: 1px;
}

.alumno-data-grid .alumno-value {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-800);
    line-height: 1.3;
}

/* Avatar styles */
.avatar-container {
    width: 120px;
    height: 120px;
}

.avatar-placeholder-icon {
    font-size: 80px;
}

.avatar-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Auth container */
.auth-container {
    background-image: url('/placeholder.svg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* ====================================
   Image Preview Modal (global - needs to escape scoped CSS)
   ==================================== */
.img-preview-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: imgPreviewFadeIn 0.2s ease;
}

.img-preview-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: imgPreviewZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100000;
}

.img-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
}

.img-preview-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.img-preview-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.img-preview-btn {
    background: none;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    color: #555;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.img-preview-btn:hover {
    background: #f0f4ff;
    border-color: #1a73e8;
    color: #1a73e8;
}

.img-preview-body {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #f8f9fa;
}

.img-preview-body img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
}

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

@keyframes imgPreviewZoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ====================================
   Legal Pages (Términos, Privacidad, Devoluciones)
   ==================================== */

.legal-page {
    overflow-x: hidden;
}

.legal-page .hero-section {
    padding-top: 6.5rem;
    padding-bottom: 2rem;
}

.legal-page .hero-section h1 {
    word-break: break-word;
}

.legal-page .hero-section-bg {
    background-color: var(--primary-color);
}

.legal-content h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--gray-200);
}

.legal-content h2:first-of-type {
    margin-top: 0.5rem;
}

.legal-content h3 {
    color: var(--gray-800);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.legal-content p {
    color: var(--gray-700);
    line-height: 1.75;
    text-align: justify;
}

.legal-content ul,
.legal-content ol {
    color: var(--gray-700);
    line-height: 1.75;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.35rem;
}

.legal-content strong {
    color: var(--gray-900);
}

@media (max-width: 575.98px) {
    .legal-page .hero-section {
        padding-top: 5rem;
        padding-bottom: 1.5rem;
    }

    .legal-page .hero-section h1 {
        font-size: 1.3rem;
    }

    .legal-content h2 {
        font-size: 1.2rem;
    }

    .legal-content {
        padding: 1.25rem !important;
    }
}

