/* ==========================================================================
   Pablo Atela Theme - Design System
   ========================================================================== */

/* --- Design Tokens --- */
:root {
    --color-primary: #e73b1d;
    --color-primary-dark: #c42f15;
    --color-dark: #1a1a2e;
    --color-body: #4a4a5a;
    --color-light: #f8f9fa;
    --color-white: #ffffff;
    --color-border: #e8e8e8;
    --color-muted: #8a8a9a;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-section: 7rem;

    --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.06);
    --shadow-header: 0 1px 4px rgba(0,0,0,0.08);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --header-height: 80px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-body);
    background-color: var(--color-white);
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--color-primary-dark);
}

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

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

.site-main {
    padding-top: var(--header-height);
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--color-white);
    transition: var(--transition);
    height: var(--header-height);
}

.site-header.header--scrolled {
    box-shadow: var(--shadow-header);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.header-logo {
    flex-shrink: 0;
}

.header-logo img {
    max-height: 40px;
    width: auto;
    transition: var(--transition);
}

.header--scrolled .header-logo img {
    max-height: 38px;
}

.header-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
}

/* --- Navigation --- */
.main-nav .nav-list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
}

.main-nav .nav-list li a {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-dark);
    text-decoration: none;
    padding: 0.4rem 0;
    position: relative;
    white-space: nowrap;
}

.main-nav .nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

.main-nav .nav-list li a:hover,
.main-nav .nav-list li.current-menu-item a {
    color: var(--color-primary);
}

.main-nav .nav-list li a:hover::after,
.main-nav .nav-list li.current-menu-item a::after {
    width: 100%;
}

/* Last nav item as CTA button */
.main-nav .nav-list li:last-child a {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.35rem 0.875rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.main-nav .nav-list li:last-child a::after {
    display: none;
}

.main-nav .nav-list li:last-child a:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* --- Mobile Menu Toggle --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-dark);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.is-active .menu-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.is-active .menu-toggle-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .menu-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Footer --- */
.site-footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.7);
    padding-top: var(--space-3xl);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-2xl);
    padding-bottom: var(--space-2xl);
}

.footer-logo img {
    max-height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: var(--space-sm);
}

.footer-tagline {
    font-size: 0.875rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
}

.footer-heading {
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-nav-list li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    text-decoration: none;
}

.footer-nav-list li a:hover {
    color: var(--color-white);
}

.footer-contact-list {
    list-style: none;
}

.footer-contact-list li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-contact-list li a:hover {
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-md) 0;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.875rem 1.75rem;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
}

.btn-outline {
    background: transparent;
    color: var(--color-dark);
    border-color: var(--color-dark);
}

.btn-outline:hover {
    background: var(--color-dark);
    color: var(--color-white);
}

.btn-white {
    background: var(--color-white);
    color: var(--color-dark);
    border-color: var(--color-white);
}

.btn-white:hover {
    background: transparent;
    color: var(--color-white);
}

/* --- Page Content --- */
.page-content {
    padding: var(--space-3xl) 0;
}

.page-title {
    font-size: 2.25rem;
    margin-bottom: var(--space-xl);
}

/* --- Post Cards --- */
.post-card {
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--color-border);
}

.post-card:last-child {
    border-bottom: none;
}

.post-card-title {
    font-size: 1.375rem;
    margin-bottom: var(--space-xs);
}

.post-card-title a {
    color: var(--color-dark);
}

.post-card-title a:hover {
    color: var(--color-primary);
}

.post-card-date {
    font-size: 0.875rem;
    color: var(--color-muted);
    display: block;
    margin-bottom: var(--space-sm);
}

/* --- Single Post --- */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.single-post-header {
    margin-bottom: var(--space-xl);
}

