/*
Theme Name: FORJA E INGENIERÍA SAN ISIDRO
Description: Web corporativa para el taller y la oficina técnica de San Isidro.
Version: 2.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: san-isidro
*/

@font-face {
    font-family: Barlow;
    src: url("assets/barlow-latin-700-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: Inter;
    src: url("assets/inter-latin-wght-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --ink: #111f31;
    --deep: #0c1829;
    --steel: #46586b;
    --line: #d6dfe7;
    --paper: #f5f7f9;
    --accent: #a7e2fb;
    --blue: #165879;
    --white: #fff;
    --pad: clamp(1.25rem, 5vw, 4.75rem);
    --body: Inter, "Segoe UI", system-ui, sans-serif;
    --heading: "Barlow", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--body); }
img { display: block; height: auto; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #168fbd; outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - var(--pad) * 2, 75rem); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.skip, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { z-index: 10; top: .5rem; left: .5rem; clip-path: none; width: auto; height: auto; padding: .5rem; background: white; }

h1, h2, h3 { font-family: var(--heading); line-height: 1.07; letter-spacing: -.038em; margin: 0 0 .8rem; }
h1 { font-size: clamp(2.85rem, 7.1vw, 6.35rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4.4vw, 3.65rem); }
h3 { font-size: clamp(1.35rem, 2.3vw, 1.9rem); }
p { margin: 0 0 1em; }
.eyebrow { margin-bottom: .85rem; color: var(--blue); font-size: .77rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.text-link { color: var(--blue); font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.intro { font-size: clamp(1.13rem, 2vw, 1.45rem); color: var(--steel); }

.site-header { background: var(--deep); color: var(--white); border-bottom: 1px solid #ffffff29; }
.header-inner { min-height: 5.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; color: white; text-decoration: none; font-size: .72rem; font-weight: 700; line-height: 1.25; text-transform: uppercase; letter-spacing: .09em; }
.brand strong { display: block; font-size: 1.2rem; letter-spacing: .025em; }
.site-nav ul { display: flex; gap: clamp(.65rem, 2.6vw, 2.1rem); align-items: center; list-style: none; padding: 0; margin: 0; }
.site-nav a { padding: .5rem 0; color: #dbe7f0; font-size: .88rem; font-weight: 650; text-decoration: none; }
.site-nav a:hover, .site-nav [aria-current="page"] { color: var(--accent); text-decoration: underline; }
.nav-toggle { color: white; font: inherit; background: transparent; border: 1px solid #ffffff5c; padding: .35rem .7rem; cursor: pointer; }

.hero { position: relative; isolation: isolate; display: grid; align-items: center; overflow: hidden; min-height: clamp(32rem, 69vh, 44rem); background: #12253b; color: white; }
.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-image { object-fit: cover; object-position: 50% 46%; }
.hero::after { content: ""; background: linear-gradient(90deg, #091525f5 2%, #0a182bdc 35%, #0a192b60 77%), linear-gradient(0deg, #0b1729a6, transparent 60%); }
.hero-inner { padding-block: 4rem; }
.hero .eyebrow, .about .eyebrow, .inner-hero .eyebrow { color: var(--accent); }
.hero h1 { margin-bottom: 1.35rem; }
.hero-copy { max-width: 35rem; font-size: clamp(1.06rem, 1.6vw, 1.27rem); color: #e1eaf1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.85rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; padding: .76rem 1.12rem; background: var(--accent); color: #0b2736; font-size: .9rem; font-weight: 750; border: 1px solid transparent; text-decoration: none; min-height: 2.85rem; }
.button:hover { background: #d7f4ff; }
.button-outline { color: white; background: #0a172a4a; border-color: #ffffff80; }
.button-outline:hover { color: #0b2736; }

.services, .post-grid, .contact-grid { display: grid; gap: 1rem; }
.services { grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 1.7rem; }
.service, .post-card, .contact-grid section { background: white; border: 1px solid var(--line); min-width: 0; }
.service { padding: clamp(1.25rem, 3vw, 2.2rem); border-top: 3px solid var(--blue); display: flex; flex-direction: column; align-items: flex-start; }
.service p { color: var(--steel); }
.service a { margin-top: auto; color: var(--blue); font-weight: 700; }
.about { background: var(--deep); color: white; display: grid; grid-template-columns: 1fr 1fr; }
.about-photo { min-height: 21rem; position: relative; }
.work-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-copy { max-width: 39rem; align-self: center; padding: clamp(2rem, 6vw, 5.2rem) var(--pad); }
.about-copy p:not(.eyebrow) { color: #dbe7f0; }
.about-copy a { color: var(--accent); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .65rem 2rem; }
.section-head h2 { margin: 0; }
.listing + .listing { border-top: 1px solid var(--line); }
.listing .post-grid { margin-top: 1.5rem; }
.post-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card-image { display: block; }
.card-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-body { padding: 1.35rem; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; }
.card-body p { color: var(--steel); margin-bottom: 0; }
time { display: block; font-size: .85rem; color: var(--steel); margin-bottom: .5rem; }
.pagination { margin-top: 2rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.contact-banner { background: #e2edf4; }
.inner-hero { background: var(--deep); color: white; padding-block: clamp(3rem, 9vw, 6.5rem); }
.inner-hero h1 { margin-bottom: 0; overflow-wrap: anywhere; }
.prose { overflow-wrap: anywhere; }
.prose > :not(.alignwide):not(.alignfull):not(.contact-grid) { max-width: 48rem; }
.prose h2 { margin-top: 1.7em; font-size: clamp(1.65rem, 3.5vw, 2.6rem); }
.prose .featured { margin-bottom: 2rem; }
.prose iframe { max-width: 100%; }
.contact-grid { grid-template-columns: .8fr 1.5fr 1fr; margin-top: 2rem; }
.contact-grid section { padding: clamp(1rem, 2.5vw, 1.8rem); }
.contact-grid h2 { margin: 0 0 .7rem; font-size: 1.5rem; }
.contact-grid p, .contact-grid address { margin-bottom: .65rem; }
.contact-grid a { display: block; color: var(--blue); margin-block: .25rem; }
.contact-grid address { font-style: normal; }
.site-footer { background: var(--deep); color: #dce7ef; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; padding-block: 2rem; overflow-wrap: anywhere; }

@media (max-width: 760px) {
    .header-inner { min-height: 4.55rem; flex-wrap: wrap; gap: .75rem; padding-block: .75rem; }
    .site-nav { width: 100%; }
    .site-nav ul { align-items: stretch; flex-direction: column; gap: 0; padding-bottom: .45rem; }
    .site-nav a { display: block; padding-block: .6rem; }
    .hero { min-height: 30rem; }
    .hero::after { background: linear-gradient(90deg, #091525f2, #09152599); }
    .hero h1 br { display: none; }
    .about { grid-template-columns: 1fr; }
    .about-photo { min-height: 0; aspect-ratio: 16/10; }
    .contact-grid, .post-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .services { grid-template-columns: 1fr; }
}

.brand-at {
    width: clamp(3.1rem, 7vw, 4.6rem);
    height: auto;
    padding: .25rem .35rem;
    background: white;
    border-radius: .2rem;
}
.brand span { white-space: nowrap; }
.icon-link { display: inline-flex; align-items: center; gap: .55rem; }
.icon-link svg, .button svg { flex: 0 0 auto; }
.service ul { margin: 0 0 1.45rem; padding-inline-start: 1.2rem; color: var(--steel); }
.service li + li { margin-top: .35rem; }
.service-actions { display: flex; flex-wrap: wrap; gap: .55rem 1.35rem; margin-top: auto; }
.service-actions a { margin: 0; }
.section-summary { color: var(--steel); margin: .65rem 0 0; max-width: 47rem; }
.carousel { margin-top: 1.25rem; }
.carousel-controls { display: flex; justify-content: flex-end; gap: .55rem; margin: 0 0 .75rem; }
.carousel-controls button {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
    cursor: pointer;
    font: 1.3rem/1 var(--body);
}
.carousel-controls button:hover { border-color: var(--blue); }
.carousel-controls [aria-disabled="true"] { opacity: .45; cursor: default; }
.carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(42%, 28rem);
    gap: 1rem;
    overflow-x: auto;
    padding: 0 0 .75rem;
    scroll-snap-type: x mandatory;
}
.carousel-track .post-card { scroll-snap-align: start; }
.editorial-grid { margin-top: 1.3rem; }
.contact-banner p { margin: .6rem 0 0; color: var(--steel); }
.contact-grid { margin-bottom: 2.25rem; }
.contact-grid section, #formulario { scroll-margin-top: 1.5rem; }
.contact-grid section:target { outline: 2px solid var(--blue); outline-offset: 2px; }
.contact-grid .icon-link { display: flex; }
.prose > .contact-form-panel { max-width: 53rem; }
.contact-form-panel { background: white; border: 1px solid var(--line); padding: clamp(1.15rem, 4vw, 2.4rem); }
.contact-form-panel h2 { margin-top: 0; }
.contact-form-panel > p { color: var(--steel); }
.contact-form { position: relative; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.contact-form label { display: block; font-weight: 650; }
.contact-form input, .contact-form textarea, .contact-form select {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: .35rem;
    border: 1px solid #aabaca;
    border-radius: .15rem;
    background: var(--paper);
    color: var(--ink);
    padding: .65rem;
    font: inherit;
    font-weight: 400;
}
.contact-form textarea { resize: vertical; }
.contact-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: .8rem 0 1rem; font-size: .88rem; color: var(--steel); }
.contact-form-panel .form-status { padding: .7rem 1rem; background: #e4f4eb; color: #17563c; }
.contact-form-panel .form-status.error { background: #ffede9; color: #87382f; }

.footer-inner { padding-block: 2.65rem; }
.footer-identity, .footer-contacts { display: grid; align-content: start; gap: .6rem; }
.footer-identity strong { letter-spacing: .055em; }
.footer-identity small { display: block; color: var(--accent); }
.footer-contacts a { align-items: flex-start; }
.footer-contacts svg { margin-top: .19rem; color: var(--accent); }
.footer-identity svg { color: var(--accent); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .45rem 1.5rem;
    border-top: 1px solid #ffffff35;
    padding-block: 1rem;
    font-size: .84rem;
}
.footer-bottom p { margin: 0; }

@media (max-width: 760px) {
    .carousel-track { grid-auto-columns: min(79%, 25rem); }
}
@media (max-width: 520px) {
    .form-row { grid-template-columns: 1fr; }
    .brand { gap: .5rem; }
}
