/* ==========================================
   MAS ALLA DEL DISCURSO - Periodismo Riguroso
   Bootstrap 5 + Custom Masonry Layout
   ========================================== */

:root {
    --primary: #050505;
    --primary-light: #828282;
    --accent: #b45309;
    --accent-hover: #d97706;
    --gold: #e5b300;
    --gold-light: #e5b300;
    --red-accent: #991b1b;
    --teal: #0d9488;
    --green: #15803d;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #5a5954;
    --gray-800: #828282;
    --gray-900: #050505;
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Montserrat', 'Helvetica Neue', sans-serif;
    --container-width: 85%;
    --nav-height: 72px;
    --section-spacing: 5rem;
    --card-radius: 12px;
    --card-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --card-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.15);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background-color: var(--gray-50);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

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

/* ---------- Container (85% width) ---------- */
.container-content {
    width: var(--container-width);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.container-nav {
    width: var(--container-width);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- Navigation ---------- */
#mainNav {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--nav-height);
    padding: 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1030;
}

#mainNav.scrolled {
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
}

.nav-logo {
    height: 44px;
    width: auto;
    border-radius: 6px;
    object-fit: contain;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.5rem 0.9rem !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold) !important;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.6rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Nav buttons */
.btn-facebook {
    background-color: #1877f2;
    color: var(--white);
    border: none;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.btn-facebook:hover {
    background-color: #166fe5;
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-contact {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--gold);
    border-color: var(--gold);
}

.btn-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 165, 32, 0.3);
}

/* ---------- Social Bar ---------- */
.social-bar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1020;
    flex-direction: column;
    background: var(--primary);
    border-radius: 8px 0 0 8px;
    overflow: hidden;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.2);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent);
    color: var(--white);
}

.social-link:first-child:hover {
    background: #1877f2;
}

/* ---------- Hero Section ---------- */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.85) 0%,
        rgba(15, 23, 42, 0.6) 50%,
        rgba(180, 83, 9, 0.25) 100%
    );
}

.z-1 {
    z-index: 1;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(212, 165, 32, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.75);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
    font-weight: 300;
    line-height: 1.7;
}

.hero-cta .btn {
    padding: 0.85rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hero-cta .btn:hover {
    transform: translateY(-2px);
}

.scroll-indicator {
    margin-top: 4rem;
}

.scroll-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.scroll-link:hover {
    color: var(--gold);
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.scroll-icon {
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ---------- Content Sections ---------- */
.content-section {
    padding: var(--section-spacing) 0;
    position: relative;
}

.section-cobertura {
    background: var(--gray-50);
}

.section-politica {
    background: var(--primary);
}

.section-sociedad {
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.section-economia {
    background: var(--gray-50);
}

/* ---------- MASONRY LAYOUT ---------- */
.masonry-layout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 1.5rem;
}

.masonry-item {
    grid-column: span 4;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.masonry-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.masonry-item-large { grid-column: span 8; grid-row: span 2; }
.masonry-item-medium { grid-column: span 7; grid-row: span 2; }
.masonry-item-featured { grid-column: span 8; grid-row: span 2; }
.masonry-item-tall { grid-column: span 4; grid-row: span 2; }
.masonry-item-wide { grid-column: span 8; }

/* ---------- Cards ---------- */
.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.4s ease;
    overflow: hidden;
    height: 100%;
    background: var(--white);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}

.card-featured .card-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
    line-height: 1.25;
}

.card-featured .card-text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--gray-600);
}

.card-featured.card-dark .card-title {
    color: var(--white);
}

.card-featured.card-dark .card-text {
    color: rgba(255, 255, 255, 0.85);
}

.card-side .card-title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.card-side .card-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* Card image wrapper */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.card-img-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.7) 0%,
        rgba(15, 23, 42, 0.1) 60%,
        transparent 100%
    );
    pointer-events: none;
}

.card-img-overlay-gradient.dark {
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.9) 0%,
        rgba(15, 23, 42, 0.4) 50%,
        rgba(15, 23, 42, 0.2) 100%
    );
}

.card-category {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: var(--accent);
    color: var(--white);
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 2;
}

.card-category.category-gold {
    background: var(--gold);
    color: var(--primary);
}

.card-category.category-red {
    background: var(--red-accent);
    color: var(--white);
}

