/* ============================================
   VARIABLES DE DISEÑO (Baseline 8px)
   ============================================ */
:root {
    /* Colores */
    --primary-color: #0b8a85;
    --primary-dark: #066662;
    --primary-light: #e6f3f2;
    --secondary-bg: #F4F9F9;
    --text-dark: #1A2B2C;
    --text-medium: #4A5B5E;
    --text-light: #6c757d;
    --white: #ffffff;
    --black: #000000;

    /* Tipografía */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Espaciado (múltiplos de 0.5rem = 8px) */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Bordes y Sombras */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 2rem;
    --radius-full: 50px;
    --shadow-sm: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 25px -12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ESTILOS GLOBALES (Senior-Friendly)
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

h1 { font-size: clamp(2rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2rem); }
h3 { font-size: clamp(1.5rem, 3.5vw, 1.75rem); }

.section-title {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--primary-color);
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* ============================================
   TOP BAR (Punto #2: Márgenes reducidos)
   ============================================ */
.top-bar {
    background-color: var(--primary-color);
    padding: var(--spacing-sm) 0;
}

.social-icons-top {
    display: flex;
    gap: var(--spacing-sm);
}

.social-icons-top a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--white);
    font-size: 1.3rem;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

.social-icons-top a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ============================================
   NAVBAR Y MENÚ HAMBURGUESA CORREGIDO
   ============================================ */
.navbar-toggler {
    z-index: 1050;
}

.navbar-nav .nav-link {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: var(--spacing-sm) var(--spacing-md) !important;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

@media (min-width: 992px) {
    .navbar-nav .nav-link {
        padding: var(--spacing-md) var(--spacing-lg) !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        padding: var(--spacing-md);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        box-shadow: var(--shadow-hover);
        z-index: 1040;
        max-height: 80vh;
        overflow-y: auto;
    }

    .navbar-nav .nav-link {
        padding: var(--spacing-sm) var(--spacing-md) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* ============================================
   PRESENTATION CARD
   ============================================ */
.presentation-card {
    background-color: var(--primary-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.presentation-card:hover {
    box-shadow: var(--shadow-hover);
}

.accent-hr {
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    opacity: 1;
    border: none;
}

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

/* ============================================
   UNIVERSITIES CARROUSEL
   ============================================ */
.universities-carousel {
    gap: var(--spacing-xl);
}

.uni-logo {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.uni-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.service-icon {
    background-color: var(--primary-light);
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    margin: 0 auto var(--spacing-md);
    transition: transform 0.3s ease;
}

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

.service-card h3 {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

.service-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-medium);
}

/* ============================================
   TESTIMONIALS (Punto #3)
   ============================================ */
.testimonial-card {
    background-color: var(--secondary-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.author-img {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-full);
    background-size: cover;
    background-position: center;
    border: 3px solid var(--primary-light);
}

.quote-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.carousel-controls-wrapper {
    position: relative;
    bottom: 0;
    margin-top: var(--spacing-lg);
    z-index: 10;
}

.carousel-control-custom {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.carousel-control-custom:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* ============================================
   CTA CARD
   ============================================ */
.cta-card {
    background-color: var(--primary-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.btn-success {
    background-color: #25D366 !important;
    border: none !important;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #128C7E !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* ============================================
   BLOG SECTION (Puntos #4, #6, #7) - CORREGIDO
   ============================================ */
.blog-category-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.blog-category-badge:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.blog-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
}

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

.blog-img-link {
    display: block;
    overflow: hidden;
    cursor: pointer;
}

.blog-img {
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
    width: 100%;
}

.blog-card:hover .blog-img {
    transform: scale(1.05);
}

.blog-card-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
}

.blog-title-link {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.blog-title-link:hover {
    color: var(--primary-color);
}

.blog-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: var(--spacing-sm);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(11, 138, 133, 0.3);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(11, 138, 133, 0.3);
}

/* ============================================
   FOOTER (Punto #5)
   ============================================ */
.footer {
    border-top: 4px solid var(--white);
}

.social-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

.social-footer-link:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright-text a {
    color: var(--white) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.copyright-text a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.9;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
    .service-card h3 {
        font-size: 1.4rem;
    }

    .blog-card-title {
        font-size: 1.4rem;
    }
}

@media (min-width: 992px) {
    .presentation-card {
        padding: var(--spacing-2xl) !important;
    }

    .service-card {
        padding: var(--spacing-xl) !important;
    }

    .blog-img {
        height: 220px;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 1rem;
    }

    .btn-lg {
        padding: var(--spacing-sm) var(--spacing-lg) !important;
        font-size: 1rem !important;
    }

    .social-icons-top a {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .blog-img {
        height: 200px;
    }

    .carousel-control-custom {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.85rem;
    }
}

/* ============================================
   UTILITARIOS
   ============================================ */
.bg-light-subtle {
    background-color: var(--secondary-bg) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}