/* ============================================
   ENTE DETALLE - MODERNO Y LIMPIO
   CDCE Estado Sucre
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ente-detalle-main {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.ente-breadcrumb {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
}

.ente-breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.ente-breadcrumb a {
    color: var(--gray-500);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.ente-breadcrumb a:hover {
    color: var(--primary);
}

.ente-breadcrumb .separator {
    color: var(--gray-300);
}

.ente-breadcrumb .current {
    color: var(--gray-800);
    font-weight: 600;
}

/* ============================================
   HERO
   ============================================ */

.ente-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.ente-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.ente-hero-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.ente-logo-box {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    flex-shrink: 0;
}

.ente-logo-box img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
}

.ente-info {
    flex: 1;
    color: var(--white);
}

.ente-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ente-info h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.ente-fullname {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    font-weight: 400;
}

.ente-director {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ente-director svg {
    opacity: 0.9;
}

.ente-director strong {
    font-weight: 600;
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */

.ente-content {
    padding: 4rem 0;
    background: var(--gray-50);
}

.content-section {
    margin-bottom: 4rem;
}

.section-title {
    margin-bottom: 2.5rem;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
}

/* ============================================
   NOTICIA DESTACADA
   ============================================ */

.noticia-destacada {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.noticia-destacada:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.noticia-destacada-img {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    background: var(--gray-100);
}

.noticia-destacada-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease;
}

.noticia-destacada:hover .noticia-destacada-img img {
    transform: scale(1.05);
}

.badge-destacada {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #ef4444;
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
}

.noticia-destacada-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.noticia-destacada-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.noticia-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.meta-date,
.meta-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-date svg {
    opacity: 0.7;
}

.noticia-resumen {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    background: var(--gray-900);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.25s;
    align-self: flex-start;
}

.btn-read-more:hover {
    background: var(--primary);
    transform: translateX(2px);
}

.btn-read-more svg {
    transition: transform 0.2s;
}

.btn-read-more:hover svg {
    transform: translateX(3px);
}

/* ============================================
   GRID DE NOTICIAS
   ============================================ */

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.noticia-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.noticia-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.noticia-card-img {
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

.noticia-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.noticia-card:hover .noticia-card-img img {
    transform: scale(1.08);
}

.noticia-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.noticia-card-content h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.noticia-card-date {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.noticia-card-resumen {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.btn-read-more-small {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-read-more-small:hover {
    color: var(--primary-dark);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    border: 2px dashed var(--gray-200);
    max-width: 600px;
    margin: 0 auto;
}

.empty-icon {
    margin-bottom: 1.5rem;
    color: var(--gray-300);
}

.empty-icon svg {
    width: 80px;
    height: 80px;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto;
}

/* ============================================
   GALERÍA
   ============================================ */

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.galeria-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--gray-100);
    box-shadow: var(--shadow-sm);
}

.galeria-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galeria-item:hover img {
    transform: scale(1.08);
}

.galeria-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: white;
    padding: 2rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    font-weight: 500;
}

.galeria-item:hover .galeria-overlay {
    opacity: 1;
}

/* ============================================
   ACCIONES
   ============================================ */

.ente-actions {
    margin-top: 3rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    background: var(--gray-900);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.25s;
    box-shadow: var(--shadow-sm);
}

.btn-back:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-back svg {
    transition: transform 0.2s;
}

.btn-back:hover svg {
    transform: translateX(-3px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .ente-hero {
        padding: 3rem 0;
    }
    
    .ente-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .ente-info h1 {
        font-size: 2.25rem;
    }
    
    .ente-director {
        justify-content: center;
    }
    
    .noticia-destacada {
        grid-template-columns: 1fr;
    }
    
    .noticia-destacada-img {
        min-height: 240px;
    }
    
    .noticias-grid {
        grid-template-columns: 1fr;
    }
    
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .empty-state {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .ente-info h1 {
        font-size: 1.875rem;
    }
    
    .ente-logo-box img {
        width: 80px;
        height: 80px;
    }
    
    .ente-logo-box {
        padding: 1rem;
    }
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
    border-radius: 4px;
}