:root {
    --primary: #1e3a5f;
    --secondary: #c9a227;
    --accent: #2d5a27;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --border: #dee2e6;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 8px;
}

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

body {
    font-family: 'Segoe UI', 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: var(--light);
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top a {
    color: var(--white);
}

.header-contact {
    display: flex;
    gap: 20px;
}

.header-social {
    display: flex;
    gap: 15px;
}

.header-main {
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    width: 60px;
    height: 60px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.logo-text span {
    color: var(--secondary);
    display: block;
    font-size: 12px;
    font-weight: 400;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a.nav-register-btn {
    background: var(--secondary);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: .3px;
    transition: background 0.2s, transform 0.15s;
}
nav a.nav-register-btn::after {
    display: none;
}
nav a.nav-register-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
    color: #fff;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* ── SLIDER PRINCIPAL ─────────────────────────────────────────────────────── */
.slider-section {
    position: relative;
    width: 100%;
    height: 580px;
    overflow: hidden;
    background: var(--primary);
}

/* Track: fila horizontal de slides */
.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
    will-change: transform;
}

/* Cada slide ocupa exactamente el 100% del ancho del contenedor */
.slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Fallback sin imagen */
.slide-fallback {
    background: linear-gradient(135deg, var(--primary) 0%, #2d4a6f 100%);
}

/* Capa oscura sobre las imágenes para legibilidad del texto */
.slider-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.25) 0%,
        rgba(10,20,40,0.60) 50%,
        rgba(10,20,40,0.72) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Contenido del hero superpuesto al slider */
.slider-hero {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-hero-content {
    text-align: center;
    color: #fff;
    padding: 0 20px;
    max-width: 820px;
    margin: 0 auto;
}

.slider-hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 50px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 18px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
    color: #fff;
}

.slider-hero-content p {
    font-size: 20px;
    opacity: .92;
    margin-bottom: 32px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.slider-hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botón blanco outline exclusivo del slider */
.btn-outline-white {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.85);
    color: #fff;
    padding: 11px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background 0.25s, color 0.25s;
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* Animación de entrada para título/subtítulo al cambiar slide */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.slide-in {
    animation: slideIn 0.45s ease forwards;
}

/* Botones prev / next */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.slider-btn:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-50%) scale(1.08);
}
.slider-prev { left: 20px; }
.slider-next { right: 20px; }

/* Dots / indicadores */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 8px;
}
.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.slider-dot.active {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: scale(1.25);
}

/* Mantener reglas de .hero por si se usa en otras páginas */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #2d4a6f 100%);
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}
.hero p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: #d4ad32;
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

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

.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-image {
    height: 200px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.card-image i {
    font-size: 60px;
    color: var(--white);
    opacity: 0.5;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 10px;
}

.card-content p {
    color: var(--gray);
}

.card-meta {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 14px;
    color: var(--gray);
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-icon i {
    font-size: 30px;
    color: var(--white);
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.service-card p {
    color: var(--gray);
    font-size: 14px;
}

.stats-section {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 42px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.stat-item p {
    opacity: 0.9;
}

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

.post-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-card-image {
    height: 220px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    position: relative;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
}

.post-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-body h3 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-card-body p {
    color: var(--gray);
    flex: 1;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--gray);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.team-member {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
}

.team-member-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary);
    margin: 0 auto 20px;
    overflow: hidden;
}

.team-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member h4 {
    color: var(--primary);
    margin-bottom: 5px;
}

.team-member p {
    color: var(--secondary);
    font-weight: 600;
}

.contact-section {
    background: var(--white);
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    color: var(--primary);
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--white);
}

.contact-item h4 {
    color: var(--primary);
    margin-bottom: 5px;
}

.contact-form {
    background: var(--light);
    padding: 30px;
    border-radius: var(--radius);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

footer {
    background: var(--dark);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.5);
}

.page-header {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
}

.content-section {
    padding: 60px 0;
}

.content-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.content-box h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.content-box h3 {
    color: var(--primary);
    margin: 30px 0 15px;
}

.content-box p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.content-box ul {
    margin: 15px 0;
    padding-left: 25px;
}

.content-box li {
    margin-bottom: 10px;
}

.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--gray);
}

.breadcrumb span {
    margin: 0 10px;
}

.post-detail {
    max-width: 800px;
    margin: 0 auto;
}

.post-detail-header {
    margin-bottom: 30px;
}

.post-detail-header h1 {
    font-size: 36px;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 20px;
}

.post-detail-meta {
    display: flex;
    gap: 20px;
    color: var(--gray);
    font-size: 14px;
}

.post-detail-image {
    width: 100%;
    height: 400px;
    background: var(--primary);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
}

.post-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-detail-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}

.post-detail-content p {
    margin-bottom: 15px;
}

.post-detail-content ul,
.post-detail-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.post-detail-content li {
    margin-bottom: 10px;
}

.category-filter {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    justify-content: center;
}

.category-filter a {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--gray);
    font-weight: 500;
}

.category-filter a:hover,
.category-filter a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--primary);
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
}

.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

@media (max-width: 992px) {
    nav ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    nav.active ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .slider-section { height: 380px; }
    .slider-hero-content h1 { font-size: 30px; }
    .slider-hero-content p  { font-size: 15px; margin-bottom: 22px; }
    .slider-btn { width: 36px; height: 36px; font-size: 13px; }
    .slider-prev { left: 10px; }
    .slider-next { right: 10px; }

    .hero h1 {
        font-size: 32px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}