/*
Theme Name:  Cerrajeria Pro
Theme URI:   https://example.com
Description: Tema landing page profesional para cerrajería — corporativo, limpio, 100% administrable desde el Customizer.
Version:     1.0.0
Author:      Tu Nombre
Author URI:  https://example.com
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cerrajeria-pro
Tags:        custom-logo, full-width-template, one-column
*/

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-bg:       #0d1117;
    --color-bg-alt:   #161b22;
    --color-surface:  #21262d;
    --color-border:   rgba(255,255,255,0.08);
    --color-text:     #e6edf3;
    --color-muted:    #7d8590;
    --color-white:    #ffffff;
    --color-accent:   #e6a817;
    --color-accent-h: #f5bc30;
    --color-accent-d: #c48f0f;
    --font-heading:   'Oswald', sans-serif;
    --font-body:      'Inter', sans-serif;
    --radius:         6px;
    --radius-lg:      10px;
    --transition:     0.25s ease;
    --section-pad:    5.5rem 2rem;
    --shadow:         0 4px 24px rgba(0,0,0,0.35);
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* =========================================================
   UTILITIES
   ========================================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 3rem);
    color: var(--color-white);
    margin-bottom: 0.35em;
    text-align: center;
}

.section-title span { color: var(--color-accent); }

.section-subtitle {
    text-align: center;
    color: var(--color-muted);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.78em 2em;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    background: transparent;
}
.btn:hover, .btn:focus {
    background: var(--color-accent);
    color: var(--color-bg);
    outline: none;
}
.btn--filled {
    background: var(--color-accent);
    color: var(--color-bg);
    font-weight: 600;
}
.btn--filled:hover {
    background: var(--color-accent-h);
    border-color: var(--color-accent-h);
    color: var(--color-bg);
}

/* =========================================================
   SKIP LINK
   ========================================================= */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 1rem;
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 0.5rem 1rem;
    font-weight: 700;
    z-index: 9999;
    border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 72px;
    padding: 0.6rem 0;
}

/* Logo */
.site-logo a { display: flex; align-items: center; gap: 0.6rem; }
.site-logo img { height: 46px; width: auto; }
.site-logo .site-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-white);
    letter-spacing: 0.05em;
}

/* Nav Social */
.header-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.header-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-muted);
    transition: color var(--transition), border-color var(--transition);
}
.header-social a:hover { color: var(--color-accent); border-color: var(--color-accent); }
.header-social svg { width: 15px; height: 15px; fill: currentColor; }

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

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.menu-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--color-text);
    transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.header-mobile-menu {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}
.header-mobile-menu.is-open { display: flex; }
.header-mobile-social { display: flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center; }
.header-mobile-social a {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-muted);
    transition: color var(--transition), border-color var(--transition);
}
.header-mobile-social a:hover { color: var(--color-accent); border-color: var(--color-accent); }
.header-mobile-social svg { width: 17px; height: 17px; fill: currentColor; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0a0e14;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.60);
    z-index: 1;
}

/* Línea de acento decorativa */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: var(--color-accent);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 860px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(230, 168, 23, 0.15);
    border: 1px solid rgba(230, 168, 23, 0.4);
    color: var(--color-accent);
    font-size: 0.78rem;
    font-family: var(--font-heading);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35em 1em;
    border-radius: 2px;
    margin-bottom: 1.2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    color: var(--color-white);
    margin-bottom: 0.3em;
    text-shadow: 0 2px 24px rgba(0,0,0,0.5);
    line-height: 1.05;
}

.hero-title span { color: var(--color-accent); }

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(230, 237, 243, 0.75);
    margin-bottom: 2.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================================
   SERVICIOS
   ========================================================= */
.servicios-section {
    padding: var(--section-pad);
    background: var(--color-bg-alt);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.servicio-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.servicio-card:hover {
    transform: translateY(-4px);
    border-color: rgba(230, 168, 23, 0.35);
    box-shadow: var(--shadow);
}

.servicio-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-bg);
}

