/* ========================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ======================================== */

:root {
    --primary-color: #1565ae;
    --secondary-color: #6C63FF;
    --accent-color: #00D4FF;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --dark: #1F2937;
    --light: #F9FAFB;
    --text-dark: #111827;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ========================================
   HERO SECTION - REDISEÑO SUTIL
   ======================================== */

.hero-section-wrapper {
    position: relative;
    overflow: hidden;
}

.hero-features-container {
    animation: fadeInLeft 0.8s ease-out;
    max-width: 380px;
    padding-left: 0;
}

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

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

.hero-feature-item {
    margin-bottom: 0.65rem;
}

.feature-card-left {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all var(--transition-normal);
    border-left: 3px solid var(--primary-color);
}

.feature-card-left i {
    font-size: 1.4rem;
    color: var(--primary-color);
    min-width: 35px;
    transition: all var(--transition-normal);
}

.feature-card-left h5 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.1rem;
    line-height: 1.2;
}

.feature-card-left p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
    line-height: 1.2;
}

.feature-card-left:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 16px rgba(21, 101, 174, 0.25);
    border-left-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.98);
}

.feature-card-left:hover i {
    color: var(--secondary-color);
    transform: scale(1.08);
}

.hero-cta-buttons {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-cta-buttons .btn {
    font-size: 0.9rem;
    padding: 0.65rem 1.5rem;
}

/* Responsive Hero */
@media (min-width: 992px) {
    .hero-features-container {
        padding-left: 2rem;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

@media (max-width: 991px) {
    /* Imagen centrada en móvil */
    .hero-section-wrapper {
        background-position: center center !important;
    }

    .hero-features-container {
        max-width: 100%;
        padding: 0;
        margin-bottom: 0;
        background: transparent;
        position: fixed;
        bottom: 2rem;
        left: 0;
        right: 0;
        z-index: 999;
        opacity: 0 !important;
        visibility: hidden;
        transform: translateY(50px);
        transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.6s;
        pointer-events: none;
    }

    .hero-features-container.visible {
        opacity: 1 !important;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .hero-feature-item {
        margin-bottom: 0.5rem;
    }

    .feature-card-left {
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(12px);
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    }
}

@media (max-width: 768px) {
    .hero-features-container {
        bottom: 1.5rem;
        padding: 0 1rem;
    }

    .feature-card-left {
        padding: 0.65rem 0.85rem;
        gap: 0.75rem;
        background: rgba(255, 255, 255, 0.95);
    }

    .feature-card-left i {
        font-size: 1.25rem;
        min-width: 32px;
    }

    .feature-card-left h5 {
        font-size: 0.8rem;
    }

    .feature-card-left p {
        font-size: 0.7rem;
    }

    .hero-cta-buttons {
        margin-top: 1rem;
        flex-direction: column;
    }

    .hero-cta-buttons .btn {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.7rem 1.25rem;
    }

    .hero-feature-item {
        margin-bottom: 0.45rem;
    }
}

@media (max-width: 576px) {
    .hero-features-container {
        bottom: 1rem;
        padding: 0 0.75rem;
    }

    .feature-card-left {
        padding: 0.6rem 0.75rem;
        gap: 0.65rem;
        background: rgba(255, 255, 255, 0.96);
    }

    .feature-card-left i {
        font-size: 1.15rem;
        min-width: 30px;
    }

    .feature-card-left h5 {
        font-size: 0.75rem;
    }

    .feature-card-left p {
        font-size: 0.68rem;
    }

    .hero-cta-buttons .btn {
        font-size: 0.8rem;
        padding: 0.65rem 1rem;
    }
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    background: #104499;
    border-color: #104499;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 101, 174, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    background: #5248BF;
    border-color: #5248BF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

/* ========================================
   FEATURE CARDS - HERO (LEGACY - MANTENER POR COMPATIBILIDAD)
   ======================================== */

.feature-card-hero {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
    text-align: center;
    border: 2px solid transparent;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #312683;
}

.feature-card-hero i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.feature-card-hero p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

a[href] .feature-card-hero:hover,
a[data-toggle="modal"] .feature-card-hero:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
}

.text-decoration-none {
    text-decoration: none !important;
    color: inherit;
}

.text-decoration-none:hover {
    color: inherit;
}

.feature-card-hero:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.feature-card-hero i {
    transition: all var(--transition-normal);
}

.feature-card-hero:hover i {
    transform: scale(1.15);
    color: var(--secondary-color);
}

.feature-card-hero p {
    font-weight: 600;
    color: var(--text-dark);
}

/* ========================================
   SEDES - CARDS
   ======================================== */

.sede-info-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.sede-info-card:hover {
    box-shadow: var(--shadow-lg);
}

.sede-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.sede-info-item i {
    color: var(--primary-color);
    font-size: 1.25rem;
    min-width: 30px;
    margin-top: 3px;
}

.sede-info-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sede-info-item a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.sede-info-item a:hover {
    text-decoration: underline;
}

.sede-map-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0f4080 100%);
    padding: 4rem 0;
    color: white;
}

.contact-section a {
    color: white;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.contact-section a:hover {
    color: #E0E7FF;
    text-decoration: underline;
}

/* ========================================
   PQR SECTION
   ======================================== */

.pqr-section {
    background: var(--light);
}

.pqr-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    max-width: 900px;
    margin: 0 auto;
}

.pqr-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.75rem;
}

.pqr-form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    border-color: var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(21, 101, 174, 0.1);
}

