/**
 * Main Theme Styles
 * 
 * @package Finca360
 */

/* ============================================
   GLOBAL STYLES
   ============================================ */

:root {
    /* Premium Palette */
    --primary: #02305e;
    /* Deep Navy Blue */
    --primary-light: #164e87;
    /* Lighter Navy */
    --accent: #3fd069;
    /* Vibrant Green */
    --accent-hover: #36b35a;
    /* Darker Green */

    /* Neutrals */
    --bg-body: #FDFDFD;
    --bg-section: #F4F5F4;
    --bg-contrast: #011830;
    /* Almost Black Blue */

    --text-main: #2C3338;
    --text-muted: #64748B;
    --text-light: #FFFFFF;

    /* UI Elements */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 12px 24px -10px rgba(2, 48, 94, 0.1);
    --shadow-lg: 0 20px 40px -12px rgba(2, 48, 94, 0.15);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

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

/* ============================================
   LAYOUT
   ============================================ */

.container-fluid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

@media (max-width: 968px) {
    .container-fluid {
        padding: 0 15px;
    }
}

.section-padding {
    padding: 60px 0;
}

.site-content {
    min-height: 60vh;
    padding: 0;
}

.site-main {
    padding: 4rem 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn,
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    letter-spacing: 0.3px;
    border: 2px solid transparent;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-light) !important;
    box-shadow: 0 4px 12px rgba(15, 61, 50, 0.2);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-light);
    color: var(--text-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(15, 61, 50, 0.3);
    border-color: var(--primary-light);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* ============================================
   CARDS & COMMON UI
   ============================================ */

.card {
    background: var(--bg-body);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card.still:hover {
    box-shadow: var(--shadow-md);
}

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

/* ============================================
   PAGE HEADERS
   ============================================ */

.page-header {
    margin-bottom: 3rem;
}

.page-title {
    color: var(--primary);
    margin-bottom: 1rem;
}

.page-excerpt {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================
   BLOG & ARCHIVE STYLES
   ============================================ */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--bg-body);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.post-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.entry-title a {
    color: var(--primary);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
}

/* ============================================
   SINGLE POST
   ============================================ */

.single-post-container {
    max-width: 900px;
    margin: 0 auto;
}

.post-thumbnail-single img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.entry-content img {
    border-radius: 8px;
    margin: 2rem 0;
}

.author-bio {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-section);
    border-radius: 12px;
    margin-top: 3rem;
}

.author-avatar img {
    border-radius: 50%;
}

/* ============================================
   404 ERROR PAGE
   ============================================ */

/* ============================================
   404 ERROR PAGE
   ============================================ */

body.error404 {
    background-color: var(--bg-contrast);
    color: #ffffff;
}

body.error404 .site-main {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    /* Takes up most of the viewport height */
}

.error-404-container {
    text-align: center;
    padding: 0 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-404-content {
    max-width: 800px;
    width: 100%;
}

.error-404-image {
    margin-bottom: 1rem;
}

.error-404-image img {
    max-width: 400px;
    /* Reduced size to fit above fold */
    width: 100%;
    margin: 0 auto;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    transition: var(--transition);
}

.error-404-image img:hover {
    transform: scale(1.02);
}

.error-404-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.error-404-text {
    font-size: 1.25rem;
    color: #cccccc;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.error-404-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.error-404-suggestions ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   LEGAL PAGES (Política de Privacidad, Términos, Cookies)
   ============================================ */

.legal-page.site-main {
    padding: 0;
}

.legal-hero {
    background: var(--primary);
    padding: 5rem 2rem 3.5rem;
    text-align: center;
}

.legal-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.legal-hero-title {
    color: var(--text-light);
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.legal-hero-meta {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    margin: 0;
}

.legal-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

.legal-intro {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.75;
}

.legal-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #E8EBF0;
}

.legal-section:last-of-type {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.legal-section h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-section p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.legal-list li {
    color: var(--text-muted);
    line-height: 1.8;
    padding: 0.3rem 0;
}

.legal-list--bullets li {
    padding-left: 1.25rem;
    position: relative;
}

.legal-list--bullets li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.legal-section a,
.legal-intro a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-section a:hover,
.legal-intro a:hover {
    color: var(--accent-hover);
}

.legal-cta {
    background: var(--bg-section);
    border-radius: var(--border-radius);
    padding: 1.75rem 2rem;
    text-align: center;
    margin-top: 2rem;
}

.legal-cta p {
    color: var(--text-muted);
    margin: 0;
}

.legal-cta a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================
   FAQ PAGE
   ============================================ */

.faq-page.site-main {
    padding: 0;
}

/* Hero */
.faq-hero {
    background: var(--primary);
    padding: 5rem 2rem 3.5rem;
    text-align: center;
}

.faq-hero-inner {
    max-width: 700px;
    margin: 0 auto;
}

.faq-hero-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.faq-hero-title {
    color: var(--text-light);
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.faq-hero-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
    margin: 0;
}

/* Container */
.faq-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 4rem 2rem 5rem;
}

/* Section groups */
.faq-section {
    margin-bottom: 3rem;
}

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

.faq-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(63, 208, 105, 0.12);
    border-radius: 8px;
    color: var(--accent);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.faq-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

/* Accordion items */
.faq-accordion {
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #E8EBF0;
}

.faq-item {
    border-bottom: 1px solid #E8EBF0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: var(--bg-body);
    border: none;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    gap: 1rem;
    line-height: 1.45;
}

.faq-question:hover {
    background: #F4F5F4;
    color: var(--primary-light);
}

.faq-question[aria-expanded="true"] {
    background: #F4F5F4;
    color: var(--primary);
}

.faq-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: rgba(2, 48, 94, 0.07);
    border-radius: 50%;
    color: var(--primary);
    font-size: 0.85rem;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.2s ease;
}

.faq-question[aria-expanded="true"] .faq-chevron {
    transform: rotate(180deg);
    background: var(--accent);
    color: #fff;
}

/* Answer */
.faq-answer {
    padding: 0.25rem 1.5rem 1.5rem;
    background: #F4F5F4;
}

.faq-answer p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0;
}

.faq-answer p + p {
    margin-top: 0.75rem;
}

.faq-answer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

/* CTA */
.faq-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    background: var(--bg-section);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: 3rem;
}

.faq-cta-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

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

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

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

    .error-404-image img {
        max-width: 280px;
        /* Even smaller on mobile */
    }

    /* FAQ mobile */
    .faq-hero {
        padding: 4rem 1.25rem 2.5rem;
    }

    .faq-hero-title {
        font-size: 1.75rem;
    }

    .faq-container {
        padding: 2.5rem 1.25rem 4rem;
    }

    .faq-question {
        padding: 1.1rem 1.25rem;
        font-size: 0.925rem;
    }

    .faq-answer {
        padding: 0.25rem 1.25rem 1.25rem;
    }

    .faq-cta {
        padding: 2rem 1.25rem;
    }
}