/*
Theme Name: Autana Elementor
Theme URI: https://autana.app
Author: Autana
Author URI: https://autana.app
Description: Theme ligero para Autana, preparado para Elementor y contenedores amplios.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: autana-elementor
Tags: custom-logo, wide-blocks, responsive-layout
*/

:root {
    --autana-bg: #f4f6f8;
    --autana-surface: #ffffff;
    --autana-surface-soft: #eef7f5;
    --autana-ink: #17211f;
    --autana-muted: #65736f;
    --autana-line: #d9e2df;
    --autana-primary: #0f766e;
    --autana-primary-dark: #115e59;
    --autana-accent: #d97706;
    --autana-danger: #c2410c;
    --autana-success: #15803d;
    --autana-gutter: 24px;
    --autana-content-max: 1280px;
    --autana-wide-max: 1500px;
    --autana-container: min(calc(100% - (var(--autana-gutter) * 2)), var(--autana-content-max));
    --autana-wide: min(calc(100% - (var(--autana-gutter) * 2)), var(--autana-wide-max));
    --autana-shadow: 0 18px 40px rgba(23, 33, 31, 0.08);
    --autana-radius: 8px;
    --content-width: var(--autana-wide-max);
}

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--autana-bg);
    color: var(--autana-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
}

body.admin-bar .site-header.is-sticky {
    top: 32px;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--autana-line);
    border-radius: var(--autana-radius);
    padding: 11px 12px;
    background: #fff;
    color: var(--autana-ink);
}

label {
    display: grid;
    gap: 7px;
    color: var(--autana-muted);
    font-size: 0.9rem;
    font-weight: 650;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--autana-line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--autana-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 10px;
    z-index: 100000;
    padding: 10px 14px;
    border-radius: var(--autana-radius);
    background: var(--autana-ink);
    color: #fff;
}

.skip-link:focus {
    left: 10px;
}

.autana-container,
.site-header-inner,
.site-footer-inner,
.entry-shell,
.posts-shell,
.archive-shell {
    width: var(--autana-container);
    margin-inline: auto;
}

.autana-wide,
.site-header-inner,
.elementor-page .site-main,
.page-template-template-full-width .site-main {
    width: var(--autana-wide);
    margin-inline: auto;
}

.site {
    min-height: 100vh;
}

.site-content {
    min-height: 62vh;
}

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(217, 226, 223, 0.88);
    background: rgba(244, 246, 248, 0.92);
    backdrop-filter: blur(14px);
}

.site-header.is-sticky {
    position: sticky;
    top: 0;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
    padding-block: 14px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.site-branding img {
    width: auto;
    max-width: min(250px, 56vw);
    max-height: 62px;
    object-fit: contain;
}

.site-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 850;
    line-height: 1;
}

.site-title a {
    text-decoration: none;
}

.site-description {
    margin: 4px 0 0;
    color: var(--autana-muted);
    font-size: 0.88rem;
    font-weight: 650;
}

.site-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--autana-line);
    border-radius: var(--autana-radius);
    background: #fff;
    color: var(--autana-ink);
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.menu-toggle-lines {
    position: relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
    position: absolute;
    left: 0;
}

.menu-toggle-lines::before {
    top: -6px;
}

.menu-toggle-lines::after {
    top: 6px;
}

.primary-menu,
.footer-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-menu a,
.footer-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    border-radius: var(--autana-radius);
    padding: 9px 11px;
    color: var(--autana-muted);
    font-weight: 750;
    text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.footer-menu a:hover {
    background: var(--autana-surface-soft);
    color: var(--autana-primary-dark);
}

.site-main {
    width: 100%;
    padding-block: 46px;
}

.entry-shell,
.posts-shell,
.archive-shell {
    display: grid;
    gap: 26px;
}

.entry-header,
.archive-header {
    display: grid;
    gap: 10px;
    max-width: 920px;
}

.entry-title,
.archive-title,
.error-title {
    margin: 0;
    color: var(--autana-ink);
    font-size: clamp(2.15rem, 5vw, 4.6rem);
    line-height: 1.03;
}

.entry-meta,
.entry-footer,
.archive-description,
.post-card-meta {
    color: var(--autana-muted);
    font-size: 0.92rem;
    font-weight: 650;
}

