/* ==========================================
   1. ESTILOS GLOBALES Y REINICIO
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

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


/* ==========================================
   2. ENCABEZADO DEL SITIO
   ========================================== */
/* Estilos de encabezado desde archivo 1 */
.header {
    background: linear-gradient(135deg, #4AADE6 0%, #87CEEB 100%);
    padding: 20px 0;
    text-align: center;
    position: relative;
}

.header::before,
.header::after {
    content: '';
    position: absolute;
    top: 0;
    width: 30%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(255,255,255,0.1) 20px,
        rgba(255,255,255,0.1) 40px
    );
}

.header::before { left: 0; }
.header::after { right: 0; }

/* Estilos de encabezado desde archivo 2 */
header {
    background: linear-gradient(180deg, #87CEEB 0%, #87CEEB 60%, #fff 60%, #fff 100%);
    padding: 20px 0 10px;
}

/* Elementos de logotipo */
.logo {
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #E63946, #A8201A);
    color: white;
    padding: 15px 40px;
    display: inline-block;
    border-radius: 50px;
    font-size: 32px;
    font-weight: bold;
    border: 5px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.logo-box {
    background: #E63946;
    color: white;
    padding: 20px 50px;
    display: inline-block;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
}

.logo-subtitle {
    font-size: 16px;
    color: #FFD700;
    margin-top: -5px;
}

/* Menú de navegación */
nav, .nav {
    background: white;
    padding: 15px 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul, .nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    padding: 0 20px;
}

nav a, .nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 14px;
    transition: color 0.3s;
}

nav a:hover, .nav a:hover {
    color: #E63946;
}


/* ==========================================
   3. MAIN CONTENT & SIDEBAR
   ========================================== */
.main-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 40px 0;
}

/* Контент статьи */
.article-content .img-placeholder {
    width: 100%;
    height: 350px;
    background: #FFB6C1;
    margin-bottom: 20px;
}

.category {
    color: #E63946;
    font-size: 14px;
    margin-bottom: 10px;
}

.article-content h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 25px;
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 24px;
    margin: 30px 0 15px;
}

.article-content ul {
    margin-left: 30px;
    margin-bottom: 20px;
}

.article-content li {
    margin-bottom: 8px;
}

/* Cajas de autor y citas */
.author-box {
    background: #f5f5f5;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: #ddd;
    border-radius: 50%;
}

.testimonial {
    background: white;
    padding: 20px;
    margin: 15px 0;
    font-style: italic;
    border-left: 3px solid #E63946;
}


.job-box {
    background: #E63946;
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}


/* ==========================================
   4. PANEL LATERAL 
   ========================================== */
.sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}

.widget {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.post-thumb {
    width: 5px;
    height: 80px;
    background: #87CEEB;
    flex-shrink: 0;
}
.post-info a {
    font-size: 16px;
    margin-bottom: 5px;
    line-height: 1.4;
    color: black;
    text-decoration: none;
}
.post-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.post-info .date {
    color: #999;
    font-size: 12px;
}

.widget input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.widget label {
    font-size: 12px;
    color: #666;
    display: block;
    margin-bottom: 15px;
}

.widget button {
    width: 100%;
    padding: 12px;
    background: #E63946;
    color: white;
    border: none;
    border-radius: 3px;
    font-weight: bold;
    cursor: pointer;
}


/* ==========================================
   5. REJILLA DE ARTÍCULOS Y TARJETAS
   ========================================== */
.related-posts {
    padding: 60px 0;
    background: #f5f5f5;
}

.related-posts h2 {
    font-size: 28px;
    margin-bottom: 30px;
}

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

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Imágenes de cartas */
.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Растягивает картинку с сохранением пропорций и обрезает лишнее */
    display: block;
}

.post-card .card-img {
    width: 100%;
    height: 200px;
    background: #FFD700;
}

