/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Paleta de colores actualizada */
:root {
    --primary-blue: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --accent-orange: #ff6f00;
    --background-gradient: linear-gradient(to bottom, 
        var(--primary-blue) 0%,
        #1976d2 15%,
        #2196f3 35%,
        #42a5f5 60%,
        #bbdefb 85%,
        #ffffff 100%);
    --surface-white: #ffffff;
    --text-dark: #2c3e50;
    --text-gray: #555;
    --divider: #eaeaea;
}

/* Estructura principal con nuevo degradado */
body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background-gradient);
    background-attachment: fixed;
}

/* Header */
header {
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    background-color: var(--primary-blue);
    color: white;
    padding: 10px;
    display: grid;
    justify-content: space-between;
    align-items: center;
    grid-template-columns: auto auto;
    padding: 15px 5%;
}

.logo-title-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    cursor: pointer;
}

.logo-title-container:hover {
    opacity: 0.9;
}

.header-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
}

header h1 {
    font-size: 28px;
    margin-left: 15px;
    font-weight: 600;
    text-align: center;
}

/* Navegación */
nav {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 16px;
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link.active {
    color: var(--accent-orange);
    font-weight: 600;
}

/* Contenido principal */
main {
    width: 100%;
    margin-top: 90px;
    margin-bottom: 2%;
    flex: 1;
}

/* Hero Section con Carrusel HEREDADO */
.presentacion {
    text-align: center;
    margin-bottom: 4%;
}

.presentacion h2 {
    padding-top: 1.3%;
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 600;
    color: white;
}

/* CARRUSEL HEREDADO EXACTAMENTE IGUAL */
.carousel-container {
    width: 82%;
    max-width: 1920px;
    margin: 0 auto 4%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
}

.carousel img {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 15px;
}

.carousel-btn {
    background-color: rgba(52, 152, 219, 0.7);
    color: white;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-btn:hover {
    background-color: rgba(41, 128, 185, 0.9);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    gap: 8px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.indicator.active {
    background-color: #3498db;
    transform: scale(1.2);
}

/* Location Switcher */
.location-switcher {
    margin-top: 25px;
    padding: 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: none !important;
}

.location-link {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.location-link:hover {
    color: #ff9800;
    text-decoration: underline;
}

/* SECCIÓN MEJOR-OPCIÓN - VERSIÓN REDISEÑADA */
.mejor-opcion {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px;
    background-color: var(--surface-white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.mejor-opcion h2 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 40px;
    color: var(--text-dark);
    text-align: center;
}

.mejor-opcion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
}

.mejor-opcion-item {
    background-color: var(--surface-white);
    padding: 30px 25px;
    border-radius: 12px;
    border: 1px solid var(--divider);
    font-size: 1.1rem;
    color: var(--text-gray);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mejor-opcion-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange), var(--primary-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.mejor-opcion-item:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}

.mejor-opcion-item:hover::before {
    transform: scaleX(1);
}

/* SECCIÓN DESTACAMOS - CON TÍTULOS PERFECTAMENTE ALINEADOS */
.destacamos {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    align-items: start;
}

.punto-destacado {
    background-color: var(--surface-white);
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 180px;
    height: 100%;
}

.punto-destacado:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}

.punto-destacado h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent-orange);
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.punto-destacado p {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

/* Responsive para DESTACAMOS - 4 columnas que se adaptan */
@media (min-width: 1200px) {
    .destacamos {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .punto-destacado {
        padding: 35px 25px;
        min-height: 200px;
    }
    
    .punto-destacado h3 {
        min-height: 3.5rem;
        font-size: 1.4rem;
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .destacamos {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        max-width: 1200px;
    }
    
    .punto-destacado {
        padding: 30px 20px;
        min-height: 200px;
    }
    
    .punto-destacado h3 {
        min-height: 3rem;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .destacamos {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 1000px;
    }
    
    .punto-destacado {
        padding: 25px 20px;
        min-height: 180px;
    }
    
    .punto-destacado h3 {
        min-height: 2.8rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .destacamos {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 600px;
        padding: 0 15px;
    }
    
    .punto-destacado {
        padding: 25px 20px;
        min-height: auto;
    }
    
    .punto-destacado h3 {
        min-height: 2.5rem;
        font-size: 1.2rem;
    }
    
    .punto-destacado p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .destacamos {
        gap: 15px;
        padding: 0 10px;
    }
    
    .punto-destacado {
        padding: 20px 15px;
    }
    
    .punto-destacado h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
}

/* Botones */
.btn-primary, .btn-secondary {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: white;
}

.btn-primary:hover {
    background-color: #ff8c00;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* SECCIÓN CERTIFICACIONES - Con iconos y títulos naranjas */
.certificaciones {
    max-width: 1200px;
    margin: 60px auto 40px;
    padding: 40px 20px;
    background-color: var(--surface-white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.certificaciones h2 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 40px;
    color: var(--text-dark);
    text-align: center;
}

.certificaciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
}

.certificacion-item {
    background-color: var(--surface-white);
    padding: 30px 20px;
    border-radius: 12px;
    border: 1px solid var(--divider);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.certificacion-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-orange);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.certificacion-item:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}

.certificacion-item:hover::before {
    transform: scaleX(1);
}

.certificacion-item i {
    font-size: 3rem;
    color: var(--accent-orange);
    margin-bottom: 20px;
    display: block;
}

.certificacion-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent-orange);
}

.certificacion-item p {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
}

/* Responsive para certificaciones */
@media (max-width: 1024px) {
    .certificaciones-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
    }
    
    .certificaciones h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .certificaciones {
        margin: 40px auto 30px;
        padding: 30px 15px;
    }
    
    .certificaciones h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .certificaciones-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .certificacion-item {
        padding: 25px 15px;
    }
    
    .certificacion-item i {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .certificacion-item h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .certificaciones-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .certificacion-item {
        padding: 20px 15px;
    }
    
    .certificaciones h2 {
        font-size: 1.5rem;
    }
}

/* Responsive general */
@media (max-width: 1024px) {
    .mejor-opcion-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .mejor-opcion h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        width: 95%;
        aspect-ratio: 16/9;
    }
    
    .carousel-btn {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .presentacion h2 {
        font-size: 24px;
    }
    
    header h1 {
        font-size: 22px;
    }
    
    .mejor-opcion {
        margin: 30px auto;
        padding: 30px 15px;
    }
    
    .mejor-opcion h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .mejor-opcion-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mejor-opcion-item {
        padding: 25px 20px;
    }
    
    nav {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
    }
    
    header {
        grid-template-columns: auto;
        justify-content: center;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .mejor-opcion {
        padding: 20px 10px;
    }
    
    .mejor-opcion h2 {
        font-size: 1.5rem;
    }
    
    .mejor-opcion-item {
        padding: 20px 15px;
        font-size: 1rem;
    }
}

/* Footer */
.global-footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0 15px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
    padding: 0 15px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #3498db;
}

.footer-section p, .footer-section a {
    color: #ecf0f1;
    margin-bottom: 8px;
    display: block;
    text-decoration: none;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    margin-top: 20px;
}