.single-post-date {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.single-post-title {
    font-size: 2.5rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.single-post-thumbnail {
    margin-bottom: var(--space-xl);
    border-radius: 12px;
    overflow: hidden;
}

.single-post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.single-post-content {
    font-size: 1.0625rem;
    line-height: 1.8;
}

.single-post-content p {
    margin-bottom: var(--space-md);
}

.single-post-content h2,
.single-post-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.single-post-content img {
    border-radius: 8px;
    margin: var(--space-lg) 0;
}

.single-post-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.single-post-content a:hover {
    color: var(--color-primary-dark);
}

.single-post-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding-left: var(--space-md);
    margin: var(--space-lg) 0;
    font-style: italic;
    color: var(--color-muted);
}

.single-post-content ul,
.single-post-content ol {
    padding-left: 1.5rem;
    margin-bottom: var(--space-md);
}

.single-post-content li {
    margin-bottom: var(--space-xs);
}

.single-post-footer {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

@media (max-width: 768px) {
    .single-post-title {
        font-size: 1.75rem;
    }
}

/* --- Scroll Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --space-section: 4rem;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-dark);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .main-nav.is-open {
        right: 0;
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .main-nav .nav-list li {
        width: 100%;
    }

    .main-nav .nav-list li a {
        color: rgba(255, 255, 255, 0.8);
        display: block;
        padding: 0.875rem 0;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav .nav-list li a:hover,
    .main-nav .nav-list li.current-menu-item a {
        color: var(--color-white);
    }

    .main-nav .nav-list li a::after {
        display: none;
    }

    .main-nav .nav-list li:last-child a {
        border: none;
        background: var(--color-primary);
        color: var(--color-white);
        text-align: center;
        margin-top: var(--space-sm);
        border-radius: 6px;
        padding: 0.875rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

/* Mobile menu overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.mobile-overlay.is-active {
    display: block;
}

/* Footer social icons */
.footer-social-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
}
.footer-social-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f1f1;
    color: #333;
    transition: all 0.3s ease;
}
.footer-social-list a:hover {
    background: #e73b1d;
    color: #fff;
    transform: translateY(-3px);
}

.footer-brand .footer-social-list {
    margin-top: 12px;
}

.footer-social-list {
    list-style: none !important;
    padding-left: 0 !important;
    flex-direction: row !important;
}
.footer-social-list li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.footer-social-list li::before,
.footer-social-list li::marker {
    content: none !important;
    display: none !important;
}

/* === Contact Form 7 styling === */
.wpcf7 {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.wpcf7-form p {
    margin: 0 0 18px;
    display: block;
}
.wpcf7-form label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="date"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fafafa;
    transition: all 0.25s ease;
    box-sizing: border-box;
}
.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: #e73b1d;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(231, 59, 29, 0.1);
}
.wpcf7-form textarea {
    min-height: 140px;
    resize: vertical;
}
.wpcf7-form input[type="submit"] {
    background: #e73b1d;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.wpcf7-form input[type="submit"]:hover {
    background: #c2301a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 59, 29, 0.3);
}
.wpcf7-form input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.wpcf7-not-valid-tip {
    color: #e73b1d;
    font-size: 13px;
    margin-top: 4px;
    display: block;
}
.wpcf7-response-output {
    margin-top: 18px !important;
    padding: 14px !important;
    border-radius: 8px !important;
    border: none !important;
    font-size: 14px;
}
.wpcf7 form.sent .wpcf7-response-output {
    background: #d4edda;
    color: #155724;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
    background: #f8d7da;
    color: #721c24;
}
.wpcf7-spinner {
    background-color: #e73b1d !important;
}

@media (max-width: 768px) {
    .wpcf7 {
        padding: 20px;
    }
}

/* Ecosistema empresarial: equal-height cards */
.elementor-section .elementor-column[data-empresa-card],
.elementor-section .elementor-inner-column {
    display: flex;
    flex-direction: column;
}
/* Target empresa cards: 5 inner columns in a single inner section */
.elementor-section > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-section.elementor-inner-section .elementor-column {
    display: flex;
    flex-direction: column;
}
.elementor-section .elementor-inner-section .elementor-column .elementor-widget-wrap {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 24px;
    transition: transform .25s, box-shadow .25s;
}
.elementor-section .elementor-inner-section .elementor-column .elementor-widget-wrap:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.elementor-section .elementor-inner-section .elementor-widget-image img {
    max-height: 80px;
    width: auto !important;
    object-fit: contain;
    margin: 0 auto;
}
.elementor-section .elementor-inner-section .elementor-widget-button {
    margin-top: auto;
}
.elementor-section .elementor-inner-section .elementor-widget-heading h3 {
    text-align: center;
    min-height: 32px;
}
.elementor-section .elementor-inner-section .elementor-widget-text-editor p {
    text-align: center;
    min-height: 90px;
    color: #666;
    font-size: 14px;
}