/* Estaciones (Gradientes de Archivo 1) */
.post-image.fall { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.post-image.summer { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.post-image.spring { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.post-image.winter { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }

/* Área de texto de la carta */
.post-content, .post-card-content {
    padding: 20px;
}

.post-title, .post-card h3 {
    color: #E63946;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.post-date, .post-info .date {
    color: #999;
    font-size: 12px;
    margin-bottom: 12px;
}

.post-text, .post-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: #E63946;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    display: inline-block;
    transition: color 0.3s;
}

.read-more:hover {
    color: #A8201A;
}

/* ==========================================
   7. PIE DE PÁGINA Y BOLETÍN INFORMATIVO
   ========================================== */
footer, .footer {
    background: #0066B3;
    color: white;
    padding: 40px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo .logo-box {
    font-size: 18px;
    padding: 15px 30px;
    margin-bottom: 20px;
}

.footer-logo h3 {
    font-size: 20px;
    margin-top: 10px;
}

/* Boletín informativo */
.newsletter {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    text-align: center;
}

.newsletter h3, .footer-newsletter h4 {
    margin-bottom: 20px;
}

.newsletter-form, .footer-newsletter form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter input, .footer-newsletter input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: none;
    border-radius: 4px;
}

.newsletter button, .footer-newsletter button {
    background: #E63946;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
}

/* Колонки со ссылками в подвале */
.footer-links {
    display: flex;
    gap: 50px;
}

.footer-column h4 {
    margin-bottom: 15px;
    color: #FFD700;
}

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

.footer-column a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 2;
}

/* Sección de galería/imágenes en el pie de página. */
.social-section {
    text-align: center;
    padding: 20px 0;
}

.social-images, .footer-images {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.social-image, .footer-img {
    width: 80px;
    height: 80px;
    background: #FFD700;
    border-radius: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 13px;
}

/* ==========================================
   8. PÁGINAS LEGALES
   ========================================== */
.legal-content {
    max-width: 800px; 
    margin: 40px auto;  
    padding: 0 20px;    
    line-height: 1.6;   
    color: #333;       
}

.legal-content h2 {
    margin-bottom: 25px;
    font-size: 28px;
    text-align: left;   
}

.legal-content p {
    margin-bottom: 16px;
    font-size: 16px;
}

/* ==========================================
   9. ___CATEGORIES___
   ========================================== */
.main-catalog-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
}

.catalog-item {
    background: #f7f8fa; /* Слегка сероватый (или #f0f2f5 f7f8fa) оттенок фона карточки */
    border: 1px solid #e1e4e8; /* Тонкая аккуратная рамка по контуру */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04); /* Мягкая тень */
    display: flex;
    flex-direction: column;
}
.item-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-category-tag {
    display: inline-block;
    color: #d32f2f; /* В тон вашим акцентам, либо сделайте #888 для приглушенного */
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.item-heading {
    font-size: 18px;
    color: #d32f2f;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.item-date {
    font-size: 12px;
    color: #888888;
    margin: 0 0 8px 0;
}

.item-excerpt {
    font-size: 14px;
    color: #444444;
    margin: 0 0 20px 0;
    line-height: 1.5;
    flex-grow: 1;
}

.item-action {
    color: #d32f2f;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.item-action:hover {
    text-decoration: underline;
}
.item-category-tag {
    display: inline-block;
    width: fit-content;
    background: rgba(0, 0, 0, 0.75); /* Темный фон, как был на картинке */
    color: #ffffff;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
/* ==========================================
   10. CONSULTAS MEDIATICAS
   ========================================== */
@media (max-width: 968px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 24px;
        padding: 12px 30px;
    }

    nav ul, .nav ul {
        gap: 15px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form, .footer-newsletter form {
        flex-direction: column;
    }

    .newsletter input, .footer-newsletter input {
        min-width: 100%;
    }

    .article-content h1 {
        font-size: 28px;
    }

    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    nav ul, .nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .logo-box {
        font-size: 20px;
        padding: 15px 30px;
    }
}