.radio-group {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.radio-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-wrapper input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-wrapper label {
    cursor: pointer;
    font-weight: 500;
    margin: 0;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.custom-checkbox label {
    cursor: pointer;
    font-weight: 500;
    margin: 0;
}

/* ========================================
   CONVENIOS
   ======================================== */

.convenios-section {
    background: var(--light);
    padding: 4rem 0;
}

.convenios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.convenio-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

.convenio-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.convenio-item img {
    object-fit: contain;
    display: block;
}

@media (max-width: 992px) {
    .convenios-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }

    .convenio-item {
        min-height: 110px;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .convenios-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .convenio-item {
        min-height: 95px;
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .convenios-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 0.5rem;
    }

    .convenio-item {
        min-height: 85px;
        padding: 0.5rem;
    }
}

/* ========================================
   SERVICES SECTION
   ======================================== */

.services-section {
    padding: 4rem 0;
}

.table {
    border-collapse: collapse;
}

.table th {
    background: var(--light);
    color: var(--text-dark);
    font-weight: 700;
    border-color: var(--border-color);
    padding: 1rem;
}

.table td {
    border-color: var(--border-color);
    padding: 1rem;
}

.table tbody tr:hover {
    background: var(--light);
}

/* ========================================
   SEDES SECTION
   ======================================== */

.sedes-section {
    padding: 4rem 0;
}

.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-normal);
    padding: 1rem 1.5rem;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: none;
    border-bottom-color: var(--primary-color);
}

/* ========================================
   CAROUSELS - SEDES
   ======================================== */

.carousel {
    min-height: 300px;
    height: 100%;
}

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
    min-height: 300px;
}

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

.carousel-control-prev,
.carousel-control-next {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.5);
}

.carousel-indicators li {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-indicators li.active {
    background: var(--primary-color);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: var(--primary-color);
    color: white;
    margin-top: 3rem;
}

.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0;
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    font-size: 0.9rem;
}

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

.footer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* ========================================
   RESPONSIVE GENERAL
   ======================================== */

@media (max-width: 768px) {
    .sede-info-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .pqr-container {
        padding: 1.5rem;
    }

    .contact-section {
        padding: 2rem 0;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

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

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

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

.font-weight-600 {
    font-weight: 600;
}

.font-weight-700 {
    font-weight: 700;
}

.font-weight-800 {
    font-weight: 800;
}

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