:root {
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-light: #6b7280;
    --bg-light: #f9fafc;
    --bg-white: #ffffff;
    --border: #e5e9f0;
    --accent: #1e4a7a;
    --accent-light: #2a5f94;
    --accent-bg: #eef3f9;
    --shadow-sm: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 16px 30px -12px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
}

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

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

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.1rem 2rem;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0px;
}

.logo img {
    height: 52px;
    width: auto;
    cursor: pointer;
}

.nav-center,
.nav-center li,
.nav-center .menu-item {
    list-style: none !important;
}

.nav-center li::marker,
.nav-center .menu-item::marker {
    content: "" !important;
}

.nav-center {
    display: flex !important;
    gap: 30px;
    align-items: center;
}

.nav-center a {
    font-size: .97rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-center a.active,
.nav-center a:hover {
    color: var(--accent);
}

.nav-center a.active::after,
.nav-center a:hover::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

.btn-nav,
.btn-nav-mobile {
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    padding: .9rem 1.35rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.menu-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 1.45rem;
    color: var(--accent);
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 78px;
    left: 0;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: none;
    flex-direction: column;
    padding: 1rem 1.2rem;
    gap: 1rem;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

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

/* HERO BLOG */

.blog-hero {
    margin-top: 0;
    min-height: 430px;
    background: url('../imagenes/faro1.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 29, 48, .48), rgba(12, 29, 48, .68));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    text-align: center;
    color: #fff;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    padding: .45rem .9rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font-size: .9rem;
}

.hero-content h1 {
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.12;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.08rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: .96;
}

/* BLOG MAIN */

.blog-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.2rem 5rem;
}

.blog-controls {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.search-box,
.filter-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: .9rem 1rem;
    box-shadow: var(--shadow-sm);
}

.search-box {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex: 1;
    min-width: 280px;
}

.search-box input,
.filter-box select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    width: 100%;
    color: var(--text-primary);
}

.filter-box {
    min-width: 220px;
}

.filter-box label {
    display: block;
    font-size: .82rem;
    color: var(--text-light);
    margin-bottom: .35rem;
}

/* FEATURED POST */

.featured-post {
    margin-bottom: 3rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--bg-white);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.featured-card img {
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}

.featured-content {
    padding: 2.2rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    align-items: center;
    color: var(--text-light);
    font-size: .92rem;
    margin-bottom: 1rem;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 700;
    font-size: .82rem;
}

.featured-content h2,
.post-card h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

.featured-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.featured-content p,
.post-card p {
    color: var(--text-secondary);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: 1.4rem;
    color: var(--accent);
    font-weight: 700;
}

/* POSTS GRID */

.posts-section {
    padding-top: .5rem;
}

.section-heading {
    margin-bottom: 1.5rem;
}

.section-heading h2 {
    font-size: 2rem;
    margin-bottom: .35rem;
}

.section-heading p {
    color: var(--text-light);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

/* TARJETAS DEL BLOG */

.post-card {
    background: var(--bg-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(229, 233, 240, .8);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 430px;
}

.post-image {
    display: block;
    width: 100%;
    height: 215px;
    overflow: hidden;
    flex-shrink: 0;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Este es el cambio importante: antes estaba como .post-card-content */
.post-content {
    padding: 1.4rem 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-category {
    display: inline-block;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.post-content h3 {
    font-size: 1.28rem;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.post-content h3 a {
    color: var(--text-primary);
}

.post-content h3 a:hover {
    color: var(--accent);
}

.post-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.post-content .read-more {
    margin-top: auto;
    padding-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.post-content .read-more:hover {
    color: var(--accent-light);
}

.post-card .post-meta {
    margin-bottom: .8rem;
}

.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 0;
}

/* FOOTER */

.blog-footer {
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-light);
    background: #fff;
}

/* ENTRADA INDIVIDUAL */

.post-container {
    margin-top: 78px;
}

.post-hero {
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    position: relative;
}

.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 24, 42, .2), rgba(8, 24, 42, .78));
}

.post-hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 900px;
    padding: 4rem 1.2rem 3rem;
    margin: 0 auto;
    width: 100%;
}

.post-hero-content h1 {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    line-height: 1.1;
    margin-top: .7rem;
}

.post-body {
    max-width: 900px;
    margin: -2.5rem auto 4rem;
    background: #fff;
    border-radius: 28px;
    padding: 2rem 1.4rem 2.5rem;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.post-body p {
    font-size: 1.07rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.post-body .back-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.4rem;
    color: var(--accent);
    font-weight: 700;
}

.post-body .cta-box {
    margin-top: 2rem;
    padding: 1.35rem;
    border-radius: 22px;
    background: var(--accent-bg);
}

.post-body .cta-box h3 {
    margin-bottom: .55rem;
}

/* RESPONSIVE */

@media (max-width: 980px) {
    .featured-card,
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .featured-card {
        display: block;
    }

    .featured-card img {
        height: 280px;
    }
}

@media (max-width: 820px) {
    .nav-center,
    .nav-right {
        display: none !important;
    }

    .menu-toggle {
        display: block;
    }

    .blog-hero,
    .post-container {
        margin-top: 74px;
    }

    nav {
        padding: 1rem 1.2rem;
    }

    .logo img {
        height: 46px;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .featured-content {
        padding: 1.4rem;
    }

    .post-body {
        padding: 1.5rem 1rem 2rem;
        border-radius: 22px;
        margin-top: -1.5rem;
    }

    .blog-main {
        padding: 2rem 1rem 4rem;
    }

    .post-card {
        min-height: auto;
    }

    .post-image {
        height: 210px;
    }
}