/* ============================================
   BOMBEROS BLOG - ESTILOS INSTITUCIONALES
   Colores: Rojo #C41E3A, Azul #0033A0
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* ============================================
   SECCIÓN 1: HEADER / NAVEGACIÓN
   ============================================ */
.header {
    background: linear-gradient(135deg, #C41E3A 0%, #0033A0 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #C41E3A;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* ============================================
   SECCIÓN 2: HERO / BIENVENIDA
   ============================================ */
.hero {
    margin-top: 80px;
    background: linear-gradient(rgba(0,51,160,0.8), rgba(196,30,58,0.8)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f0f0f0"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   SECCIÓN 3: BLOG / NOVEDADES
   ============================================ */
.blog-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: #0033A0;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #C41E3A, #0033A0);
    border-radius: 2px;
}

/* Grid de posts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-top: 4px solid #C41E3A;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(45deg, #0033A0, #C41E3A);
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.3rem;
    color: #0033A0;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.post-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   SECCIÓN 4: FORMULARIO ADMIN
   ============================================ */
.admin-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0;
    margin-top: 3rem;
}

.admin-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.form-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-left: 5px solid #0033A0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #0033A0;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #C41E3A;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Botones */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #C41E3A 0%, #a01729 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a01729 0%, #C41E3A 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(196,30,58,0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #0033A0 0%, #002266 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #002266 0%, #0033A0 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,51,160,0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
}

.btn-edit {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #e0a800 0%, #ffc107 100%);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

/* ============================================
   SECCIÓN 5: FOOTER
   ============================================ */
.footer {
    background: linear-gradient(135deg, #0033A0 0%, #C41E3A 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================
   UTILIDADES Y ESTADOS
   ============================================ */
.loading {
    text-align: center;
    padding: 2rem;
    color: #0033A0;
    font-size: 1.2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav ul {
        gap: 1rem;
    }
    
    .hero {
        margin-top: 120px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}
