/*
Theme Name: La Agencia AI
Theme URI: https://la-agencia.ai
Author: Antigravity
Author URI: https://google.com
Description: A custom, minimalist theme inspired by Notion's design aesthetic for La Agencia AI.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: la-agencia-ai
*/

/* 
 * The main styles are handled via theme.json and specific component styles 
 * will be added here or in separate CSS files if they get too large.
 */

/* Minimal Reset / Base adjustments not covered by theme.json */
html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    color: var(--wp--preset--color--text-primary);
    background-color: var(--wp--preset--color--bg-primary);
}

/* Utilities */
.container {
    max-width: var(--wp--style--global--content-size);
    /* 1080px from theme.json */
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--wp--preset--spacing--24);
    /* Fallback if var not preset loaded yet, use 24px */
    padding-right: 24px;
}

/* Make sure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--wp--preset--color--accent);
    color: white;
}

.btn-primary:hover {
    background-color: #1a6cb8;
    /* Darker shade of accent */
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--wp--preset--color--text-secondary);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid var(--wp--preset--color--border);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: var(--wp--preset--color--bg-secondary);
    color: var(--wp--preset--color--text-primary);
}


/* =========================================
   Header Styles
   ========================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px 0;
}

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

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo-text a {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--wp--preset--color--text-primary);
}

.logo-separator {
    color: var(--wp--preset--color--text-secondary);
    opacity: 0.5;
}

.notion-badge {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notion-icon {
    width: 20px;
    height: 20px;
}

.partner-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--wp--preset--color--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    gap: 4px;
}

.lang-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--wp--preset--color--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.lang-btn.active {
    color: var(--wp--preset--color--text-primary);
    font-weight: 700;
}

.menu-toggle {
    display: none;
    /* Hidden on desktop */
}

/* =========================================
   Front Page: Hero Section
   ========================================= */
