:root {
    --bg-dark: #0f1113;
    --bg-card: #1a1d21;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-hover: #2563eb;
    --border: #2d333b;
    --white: #ffffff;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Header & Nav */
.main-header {
    background: rgba(15, 17, 19, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--accent-blue); }

.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: 0.3s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--white); }

/* Banner */
.hero-banner {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent);
}

.hero-content { max-width: 800px; padding: 0 2rem; }
.tag { 
    color: var(--accent-blue); 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 3px;
    font-weight: 600;
}
.hero-content h1 { font-size: 4.5rem; margin: 1rem 0; font-weight: 800; }
.hero-content p { color: var(--text-secondary); font-size: 1.2rem; margin-bottom: 2rem; }

/* Buttons */
.btn-primary {
    background: var(--accent-blue);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    border: 1px solid var(--border);
    color: var(--white);
    padding: 0.8rem 2rem;
    color: var(--bg-dark);
    border-radius: 5px;
    text-decoration: none;
    margin-left: 1rem;
    transition: 0.3s;
}
.btn-secondary:hover { background: var(--border); color: var(--text-primary);}

/* News Section */
.news-section { max-width: 1200px; margin: 4rem auto; padding: 0 2rem; }
.section-header { margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.line { width: 60px; height: 4px; background: var(--accent-blue); }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.news-card { background: var(--bg-card); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.card-img { height: 200px; background-size: cover; background-position: center; }
.card-body { padding: 1.5rem; }
.category { color: var(--accent-blue); font-size: 0.8rem; font-weight: 600; }
.card-body h3 { margin: 0.8rem 0; font-size: 1.25rem; }
.card-body p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.5rem; }
.read-more { color: var(--white); text-decoration: none; font-weight: 600; }

/* Footer */
.main-footer { border-top: 1px solid var(--border); padding: 4rem 2rem 2rem; margin-top: 4rem; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; }
.footer-links ul { list-style: none; margin-top: 1rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; display: block; margin-bottom: 0.5rem; }
.footer-bottom { text-align: center; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 0.9rem; }
/* --- Modal Elegante --- */
.modal-content {
    background: #111418; /* Gris casi negro profundo */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    padding: 3.5rem 2.5rem;
    position: relative;
    border-radius: 12px;
}

.isotipo-custom {
    width: 60px; /* Tamaño ideal para un isotipo en modal */
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    object-fit: contain;
    /* Filtro opcional: añade un leve resplandor si tu isotipo es azul */
    filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.3));
    transition: transform 0.3s ease;
}

.isotipo-custom:hover {
    transform: scale(1.05); /* Efecto sutil al pasar el mouse */
}

/* --- Inputs Modernos --- */
.form-group-elegant {
    position: relative;
    margin-bottom: 2.5rem;
}

.form-group-elegant input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group-elegant label {
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 300;
}

/* Efecto Flotante: Cuando el input tiene foco o contenido */
.form-group-elegant input:focus + label,
.form-group-elegant input:not(:placeholder-shown) + label {
    top: -15px;
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Línea de acento animada al hacer focus */
.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: var(--accent-blue);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group-elegant input:focus ~ .input-line {
    width: 100%;
    left: 0;
}

/* Botón con brillo sutil */
.btn-primary-glow {
    width: 100%;
    background: var(--accent-blue);
    color: white;
    padding: 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.btn-primary-glow:hover {
    background: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.4);
}

.modal-disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    opacity: 0.6;
}
/* --- Banner de Acceso Rápido para Editor --- */
.admin-quick-access {
    background: #111418;
    border-bottom: 2px solid var(--accent-blue);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 2001; /* Por encima de todo */
    animation: slideDown 0.5s ease;
}

.admin-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-info span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.5px;
}

.admin-mini-iso {
    width: 22px;
    height: auto;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.btn-admin-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.btn-admin-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-admin-logout {
    color: #ff4d4d;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}
.hero-dynamic {
    position: relative;
    padding: 160px 0 100px;
    background: #0b0d0f;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-dynamic::before {
    content: '';
    position: absolute;
    top: -10%; left: -10%;
    width: 40%; height: 60%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.badge-new {
    color: var(--accent-blue);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.8rem;
    border: 1px solid var(--accent-blue);
    padding: 5px 12px;
    border-radius: 50px;
}

.hero-dynamic h1 {
    font-size: 4rem;
    margin: 2rem 0 4rem;
    max-width: 800px;
    line-height: 1.1;
}

/* Fila de noticias recientes */
.recent-posts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.hero-post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-post-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-blue);
    transform: translateY(-10px);
}

.hero-post-card .card-tag {
    font-size: 0.7rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-post-card h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.hero-post-card .read-more {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 2rem;
    transition: 0.3s ease;
}

.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.btn-like {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn-like.active, .btn-like:hover {
    border-color: #ff4d4d;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

.btn-like.active .icon { transform: scale(1.2); }

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden; /* Importante para que la imagen no se salga de los bordes redondeados */
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-blue);
}

.news-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.5s ease;
}

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

.news-card-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(15, 17, 19, 0.8));
    padding: 1.5rem;
    display: flex;
    align-items: flex-end;
}

.news-category {
    background: var(--accent-blue);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.news-content {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    display: block;
}
.news-card-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #1a1d21; /* Color de carga temporal */
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Mantiene la proporción sin deformar */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    display: block;
}

/* Efecto de zoom suave al pasar el mouse por la tarjeta */
.news-card:hover .news-card-img {
    transform: scale(1.1);
}

.news-card-overlay {
    position: absolute;
    inset: 0; /* Cubre todo el contenedor */
    background: linear-gradient(to bottom, transparent 50%, rgba(10, 12, 15, 0.9));
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.news-category {
    z-index: 2; /* Por encima del degradado */
}
.search-container {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--text-secondary);
}

#blogSearch {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--white);
    font-size: 1rem;
    transition: 0.3s;
}

#blogSearch:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

.no-results {
    text-align: center;
    grid-column: 1 / -1;
    color: var(--text-secondary);
    padding: 4rem;
}
.category-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-blue);
    color: var(--white);
}

.filter-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.post-reader {
    max-width: 800px;
    margin: 100px auto;
    padding: 0 2rem;
    line-height: 1.8;
    color: #e2e8f0;
}

.post-footer-actions {
    margin-top: 5rem;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.btn-like-large {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 1rem;
    transition: 0.3s;
}

.btn-like-large:hover {
    transform: scale(1.05);
    background: #e04343;
}

.related-section {
    background: #0b0d0f;
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}