.card-category.category-green {
    background: var(--green);
    color: var(--white);
}

.card-body {
    padding: 1.75rem;
}

/* Horizontal card */
.card-horizontal .card-img {
    height: 100%;
    min-height: 220px;
}

/* Highlight / Quote cards */
.card-highlight {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    color: var(--primary);
}

.card-highlight .card-body {
    min-height: 220px;
}

.quote-icon {
    font-size: 2rem;
    opacity: 0.4;
    margin-bottom: 0.75rem;
}

.quote-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Dark text-only cards */
.card-text-only {
    color: var(--white);
}

.card-navy {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

.card-navy .card-title {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.card-navy .card-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
}

/* Stat cards */
.card-stat {
    border-radius: var(--card-radius);
    height: 100%;
}

.card-red-gradient {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
}

.card-teal-gradient {
    background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-label {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-desc {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Metric cards */
.card-metric .card-body {
    padding: 1.5rem;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.metric-icon {
    font-size: 1.25rem;
    color: var(--accent);
}

.metric-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
}

.metric-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.metric-desc {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Info bar card */
.card-info-bar {
    background: var(--white);
    border-left: 4px solid var(--accent);
}

.info-icon {
    font-size: 2rem;
    color: var(--accent);
}

/* CTA Final card */
.card-cta-final {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--white);
}

.cta-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.cta-title {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.cta-text {
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.cta-buttons .btn {
    padding: 0.75rem 1.5rem;
}

/* Card footer area */
.card-footer-area {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-200);
}

.card-dark .card-footer-area {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Content lists */
.content-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-list li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
}

.content-list li:last-child {
    border-bottom: none;
}

.content-list.compact li {
    padding: 0.35rem 0;
    font-size: 0.85rem;
}

/* ---------- Footer CTA ---------- */
.footer-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #1a103c 50%, var(--primary-light) 100%);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(212, 165, 32, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(180, 83, 9, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.footer-logo {
    height: 70px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-subtitle {
    color: rgba(255, 255, 255, 0.65);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1rem;
    font-weight: 300;
}

.footer-buttons .btn {
    transition: all 0.3s ease;
}

.footer-buttons .btn:hover {
    transform: translateY(-2px);
}

.footer-buttons .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.footer-buttons .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-circle:hover {
    background: var(--gold);
    color: var(--primary);
    transform: translateY(-3px);
}

/* ---------- Main Footer ---------- */
.main-footer {
    background: #080e1a;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-brand-logo {
    height: 36px;
}

.footer-brand span {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}

.footer-copy {
    color: var(--gray-400);
    font-size: 0.85rem;
    margin-bottom: 0;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-copyright {
    color: var(--gray-600);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .masonry-item,
    .masonry-item-large,
    .masonry-item-medium,
    .masonry-item-featured,
    .masonry-item-tall,
    .masonry-item-wide {
        grid-column: span 6;
    }
}

@media (max-width: 991px) {
    :root {
        --section-spacing: 3.5rem;
    }

    .masonry-item,
    .masonry-item-large,
    .masonry-item-medium,
    .masonry-item-featured,
    .masonry-item-tall,
    .masonry-item-wide {
        grid-column: span 12;
        grid-row: auto;
    }

    .container-nav {
        width: 95%;
    }

    .container-content {
        width: 92%;
    }

    .navbar-collapse {
        background: rgba(15, 23, 42, 0.98);
        padding: 1rem 1.5rem;
        border-radius: 0 0 8px 8px;
        margin-top: 0.5rem;
        max-height: calc(100vh - var(--nav-height));
        overflow-y: auto;
    }

    .nav-item {
        margin: 0.25rem 0;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .card-img {
        height: 200px;
    }

    .card-horizontal .card-img {
        min-height: 180px;
    }

    .card-featured .card-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .hero-cta {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        margin: 0 !important;
    }

    .footer-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-buttons .btn {
        margin: 0 !important;
    }

    .footer-title {
        font-size: 1.5rem;
    }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .cta-buttons .btn {
        margin: 0 !important;
    }
}

@media (max-width: 575px) {
    .container-content {
        width: 95%;
    }

    .brand-text {
        font-size: 1rem;
    }

    .nav-logo {
        height: 36px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-badge {
        font-size: 0.7rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .card-featured .card-title {
        font-size: 1.3rem;
    }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
