/* ========================================
   ADVANCED LEGAL WEBSITE - CSS
   Estilo: Modern Editorial
======================================== */

/* 1. VARIABLES Y RESET */
:root {
    --color-bg: #FAFAFA;
    --color-white: #FFFFFF;
    --color-text: #1A1A1A;
    --color-text-light: #555555;
    --color-accent: #003366; /* Azul Profundo / Navy */
    --color-border: #E0E0E0;
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Manrope', -apple-system, sans-serif;
    --container-width: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-light);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* 2. UTILIDADES */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

.btn {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-dark { background: var(--color-text); color: var(--color-white); }
.btn-dark:hover { background: var(--color-accent); }
.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--color-text); }
.btn-ghost:hover { background: var(--color-text); color: var(--color-white); }
.btn-block { width: 100%; text-align: center; }

/* 3. TIPOGRAFÍA */
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-text);
    line-height: 1.3;
    font-weight: 700;
}
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.8rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1.5rem; }

/* 4. HEADER */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.5px;
}
.logo-sub {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-light);
    display: block;
    margin-top: 2px;
}
.main-nav a {
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}
.main-nav a.active::after,
.main-nav a:hover::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
}

/* 5. HERO (INDEX) */
.hero-section {
    padding: 6rem 0;
    border-bottom: 1px solid var(--color-border);
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
    margin-bottom: 1rem;
}
.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; }

/* 6. PREVIEW BLOG (INDEX) */
.preview-blog { padding: 5rem 0; background: var(--color-white); }
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}
.view-all { font-size: 0.9rem; font-weight: 600; color: var(--color-accent); }
.articles-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.mini-card {
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: transform 0.2s;
}
.mini-card:hover { transform: translateY(-3px); border-color: var(--color-text); }
.mini-cat {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.5rem;
}
.mini-card h3 { font-size: 1.25rem; font-family: var(--font-heading); margin-bottom: 0.5rem; }
.mini-card h3 a:hover { color: var(--color-accent); }
.mini-card p { font-size: 0.9rem; color: var(--color-text-light); margin: 0; }

/* 7. CONTACT SECTION */
.contact-section {
    padding: 6rem 0;
    background: var(--color-bg);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.contact-info h2 { margin-bottom: 1rem; }
.contact-details { margin-top: 2rem; }
.contact-form {
    background: var(--color-white);
    padding: 2.5rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    font-family: var(--font-body);
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--color-text);
}

/* 8. BLOG PAGE (ARCHIVE) */
.page-hero {
    background: var(--color-text);
    color: var(--color-white);
    padding: 5rem 0;
    text-align: center;
    margin-bottom: 4rem;
}
.page-hero h1 { color: var(--color-white); }
.page-hero p { color: rgba(255,255,255,0.7); max-width: 500px; margin: 0 auto; }

.blog-main { padding-bottom: 5rem; }
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
@media(max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .hero-content, .contact-grid { grid-template-columns: 1fr; }
}

.blog-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.3s;
}
.blog-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.blog-card-image {
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-tag {
    background: var(--color-text);
    color: white;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-card-content { padding: 1.5rem; }
.blog-card-content time { font-size: 0.8rem; color: #888; display: block; margin-bottom: 0.5rem; }
.blog-card-content h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.blog-card-content h2 a:hover { color: var(--color-accent); }
.blog-card-content p { font-size: 0.95rem; margin-bottom: 1rem; }
.read-more { font-weight: 600; font-size: 0.85rem; color: var(--color-accent); }

/* 9. SINGLE ARTICLE PAGE */
.single-article { padding-bottom: 5rem; }
.article-header {
    text-align: center;
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 3rem;
}
.back-link {
    font-size: 0.85rem;
    color: #888;
    display: inline-block;
    margin-bottom: 2rem;
}
.article-meta-top {
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}
.category-tag {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.article-intro {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
}

.article-body {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.0625rem;
}
.article-body h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}
.article-body ul, .article-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}
.article-body li { margin-bottom: 0.5rem; }
.article-body blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-text);
}
.highlight-box {
    background: #f0f4f8;
    padding: 1.5rem;
    border-radius: 4px;
    margin: 2rem 0;
    border-left: 4px solid var(--color-accent);
}

.article-footer-cta {
    background: var(--color-text);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-top: 4rem;
}
.article-footer-cta h3 { color: white; font-family: var(--font-heading); margin-bottom: 1.5rem; }
.article-footer-cta .btn { background: white; color: var(--color-text); }
.article-footer-cta .btn:hover { background: var(--color-accent); color: white; }

/* 10. FOOTER */
.site-footer {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    margin-top: auto;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #888;
}
.footer-nav a { margin-left: 1.5rem; }
