/* ============================================
   TRACCIÓN MEDIA — Main Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: #FAF9F6;
    color: #0A0A0A;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: 720px;
}

/* --- Top Bar --- */
.top-bar {
    background: #0A0A0A;
    padding: 8px 0;
    font-family: monospace;
    font-size: 12px;
}

.top-bar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar__date {
    color: #999;
}

.top-bar__link {
    color: #C8FF00;
    transition: opacity 0.2s;
}

.top-bar__link:hover {
    opacity: 0.8;
}

/* --- Header --- */
.header {
    border-bottom: 3px solid #0A0A0A;
    padding: 20px 0;
    background: #FAF9F6;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Logo --- */
.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 32px;
    letter-spacing: 2px;
    color: #0A0A0A;
}

.logo__accent {
    color: #1A6B3C;
}

.logo--footer {
    color: #F5F3EF;
}

.logo--footer .logo__accent {
    color: #C8FF00;
}

/* --- Primary Nav --- */
.nav-primary {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-primary__link {
    font-size: 14px;
    font-weight: 500;
    color: #0A0A0A;
    transition: color 0.2s;
}

.nav-primary__link:hover {
    color: #1A6B3C;
}

.nav-primary__btn {
    background: #0A0A0A;
    color: #F5F3EF;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.nav-primary__btn:hover {
    background: #333;
}

/* --- Nav Toggle (Mobile) --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #0A0A0A;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Secondary Nav --- */
.nav-secondary {
    border-bottom: 1px solid #DDDDDD;
    background: #FAF9F6;
}

.nav-secondary__inner {
    display: flex;
    gap: 24px;
    overflow-x: auto;
}

.nav-secondary__link {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    padding: 12px 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.nav-secondary__link:hover {
    color: #0A0A0A;
}

.nav-secondary__link--active {
    color: #0A0A0A;
    border-bottom-color: #1A6B3C;
}

/* --- Mobile Nav --- */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.97);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mobile-nav__link {
    color: #F5F3EF;
    font-size: 20px;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-nav__link:hover {
    color: #C8FF00;
}

.mobile-nav__link--cta {
    background: #C8FF00;
    color: #0A0A0A;
    padding: 10px 32px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 16px;
}

/* --- Tag --- */
.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #1a6b3c;
}

.tag--small {
    padding: 3px 8px;
    font-size: 10px;
}

/* --- Meta --- */
.meta {
    font-size: 13px;
    color: #999;
}

.meta--small {
    font-size: 12px;
}

/* --- Hero --- */
.hero {
    padding: 32px 0;
}

.hero__grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
}

.hero__main {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #0A0A0A;
    min-height: 480px;
}

.hero__main-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.hero__main-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.hero__main-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero__main-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 28px;
    line-height: 1.2;
    color: #F5F3EF;
}

.hero__main-extract {
    color: #bbb;
    font-size: 15px;
    line-height: 1.5;
}

.hero__main .meta {
    color: #888;
    margin-top: auto;
}

.hero__side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Card --- */
.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #DDDDDD;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card--horizontal {
    flex-direction: column;
    flex: 1;
}

.card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card__img--small {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
}

.card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card__title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.3;
    color: #0A0A0A;
}

.card__title--small {
    font-size: 15px;
}

.card__extract {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Section --- */
.section {
    padding: 48px 0;
    border-top: 1px solid #eee;
}

.section__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.section__title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 24px;
}

.section__title--large {
    font-size: 36px;
}

.section__link {
    font-size: 14px;
    font-weight: 600;
    color: #1A6B3C;
    transition: opacity 0.2s;
}

.section__link:hover {
    opacity: 0.7;
}

/* --- Grid --- */
.grid {
    display: grid;
    gap: 24px;
}

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

/* --- Article Page --- */
.article__header {
    padding: 48px 0 24px;
}

.article__title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 40px;
    line-height: 1.15;
    margin-top: 16px;
    margin-bottom: 16px;
}

.article__subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 20px;
    color: #666;
    margin-top: -8px;
}

.article__meta {
    font-size: 14px;
    color: #999;
}

.article__image {
    margin-bottom: 32px;
}

.article__image img {
    width: 100%;
    border-radius: 6px;
}

.article__body {
    padding-bottom: 48px;
}

.article__body p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 24px;
    color: #333;
}

.article__body h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 16px;
    color: #0A0A0A;
}

.article__body h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 12px;
}

.article__body strong {
    font-weight: 600;
    color: #0A0A0A;
}

.article__body blockquote {
    border-left: 4px solid #1A6B3C;
    padding: 16px 24px;
    margin: 32px 0;
    font-style: italic;
    color: #555;
    background: #f5f5f0;
    border-radius: 0 4px 4px 0;
}

.article__body ul, .article__body ol {
    margin: 0 0 24px 24px;
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

.article__body a {
    color: #1A6B3C;
    text-decoration: underline;
}

.article__body a:hover {
    color: #0A0A0A;
}

/* --- Newsletter --- */
.newsletter {
    background: #0A0A0A;
    padding: 64px 0;
}

.newsletter__inner {
    max-width: 560px;
    text-align: center;
}

.newsletter__title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 32px;
    color: #F5F3EF;
    margin-bottom: 12px;
}

.newsletter__text {
    color: #999;
    font-size: 15px;
    margin-bottom: 32px;
}

.newsletter__form {
    display: flex;
    gap: 12px;
}

.newsletter__input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid #333;
    border-radius: 4px;
    background: transparent;
    color: #F5F3EF;
    font-family: inherit;
    font-size: 14px;
}

.newsletter__input::placeholder {
    color: #666;
}

.newsletter__input:focus {
    outline: none;
    border-color: #C8FF00;
}

.newsletter__btn {
    padding: 14px 28px;
    background: #C8FF00;
    color: #0A0A0A;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.newsletter__btn:hover {
    opacity: 0.9;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 48px;
    font-size: 14px;
}

.pagination__link {
    font-weight: 600;
    color: #1A6B3C;
}

.pagination__info {
    color: #999;
}

/* --- Footer --- */
.footer {
    background: #0A0A0A;
    padding: 64px 0 0;
    color: #999;
}

.footer__inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}

.footer__desc {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 16px;
}

.footer__heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #F5F3EF;
    margin-bottom: 16px;
}

.footer__link {
    display: block;
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer__link:hover {
    color: #C8FF00;
}

.footer__bottom {
    border-top: 1px solid #222;
    padding: 20px 0;
    margin-top: 48px;
}

.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

/* ============================================
   RESPONSIVE
   ============================================ */

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

    .footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-primary {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

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

    .hero__main {
        min-height: auto;
    }

    .hero__main-title {
        font-size: 22px;
    }

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

    .article__title {
        font-size: 28px;
    }

    .newsletter__form {
        flex-direction: column;
    }

    .footer__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__bottom-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .section__title--large {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 24px;
    }

    .top-bar__inner {
        font-size: 11px;
    }

    .hero__main-content {
        padding: 20px;
    }

    .container {
        padding: 0 16px;
    }
}
