@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;600&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    /* Paleta de Colores Solicitada */
    --cobalt-blue: #0047AB;
    --cobalt-dark: #002d6b;
    --relaxing-green: #7BAE7F;
    --slate-grey: #5A6A7E;
    
    /* Superficies y Textos */
    --bg-primary: #F8FAFC;
    --bg-surface: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;

    /* Acentos de CTA (Call to Action) tipo Classgap/Plataformas modernas */
    --action-orange: #F97316;
    --action-orange-hover: #EA580C;

    /* Tipografía Premium */
    --font-heading: 'Roboto Slab', serif;
    --font-body: 'Roboto', sans-serif;
    
    /* Efectos de Elevación y Modernos */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -3px rgba(0, 45, 100, 0.1);
    --shadow-lg: 0 20px 40px -5px rgba(0, 71, 171, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --bg-primary: #0F172A;
    --bg-surface: #1E293B;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --border-color: #334155;
    --shadow-md: 0 10px 25px rgba(0,0,0,0.4);
    --action-orange: #FB923C;
}

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

body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-main);
    background-color: var(--bg-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
}

a { color: var(--cobalt-blue); text-decoration: none; transition: var(--transition-smooth); }
a:hover { color: var(--action-orange); }

/* --- BADGES Y ETIQUETAS MODERNAS --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(123, 174, 127, 0.1);
    color: var(--relaxing-green);
    border: 1px solid rgba(123, 174, 127, 0.2);
}

.badge-blue {
    background: rgba(0, 71, 171, 0.05);
    color: var(--cobalt-blue);
    border: 1px solid rgba(0, 71, 171, 0.1);
}

.floating-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: var(--bg-surface);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    z-index: 10;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

/* --- HEADER ACADÉMICO --- */
.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.brand {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand i { color: var(--relaxing-green); }

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--cobalt-blue);
    transform: translateY(-2px);
}

/* --- HERO SECTION COMPACTO --- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 5%;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    gap: 2rem;
}

.hero-text {
    flex: 2;
    z-index: 2;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.hero-title span { color: var(--cobalt-blue); }

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--relaxing-green);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-bio {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    border: 4px solid var(--bg-surface);
    transition: var(--transition-smooth);
}

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

/* Decoración Hero */
.hero-decoration {
    position: absolute;
    right: -5%;
    top: -10%;
    font-size: 25rem;
    color: var(--cobalt-blue);
    opacity: 0.03;
    z-index: 1;
    transform: rotate(-15deg);
}

body.dark-mode .hero-decoration { opacity: 0.02; }

/* --- BOTONES PREMIUM --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 2rem;
    border-radius: 50px; /* Bordes totalmente redondeados tipo plataforma */
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--action-orange);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    background-color: var(--action-orange-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    color: #FFFFFF;
}

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--cobalt-blue);
    color: var(--cobalt-blue);
    transform: translateY(-3px);
}

body.dark-mode .btn-secondary { color: var(--text-main); }

/* --- CONTENIDO GRID (PUBLICACIONES) --- */
.content-wrapper {
    max-width: 1200px;
    margin: 5rem auto;
    padding: 0 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: var(--relaxing-green);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.post-card {
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--cobalt-blue);
    border-radius: 12px 12px 0 0;
    transform: scaleX(0);
    transition: var(--transition-smooth);
    transform-origin: left;
}

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

.post-card:hover::before { transform: scaleX(1); }

.post-meta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--relaxing-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--text-main);
}

.post-excerpt {
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--action-orange);
}

.post-link i { transition: transform 0.3s ease; }
.post-link:hover i { transform: translateX(5px); }

/* --- PLATAFORMA LAYOUTS (Classgap/PD2030) --- */
.trust-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 5%;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.trust-item:hover { opacity: 1; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.service-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--cobalt-blue);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 71, 171, 0.05);
    color: var(--cobalt-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem auto;
}

/* --- CONTROLES MÓVILES (HAMBURGER MENU) --- */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    background: transparent;
    border: none;
    cursor: pointer;
}

/* --- CLASES DE SOPORTE PARA ABOUT.PHP --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.profile-flex {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 4rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* --- RESPONSIVE (MEDIA QUERIES) --- */
@media (max-width: 992px) {
    .site-header {
        flex-wrap: wrap;
        padding: 1rem 5%;
        justify-content: space-between;
    }
    .brand { order: 1; }
    .menu-toggle {
        display: block;
        order: 2;
    }
    nav {
        order: 3;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, margin-top 0.4s ease, padding 0.4s ease;
    }
    nav.active {
        max-height: 500px;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        align-items: flex-start;
    }
    .nav-links li {
        width: 100%;
    }
    .nav-links a {
        display: block;
        width: 100%;
        padding: 0.7rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    body.dark-mode .nav-links a {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .text-slider {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    .trust-bar {
        gap: 1.5rem;
        padding: 1.5rem 5%;
    }
    .hero-section {
        padding: 3rem 5% !important;
    }
}