.entry-content {
    max-width: 980px;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

.entry-content p,
.entry-content li {
    line-height: 1.72;
}

.entry-content a {
    color: var(--autana-primary-dark);
    font-weight: 700;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    line-height: 1.12;
}

.entry-content .alignwide,
.alignwide {
    width: min(calc(100vw - (var(--autana-gutter) * 2)), var(--autana-wide-max));
    max-width: var(--autana-wide-max);
    margin-left: 50%;
    margin-right: 0;
    transform: translateX(-50%);
}

.entry-content .alignfull,
.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.post-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.post-card {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 100%;
    border: 1px solid var(--autana-line);
    border-radius: var(--autana-radius);
    background: var(--autana-surface);
    overflow: hidden;
    box-shadow: var(--autana-shadow);
}

.post-card-media {
    aspect-ratio: 16 / 9;
    background: var(--autana-surface-soft);
    overflow: hidden;
}

.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-body {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.post-card-title {
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.2;
}

.post-card-title a {
    text-decoration: none;
}

.post-card-excerpt {
    margin: 0;
    color: var(--autana-muted);
    line-height: 1.62;
}

.read-more,
.button,
.wp-block-button__link,
.search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    width: fit-content;
    border: 1px solid transparent;
    border-radius: var(--autana-radius);
    padding: 10px 14px;
    background: var(--autana-primary);
    color: #fff;
    font-weight: 850;
    line-height: 1.1;
    text-decoration: none;
}

.read-more:hover,
.button:hover,
.wp-block-button__link:hover,
.search-submit:hover {
    background: var(--autana-primary-dark);
    color: #fff;
}

.search-form {
    display: flex;
    align-items: stretch;
    gap: 10px;
    max-width: 620px;
}

.search-field {
    min-width: 0;
}

.nav-links,
.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.nav-links a {
    color: var(--autana-primary-dark);
    font-weight: 800;
    text-decoration: none;
}

.comments-area {
    width: var(--autana-container);
    max-width: 980px;
    margin: 34px auto 0;
}

.site-footer {
    border-top: 1px solid var(--autana-line);
    background: #142421;
    color: #f8faf9;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 26px;
}

.site-footer a {
    color: inherit;
}

.site-footer .footer-menu a {
    color: #b8c9c4;
}

.site-footer .footer-menu a:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.site-footer-copy {
    margin: 0;
    color: #b8c9c4;
    font-size: 0.92rem;
    font-weight: 650;
}

.page-template-template-full-width .entry-shell,
.page-template-template-full-width .entry-content,
.elementor-page .entry-shell,
.elementor-page .entry-content {
    width: 100%;
    max-width: none;
}

.page-template-template-full-width .site-main,
.elementor-page .site-main {
    padding-block: 0;
}

.elementor {
    --content-width: var(--autana-wide-max);
}

.elementor-section.elementor-section-boxed > .elementor-container,
.elementor .e-con-boxed > .e-con-inner {
    max-width: var(--autana-wide-max);
}

.elementor-section.elementor-section-boxed > .elementor-container {
    width: var(--autana-wide);
}

.elementor .e-con-boxed > .e-con-inner {
    width: min(100%, var(--autana-wide-max));
}

.elementor .autana-container,
.elementor .autana-wide {
    width: 100%;
}

.autana-clean-template {
    background: var(--autana-bg);
}

.autana-clean-template .site-main {
    width: 100%;
    padding: 0;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    width: auto;
    height: auto;
    clip: auto;
    z-index: 100000;
    display: block;
    padding: 15px 23px 14px;
    background-color: #f1f1f1;
    color: #21759b;
    font-size: 1em;
    font-weight: 700;
    line-height: normal;
    text-decoration: none;
}

@media (max-width: 782px) {
    body.admin-bar .site-header.is-sticky {
        top: 46px;
    }
}

@media (max-width: 920px) {
    :root {
        --autana-gutter: 18px;
    }

    .site-header-inner,
    .site-footer-inner {
        align-items: stretch;
    }

    .site-header-inner {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .site-navigation {
        width: 100%;
    }

    .primary-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 10px;
    }

    .primary-menu.is-open {
        display: flex;
    }

    .primary-menu a {
        width: 100%;
    }

    .site-footer-inner,
    .footer-menu {
        flex-direction: column;
        align-items: flex-start;
    }

    .entry-title,
    .archive-title,
    .error-title {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .search-form,
    .nav-links {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    :root {
        --autana-gutter: 16px;
    }

    .site-header-inner {
        min-height: 70px;
        gap: 12px;
    }

    .site-branding img {
        max-height: 52px;
    }

    .site-main {
        padding-block: 32px;
    }

    .post-card-grid {
        grid-template-columns: 1fr;
    }
}