.hero-section {
    padding-top: 80px;
    /* Space from sticky header */
    padding-bottom: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    /* Generous gap */
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background-color: #E6F3FF;
    /* Brand Light Soft */
    color: #0066CC;
    /* Brand Blue */
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.hero-title {
    /* Font size handled by theme.json h1 (3.5rem) */
    margin-top: 0;
    margin-bottom: 24px;
    line-height: 1.1;
    color: #111;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--wp--preset--color--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 90%;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.hero-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.hero-img-placeholder::after {
    content: "Hero Image";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

/* =========================================
   Front Page: Personas Section (Tabs)
   ========================================= */
.personas-section {
    padding: 100px 0;
    background-color: var(--wp--preset--color--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--wp--preset--color--text-secondary);
}

.personas-tabs-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

/* Tab Buttons */
.personas-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.persona-tab {
    text-align: left;
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 1.1rem;
    color: var(--wp--preset--color--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.persona-tab:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--wp--preset--color--text-primary);
}

.persona-tab.active {
    background-color: white;
    color: var(--wp--preset--color--text-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
}

/* Tab Content */
.personas-content {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    min-height: 400px;
    /* Prevent layout shift */
    position: relative;
    border: 1px solid var(--wp--preset--color--border);
}

.persona-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.persona-panel.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-badge {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--wp--preset--color--text-secondary);
    margin-bottom: 16px;
    font-weight: 600;
}

.panel-pain {
    font-size: 1.75rem;
    color: #111;
    margin-top: 0;
    margin-bottom: 16px;
}

.panel-desc {
    font-size: 1.1rem;
    color: var(--wp--preset--color--text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
}

.panel-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    margin-bottom: 32px;
}

.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #E6F3FF;
    color: #0066CC;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
}

.panel-image-placeholder {
    width: 100%;
    height: 200px;
    background-color: #f5f7fa;
    border-radius: 8px;
    margin-top: auto;
}

/* =========================================
   Front Page: Services Grid
   ========================================= */
.services-section {
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.service-card {
    background: white;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 8px;
    padding: 32px 24px;
    transition: all 0.3s ease;
    cursor: default;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: transparent;
}

.service-icon {
    width: 48px;
    height: 48px;
    background-color: #FAFAFA;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #444;
    margin-bottom: 20px;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.service-title {
    font-size: 1.2rem;
    /* H3ish */
    margin-bottom: 12px;
    color: #111;
}

.service-desc {
    font-size: 0.95rem;
    color: var(--wp--preset--color--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* =========================================
   Footer Styles (Sync with Home)
   ========================================= */
.site-footer {
    background-color: #4A5F77;
    /* Matches Home footer bg */
    color: #e0e0e0;
    padding: 4rem 0;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-branding {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo-img {
    height: 32px;
    margin-bottom: 1rem;
    display: block;
    mix-blend-mode: screen;
}

.footer-badge-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-badge-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.footer-badge-text {
    font-weight: 500;
    font-size: 0.85rem;
    color: white;
}

.footer-address-text {
    margin-bottom: 1rem;
    line-height: 1.6;
    font-style: normal;
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-top: 0;
}

.footer-contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-contact-links a {
    text-decoration: none;
    color: #e0e0e0;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-contact-links a:hover {
    color: white;
}

.social-header {
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.social-icons-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon-circle {
    color: white;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
    width: 36px;
    height: 36px;
}

.social-icon-circle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.footer-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #e0e0e0;
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-footer {
        padding: 3rem 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* =========================================
   Blog / Archive Styles
   ========================================= */
.blog-header {
    margin-bottom: 60px;
    margin-top: 60px;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--wp--preset--color--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.blog-card {
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: white;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.05);
}

.blog-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta-top {
    font-size: 0.85rem;
    color: var(--wp--preset--color--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.blog-cat {
    color: var(--wp--preset--color--accent);
    text-decoration: none;
}

.blog-card-title {
    font-size: 1.4rem;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.blog-card-title a {
    text-decoration: none;
    color: var(--wp--preset--color--text-primary);
}

.blog-card-excerpt {
    font-size: 1rem;
    color: var(--wp--preset--color--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
    flex-grow: 1;
}

.blog-read-more {
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--wp--preset--color--accent);
}

/* =========================================
   Single Post Styles (Notion Reading Mode)
   ========================================= */
.single-post-container {
    max-width: 740px !important;
    /* Proper reading width */
    margin-top: 60px;
    margin-bottom: 100px;
}

.entry-cover-image {
    margin-bottom: -40px;
    /* Overlap effect or tight spacing */
}

.entry-cover-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
}

.entry-icon {
    font-size: 48px;
    margin-bottom: 16px;
    position: relative;
    z-index: 10;
    margin-left: 4px;
    /* Slight alignment */
    margin-top: 20px;
}

.entry-header {
    margin-bottom: 40px;
}

.entry-title {
    font-size: 2.75rem !important;
    /* Override H1 default if needed */
    line-height: 1.2;
    margin-bottom: 16px;
    word-wrap: break-word;
}

.entry-meta {
    font-size: 1rem;
    color: var(--wp--preset--color--text-secondary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 24px;
    margin-bottom: 32px;
}

.entry-content {
    font-size: 1.125rem;
    /* 18px for reading */
    line-height: 1.7;
    color: #111;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2 {
    margin-top: 2em;
    margin-bottom: 0.75em;
    font-size: 1.75rem;
}

.entry-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-size: 1.4rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content blockquote {
    border-left: 3px solid #111;
    margin: 2em 0;
    padding-left: 20px;
    font-style: italic;
    font-size: 1.25rem;
    color: #444;
}

.entry-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    color: var(--wp--preset--color--text-secondary);
}

/* Post Navigation */
.post-navigation {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-links {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.nav-previous,
.nav-next {
    max-width: 45%;
}

.nav-previous a,
.nav-next a {
    text-decoration: none;
    display: block;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: border 0.2s;
}

.nav-previous a:hover,
.nav-next a:hover {
    border-color: #ccc;
}

.nav-subtitle {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--wp--preset--color--text-secondary);
    margin-bottom: 4px;
}

.nav-title {
    font-weight: 600;
    color: var(--wp--preset--color--text-primary);
}