.servicio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.servicio-card:hover .servicio-img img { transform: scale(1.05); }

.servicio-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
}

.servicio-img-placeholder svg {
    width: 48px;
    height: 48px;
    fill: var(--color-muted);
    opacity: 0.4;
}

.servicio-body {
    padding: 1.4rem 1.5rem 1.6rem;
}

.servicio-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.servicio-desc {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.65;
}

/* Acento inferior en la card */
.servicio-card::after {
    content: '';
    display: block;
    height: 3px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.servicio-card:hover::after { transform: scaleX(1); }

/* Empty state */
.servicios-empty {
    text-align: center;
    padding: 3rem;
    color: var(--color-muted);
    font-size: 1rem;
    grid-column: 1 / -1;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: #080c11;
    padding: 4.5rem 2rem 2rem;
    border-top: 3px solid var(--color-accent);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    margin-bottom: 3rem;
}

.footer-brand .site-logo { margin-bottom: 1rem; }

.footer-tagline {
    font-size: 0.88rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
    line-height: 1.6;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 0.55rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}
.footer-social a {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-muted);
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.footer-social a:hover {
    color: var(--color-bg);
    background: var(--color-accent);
    border-color: var(--color-accent);
}
.footer-social svg { width: 15px; height: 15px; fill: currentColor; }

/* Info del estudio */
.footer-info {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-info-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}

.footer-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--color-muted);
    line-height: 1.55;
}

.footer-info-row svg {
    width: 15px; height: 15px;
    fill: var(--color-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-info-row a {
    color: var(--color-muted);
    transition: color var(--transition);
}
.footer-info-row a:hover { color: var(--color-accent); }
.footer-info-hours span { white-space: pre-line; }

/* Formulario */
.footer-contact h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-white);
    margin-bottom: 1.3rem;
    letter-spacing: 0.03em;
}

.contact-form { display: flex; flex-direction: column; gap: 0.85rem; }

.contact-form input,
.contact-form textarea {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 0.78rem 1rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    border-radius: var(--radius);
    transition: border-color var(--transition);
    width: 100%;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}
.contact-form textarea { resize: vertical; min-height: 110px; }

.form-message {
    font-size: 0.88rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius);
    display: none;
}
.form-message.success { background: rgba(230,168,23,0.12); color: var(--color-accent); display: block; }
.form-message.error   { background: rgba(220,53,69,0.12);  color: #e05260; display: block; }

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* =========================================================
   WHATSAPP BUBBLE
   ========================================================= */
.wa-bubble {
    position: fixed;
    bottom: 2rem; right: 2rem;
    z-index: 999;
    width: 58px; height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    animation: wa-pulse 2.8s ease-in-out infinite;
    transition: transform var(--transition);
}
.wa-bubble:hover { transform: scale(1.12); animation-play-state: paused; }
.wa-bubble svg { width: 30px; height: 30px; fill: #fff; }

@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50%       { box-shadow: 0 4px 32px rgba(37,211,102,0.7), 0 0 0 12px rgba(37,211,102,0.07); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .servicios-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --section-pad: 4rem 1.2rem; }
    .header-social, .header-cta { display: none; }
    .menu-toggle { display: flex; }
    .servicios-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero { background-attachment: scroll; }
}

@media (max-width: 480px) {
    .servicios-grid { grid-template-columns: 1fr; }
    .hero-ctas { flex-direction: column; align-items: center; }
}

/* =========================================================
   PAGE OFFSET (header fijo)
   ========================================================= */
.page-offset { padding-top: 72px; }

/* =========================================================
   PÁGINA ESTÁTICA
   ========================================================= */
.entry-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 5rem 1.5rem 4rem;
    line-height: 1.8;
}
.entry-content h1, .entry-content h2 { margin: 1.6em 0 0.5em; }
.entry-content p  { margin-bottom: 1.2em; }
.entry-content a  { color: var(--color-accent); text-decoration: underline; }
