
/*
Theme Name: Mucha Mierda
Theme URI: https://example.com/
Author: Mucha Mierda
Description: Revista digital moderna con cabecera roja, carrusel de noticias y secciones editoriales.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: mucha-mierda
*/

:root {
    --mm-red: #C82032;
    --mm-red-dark: #A71929;
    --mm-white: #FFFFFF;
    --mm-black: #171717;
    --mm-gray: #777777;
    --mm-light: #F5F5F5;
    --mm-border: #E8E8E8;
    --mm-width: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--mm-white);
    color: var(--mm-black);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover { color: var(--mm-red); }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea {
    font: inherit;
}

.container {
    width: min(94%, var(--mm-width));
    margin-inline: auto;
}

/* CABECERA */

.site-header {
    background: var(--mm-red);
    color: var(--mm-white);
}

.header-inner {
    min-height: 125px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.site-branding { padding: 18px 0; }

.site-title {
    margin: 0;
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -2px;
    text-transform: uppercase;
}

.site-title a,
.site-title a:hover {
    color: #fff;
}

.site-description {
    margin: 7px 0 0;
    color: #fff;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.custom-logo {
    max-height: 85px;
    width: auto;
}

.main-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.main-navigation a:hover {
    color: #FFE0E3;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 4px;
    color: #fff;
    padding: 9px 13px;
    cursor: pointer;
}

/* BARRA INFORMATIVA */

.news-bar {
    background: var(--mm-light);
    border-bottom: 1px solid var(--mm-border);
    padding: 8px 0;
    color: var(--mm-gray);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* PORTADA */

.main-content {
    padding-top: 35px;
    padding-bottom: 50px;
}

.section-heading {
    margin: 0 0 22px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--mm-red);
    font-size: 23px;
    font-weight: 900;
    text-transform: uppercase;
}

.section-heading span { color: var(--mm-red); }

/* CARRUSEL */

.featured-slider {
    position: relative;
    overflow: hidden;
    background: #222;
    margin-bottom: 45px;
    border-radius: 5px;
}

.slide {
    display: none;
    position: relative;
    min-height: 440px;
}

.slide.is-active { display: block; }

.slide-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(0,0,0,.85),
        rgba(0,0,0,.08) 80%
    );
}

.slide-caption {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    right: 0;
    padding: clamp(20px, 5vw, 55px);
    color: #fff;
}

.slide-category {
    display: inline-block;
    background: var(--mm-red);
    color: #fff;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.slide-title {
    max-width: 800px;
    margin: 12px 0;
    color: #fff;
    font-size: clamp(26px, 5vw, 48px);
    line-height: 1.12;
    font-weight: 900;
}

.slide-title a:hover { color: #fff; }

.slide-description {
    max-width: 650px;
    color: #eee;
    font-size: 15px;
}

.slider-controls {
    position: absolute;
    z-index: 5;
    bottom: 20px;
    right: 22px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.slider-arrow {
    width: 38px;
    height: 38px;
    border: 1px solid #fff;
    background: rgba(0,0,0,.45);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.slider-arrow:hover {
    background: var(--mm-red);
}

.slider-dots {
    display: flex;
    gap: 7px;
    margin-right: 8px;
}

.slider-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
}

.slider-dot.is-active {
    background: var(--mm-red);
    outline: 1px solid #fff;
}

/* ARTÍCULOS */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 27px;
}

.post-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
}

.post-thumbnail {
    display: block;
    overflow: hidden;
    background: var(--mm-light);
    aspect-ratio: 16 / 10;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.04);
}

.post-category {
    display: inline-block;
    margin-top: 13px;
    color: var(--mm-red);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-title {
    margin: 5px 0 8px;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
}

.post-title a:hover { color: var(--mm-red); }

.post-meta {
    color: var(--mm-gray);
    font-size: 12px;
}

.post-excerpt {
    color: #555;
    font-size: 14px;
}

.read-more {
    color: var(--mm-red);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

/* SECCIONES */

.category-section { margin-bottom: 50px; }

.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.category-section-header a {
    color: var(--mm-red);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

/* PÁGINAS Y ARTÍCULOS */

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
}

.entry-title {
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.15;
    margin: 0 0 12px;
    font-weight: 900;
}

.entry-content {
    font-size: 17px;
    line-height: 1.85;
}

.entry-content img {
    margin: 25px 0;
}

.entry-content h2,
.entry-content h3 {
    line-height: 1.3;
}

.entry-content blockquote {
    margin: 25px 0;
    padding: 15px 22px;
    border-left: 4px solid var(--mm-red);
    background: var(--mm-light);
}

.entry-featured-image {
    width: 100%;
    margin: 25px 0;
}

.sidebar-widget {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--mm-light);
}

.sidebar-widget h2 {
    margin-top: 0;
    font-size: 17px;
    border-bottom: 2px solid var(--mm-red);
    padding-bottom: 9px;
}

/* PAGINACIÓN */

.pagination {
    margin: 40px 0;
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination a,
.pagination span {
    padding: 9px 13px;
    border: 1px solid var(--mm-border);
}

.pagination .current {
    background: var(--mm-red);
    color: #fff;
    border-color: var(--mm-red);
}

/* COMENTARIOS */

.comment-list { padding-left: 20px; }

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--mm-border);
    margin-bottom: 12px;
}

.comment-form input[type="submit"] {
    width: auto;
    background: var(--mm-red);
    color: #fff;
    border: 0;
    padding: 12px 22px;
    cursor: pointer;
}

/* BOTONES */

button[type="submit"],
.search-submit {
    background: var(--mm-red);
    color: #fff;
    border: 0;
    padding: 10px 18px;
    cursor: pointer;
}

/* PIE DE PÁGINA */

.site-footer {
    background: var(--mm-red);
    color: #fff;
    padding: 55px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 45px;
}

.footer-title {
    margin: 0 0 15px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
}

.footer-text {
    color: #fff;
    font-size: 14px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 9px; }

.footer-links a {
    color: #fff;
    font-size: 14px;
}

.footer-links a:hover {
    color: #FFE0E3;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-social a {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.footer-bottom {
    margin-top: 35px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.4);
    text-align: center;
    font-size: 12px;
}

/* BÚSQUEDA */

.search-form {
    display: flex;
    gap: 5px;
}

.search-field {
    min-width: 0;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--mm-border);
}

/* ACCESIBILIDAD */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid #F5A0AA;
    outline-offset: 3px;
}

/* MÓVILES Y TABLETS */

@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 15px 0;
    }

    .menu-toggle { display: block; }

    .main-navigation {
        display: none;
        width: 100%;
    }

    .main-navigation.is-open { display: block; }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation li {
        padding: 10px 0;
        border-top: 1px solid rgba(255,255,255,.2);
    }

    .posts-grid { grid-template-columns: repeat(2, 1fr); }

    .content-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .site-title { font-size: 31px; }

    .posts-grid { grid-template-columns: 1fr; }

    .slide { min-height: 390px; }

    .slide-caption { padding-bottom: 75px; }

    .slide-title { font-size: 29px; }

    .slider-controls {
        left: 18px;
        right: 18px;
        justify-content: space-between;
    }

    .footer-grid { grid-template-columns: 1fr; gap: 25px; }

    .main-content { padding-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
