/* ==========================================================
   CAPSERVI INDUSTRIAL THEME — Main Stylesheet
   Version: 1.0.0
   ========================================================== */

/* ----------------------------------------------------------
   1. VARIABLES CSS
   ---------------------------------------------------------- */
:root {
    --primary:        #0D1B2A;
    --primary-light:  #1A3A5C;
    --accent:         #F5820A;
    --accent-hover:   #D4700A;
    --gray-dark:      #2C3E50;
    --gray-mid:       #6C7A89;
    --gray-light:     #BDC3C7;
    --bg-light:       #F4F6F8;
    --white:          #FFFFFF;
    --black:          #000000;
    --success:        #27AE60;
    --error:          #E74C3C;
    --warning:        #F39C12;

    --font-heading:   'Barlow Condensed', sans-serif;
    --font-body:      'Inter', sans-serif;
    --font-size-base: 16px;
    --line-height:    1.65;

    --shadow-sm:      0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-md:      0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-lg:      0 16px 48px rgba(0, 0, 0, 0.20);

    --radius:         6px;
    --radius-lg:      12px;
    --transition:     all 0.3s ease;

    --container:      1200px;
    --header-h:       72px;
    --topbar-h:       40px;
    --z-header:       1000;
    --z-mobile:       1100;
    --z-overlay:      1050;
}

/* ----------------------------------------------------------
   2. RESET Y BASE
   ---------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

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

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

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ----------------------------------------------------------
   3. TIPOGRAFÍA
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }
h4 { font-size: clamp(1rem, 2vw, 1.3rem); }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray-mid);
}

p:last-child {
    margin-bottom: 0;
}

strong { font-weight: 700; }
em     { font-style: italic; }

/* ----------------------------------------------------------
   4. UTILIDADES
   ---------------------------------------------------------- */
.container {
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.section {
    padding: 80px 0;
}

.section--light { background-color: var(--bg-light); }
.section--dark  { background-color: var(--primary); }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-white  { color: var(--white) !important; }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--gray-mid); }

.opacity-80  { opacity: 0.8; }
.opacity-70  { opacity: 0.7; }

/* Accesibilidad: skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 8px;
    background: var(--accent);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius);
    z-index: 9999;
    font-weight: 700;
}
.skip-link:focus {
    top: 8px;
}

/* Screen reader */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ----------------------------------------------------------
   5. BOTONES
   ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-decoration: none;
}

.btn--lg {
    padding: 16px 36px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 130, 10, 0.35);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.6);
}
.btn-outline-white:hover,
.btn-outline-white:focus {
    background-color: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--white);
    border-color: #25D366;
}
.btn-whatsapp:hover,
.btn-whatsapp:focus {
    background-color: #1ebe5d;
    border-color: #1ebe5d;
    color: var(--white);
    transform: translateY(-2px);
}

/* ----------------------------------------------------------
   6. CABECERA — TOPBAR
   ---------------------------------------------------------- */
.topbar {
    background-color: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    min-height: var(--topbar-h);
}

.topbar__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.topbar__item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--gray-light);
    transition: var(--transition);
}

.topbar__item:hover {
    color: var(--white);
}

.topbar__item i {
    color: var(--accent);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.topbar__item--schedule {
    margin-left: auto;
}

/* ----------------------------------------------------------
   7. CABECERA — HEADER / NAVEGACIÓN
   ---------------------------------------------------------- */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    transition: box-shadow 0.3s ease;
}

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

.nav {
    display: flex;
    align-items: center;
    height: var(--header-h);
    gap: 24px;
}

/* Logo */
.nav__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.nav__logo-mark {
    width: 44px;
    height: 44px;
    background-color: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.nav__logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav__logo-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.nav__logo-tagline {
    font-size: 0.68rem;
    color: var(--gray-mid);
    letter-spacing: 0.03em;
}

/* Logo imagen personalizada */
.custom-logo-link img {
    height: 50px;
    width: auto;
}

/* Menú principal */
.nav__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__item {
    position: relative;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
}

.nav__link:hover,
.nav__link--active {
    color: var(--accent);
    background-color: rgba(245, 130, 10, 0.06);
}

.nav__arrow {
    font-size: 0.6rem;
    transition: transform 0.25s ease;
}

.nav__item--has-dropdown:hover .nav__arrow {
    transform: rotate(180deg);
}

/* Dropdown */
.nav__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    list-style: none;
    border-top: 3px solid var(--accent);
    z-index: 10;
}

.nav__item--has-dropdown:hover .nav__dropdown,
.nav__item--has-dropdown:focus-within .nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__dropdown-item {
    list-style: none;
}

.nav__dropdown-link {
    display: block;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-dark);
    transition: var(--transition);
}

.nav__dropdown-link:hover,
.nav__dropdown-link.active {
    color: var(--accent);
    background-color: var(--bg-light);
    padding-left: 26px;
}

/* CTA del header */
.nav__cta {
    flex-shrink: 0;
    font-size: 0.85rem;
    padding: 10px 20px;
}

/* Hamburguesa */
.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav__burger:hover {
    background-color: var(--bg-light);
}

.nav__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav__burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav__burger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav__burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ----------------------------------------------------------
   8. MENÚ MÓVIL
   ---------------------------------------------------------- */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: var(--z-mobile);
    pointer-events: none;
}

.mobile-nav.is-open {
    pointer-events: auto;
}

.mobile-nav__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(13, 27, 42, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-nav.is-open .mobile-nav__overlay {
    opacity: 1;
}

.mobile-nav__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav.is-open .mobile-nav__panel {
    transform: translateX(0);
}

.mobile-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-light);
    flex-shrink: 0;
}

.mobile-nav__logo .nav__logo-mark {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
}

.mobile-nav__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--gray-dark);
    font-size: 1.1rem;
    transition: var(--transition);
}

.mobile-nav__close:hover {
    background-color: var(--bg-light);
    color: var(--accent);
}

.mobile-nav__list {
    flex: 1;
    padding: 12px 0;
}

.mobile-nav__list li a,
.mobile-nav__list > li > a {
    display: block;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.mobile-nav__list li a:hover {
    color: var(--accent);
    background-color: var(--bg-light);
    padding-left: 32px;
}

.mobile-nav__list .sub-menu {
    background-color: var(--bg-light);
    padding: 4px 0;
}

.mobile-nav__list .sub-menu a {
    padding-left: 40px;
    font-size: 0.875rem;
    font-weight: 500;
}

.mobile-nav__footer {
    padding: 20px;
    border-top: 1px solid var(--bg-light);
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   9. SECCIÓN HEADER (PAGE HERO)
   ---------------------------------------------------------- */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02) 0px,
        rgba(255, 255, 255, 0.02) 1px,
        transparent 1px,
        transparent 30px
    );
}

.page-hero__title {
    color: var(--white);
    margin-bottom: 0;
    position: relative;
}

.page-hero__desc {
    color: rgba(255, 255, 255, 0.75);
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 1.05rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    position: relative;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb i {
    font-size: 0.6rem;
    color: var(--accent);
}

.breadcrumb span {
    color: var(--white);
}

/* ----------------------------------------------------------
   10. HERO (PORTADA)
   ---------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #0a2440 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 27, 42, 0.3);
}

.hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding-top: 80px;
    padding-bottom: 40px;
}

.hero__eyebrow {
    display: inline-block;
    background-color: rgba(245, 130, 10, 0.15);
    color: var(--accent);
    border: 1px solid rgba(245, 130, 10, 0.3);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero__title {
    color: var(--white);
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    margin-bottom: 24px;
    max-width: 800px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
    color: rgba(255, 255, 255, 0.80);
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 640px;
    margin-bottom: 48px;
    line-height: 1.7;
}

.hero__cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Stats del hero */
.hero__stats {
    background-color: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px 0;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.hero__stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.hero__stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.hero__stat-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 6px;
    font-weight: 500;
}

/* ----------------------------------------------------------
   11. SECTION HEADER (títulos de sección)
   ---------------------------------------------------------- */
.section-header {
    margin-bottom: 60px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 12px;
}

.section-eyebrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
}

.text-left .section-eyebrow::after {
    left: 0;
    transform: none;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
}

/* ----------------------------------------------------------
   12. GRID DE SERVICIOS
   ---------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(245, 130, 10, 0.15);
}

.service-card__icon {
    width: 60px;
    height: 60px;
    background-color: rgba(245, 130, 10, 0.10);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .service-card__icon {
    background-color: var(--accent);
}

.service-card__icon i {
    font-size: 1.6rem;
    color: var(--accent);
    transition: var(--transition);
}

.service-card:hover .service-card__icon i {
    color: var(--white);
}

.service-card__title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.service-card__desc {
    font-size: 0.9rem;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
}

.service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    transition: var(--transition);
    margin-top: auto;
}

.service-card__link:hover {
    gap: 10px;
    color: var(--accent-hover);
}

/* ----------------------------------------------------------
   13. SECCIÓN POR QUÉ CAPSERVI
   ---------------------------------------------------------- */
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.why__content .section-eyebrow {
    color: var(--accent);
}

.why__list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.why__list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.why__list li i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 1rem;
}

.why__badges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.why__badge {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
}

.why__badge:hover {
    background-color: rgba(245, 130, 10, 0.10);
    border-color: rgba(245, 130, 10, 0.25);
    transform: translateY(-4px);
}

.why__badge i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}

.why__badge span {
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ----------------------------------------------------------
   14. PORTFOLIO
   ---------------------------------------------------------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.portfolio-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.portfolio-card__img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-card__img img {
    transform: scale(1.04);
}

.portfolio-card--placeholder {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.portfolio-card__icon-wrap {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-card__icon-wrap i {
    font-size: 3.5rem;
    color: var(--accent);
    opacity: 0.9;
}

.portfolio-card__body {
    padding: 24px;
}

.portfolio-card--placeholder .portfolio-card__body {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-card__title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.portfolio-card--placeholder .portfolio-card__title,
.portfolio-card--placeholder .portfolio-card__title a {
    color: var(--white);
}

.portfolio-card__title a {
    color: var(--primary);
    transition: var(--transition);
}

.portfolio-card__title a:hover {
    color: var(--accent);
}

.portfolio-card__excerpt {
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.portfolio-card--placeholder .portfolio-card__excerpt {
    color: rgba(255, 255, 255, 0.70);
}

.portfolio-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    transition: var(--transition);
}

.portfolio-card__link:hover {
    gap: 10px;
}

/* ----------------------------------------------------------
   15. SECCIÓN CTA
   ---------------------------------------------------------- */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 70% 50%, rgba(245, 130, 10, 0.08) 0%, transparent 60%);
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section .section-eyebrow {
    color: var(--accent);
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 16px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.75);
}

.cta-section__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
}

/* ----------------------------------------------------------
   16. BLOG — GRID DE POSTS
   ---------------------------------------------------------- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 48px;
}

.post-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.post-card__thumb {
    display: block;
    overflow: hidden;
    height: 200px;
}

.post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card__thumb img {
    transform: scale(1.04);
}

.post-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--gray-mid);
    margin-bottom: 12px;
}

.post-card__sep {
    color: var(--gray-light);
}

.post-card__meta time {
    font-weight: 500;
}

.post-card__meta a {
    color: var(--accent);
    font-weight: 600;
}

.post-card__title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-card__title a {
    color: var(--primary);
    transition: var(--transition);
}

.post-card__title a:hover {
    color: var(--accent);
}

.post-card__excerpt {
    font-size: 0.875rem;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
}

/* ----------------------------------------------------------
   17. PAGINACIÓN
   ---------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-dark);
    border: 1px solid var(--gray-light);
    transition: var(--transition);
}

.pagination .page-numbers:hover {
    background-color: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.pagination .page-numbers.current {
    background-color: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

/* ----------------------------------------------------------
   18. ENTRADA ÚNICA (SINGLE)
   ---------------------------------------------------------- */
.single-layout {
    max-width: 820px;
    margin: 0 auto;
}

.single-article__thumb {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
}

.single-article__thumb img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-dark);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.entry-content p {
    color: var(--gray-dark);
    margin-bottom: 1.25em;
}

.entry-content a {
    color: var(--accent);
    text-decoration: underline;
}

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

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-bottom: 0.5em;
    color: var(--gray-dark);
}

.entry-content blockquote {
    border-left: 4px solid var(--accent);
    margin: 2em 0;
    padding: 16px 24px;
    background-color: var(--bg-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--gray-mid);
}

.entry-content img {
    border-radius: var(--radius);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--gray-light);
    padding: 10px 14px;
    text-align: left;
}

.entry-content th {
    background-color: var(--primary);
    color: var(--white);
    font-family: var(--font-heading);
}

.entry-content tr:nth-child(even) td {
    background-color: var(--bg-light);
}

/* Footer del artículo */
.single-article__footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--bg-light);
}

.single-article__tags {
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--gray-mid);
}

.single-article__tags i {
    color: var(--accent);
    margin-right: 6px;
}

.single-article__tags a {
    color: var(--accent);
    transition: var(--transition);
}

.single-article__tags a:hover {
    text-decoration: underline;
}

.single-article__nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.single-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-dark);
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-light);
    transition: var(--transition);
    max-width: 45%;
}

.single-nav-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.single-nav-link--next {
    margin-left: auto;
}

/* ----------------------------------------------------------
   19. POST META (fecha, categoría)
   ---------------------------------------------------------- */
.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.post-meta i {
    color: var(--accent);
    margin-right: 4px;
}

.post-meta a {
    color: rgba(255, 255, 255, 0.65);
    transition: var(--transition);
}

.post-meta a:hover {
    color: var(--accent);
}

.post-meta__sep {
    opacity: 0.4;
}

/* ----------------------------------------------------------
   20. PÁGINA DE CONTENIDO
   ---------------------------------------------------------- */
.page-content {
    max-width: 900px;
    margin: 0 auto;
}

/* ----------------------------------------------------------
   21. 404
   ---------------------------------------------------------- */
.error-404__code {
    font-family: var(--font-heading);
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.15;
}

.error-404__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: 16px;
}

.error-404__desc {
    max-width: 520px;
    margin: 0 auto 36px;
    font-size: 1.05rem;
}

.error-404__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------
   22. BÚSQUEDA
   ---------------------------------------------------------- */
.search-count {
    color: var(--gray-mid);
    margin-bottom: 36px;
    font-size: 0.9rem;
}

.search-form {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin: 20px auto 0;
}

.search-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-field:focus {
    border-color: var(--accent);
}

.search-submit {
    padding: 12px 20px;
    background-color: var(--accent);
    color: var(--white);
    border: 2px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-submit:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* ----------------------------------------------------------
   23. FOOTER
   ---------------------------------------------------------- */
.footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 64px 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    text-decoration: none;
}

.footer__logo .nav__logo-name {
    color: var(--white);
}

.footer__logo .nav__logo-tagline {
    color: rgba(255, 255, 255, 0.55);
}

.footer__desc {
    color: rgba(255, 255, 255, 0.60);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer__whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #25D366;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.footer__whatsapp:hover {
    color: #1ebe5d;
    gap: 12px;
}

.footer__whatsapp i {
    font-size: 1.1rem;
}

.footer__heading {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer__heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Menú del footer */
.footer__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__links li a {
    color: rgba(255, 255, 255, 0.60);
    font-size: 0.875rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer__links li a::before {
    content: '›';
    color: var(--accent);
    font-size: 1rem;
    line-height: 1;
}

.footer__links li a:hover {
    color: var(--white);
    padding-left: 4px;
}

/* Contacto del footer */
.footer__contact {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
}

.footer__contact li i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.footer__contact li a {
    color: rgba(255, 255, 255, 0.65);
    transition: var(--transition);
}

.footer__contact li a:hover {
    color: var(--accent);
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.footer__copy,
.footer__credit {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.40);
}

/* ----------------------------------------------------------
   24. WIDGET AREA
   ---------------------------------------------------------- */
.widget {
    margin-bottom: 32px;
}

.widget__title {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

/* ----------------------------------------------------------
   25. FORMULARIO DE CONTACTO
   ---------------------------------------------------------- */
.contact-form {
    max-width: 640px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--gray-dark);
    background-color: var(--white);
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 130, 10, 0.10);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-group .required {
    color: var(--error);
}

.form-status {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 16px;
    display: none;
}

.form-status--success {
    background-color: rgba(39, 174, 96, 0.10);
    color: var(--success);
    border: 1px solid rgba(39, 174, 96, 0.25);
}

.form-status--error {
    background-color: rgba(231, 76, 60, 0.10);
    color: var(--error);
    border: 1px solid rgba(231, 76, 60, 0.25);
}

/* ----------------------------------------------------------
   26. COMMENTS
   ---------------------------------------------------------- */
.comments-area {
    max-width: 820px;
    margin: 48px auto 0;
    padding-top: 48px;
    border-top: 1px solid var(--bg-light);
}

.comments-title {
    font-size: 1.4rem;
    margin-bottom: 32px;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    background-color: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.comment-author cite {
    font-family: var(--font-heading);
    font-weight: 700;
    font-style: normal;
    color: var(--primary);
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--gray-mid);
    margin-bottom: 12px;
}

.comment-content p {
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: 0.9rem;
    outline: none;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--accent);
}

/* ----------------------------------------------------------
   27. NO RESULTS
   ---------------------------------------------------------- */
.no-results {
    padding: 60px 24px;
}

/* ----------------------------------------------------------
   28. PAGE LINKS (paginación de página)
   ---------------------------------------------------------- */
.page-links {
    margin-top: 32px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-links span,
.page-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--gray-light);
    transition: var(--transition);
}

.page-links a:hover {
    background-color: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

/* ----------------------------------------------------------
   29. ELEMENTOR — ajustes de integración
   ---------------------------------------------------------- */
.elementor-page .page-hero {
    /* Si Elementor maneja el hero, ocultar el nativo */
}

/* Anular margen de elementor en páginas canvas */
body.elementor-page .site-main {
    padding: 0;
}

/* Asegurar que el contenido de Elementor ocupe el ancho completo */
.entry-content .elementor {
    width: 100%;
}

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

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero__stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-h: 60px;
    }

    .topbar__item--schedule {
        display: none;
    }

    .nav__menu {
        display: none;
    }

    .nav__cta {
        display: none;
    }

    .nav__burger {
        display: flex;
    }

    .hero {
        min-height: auto;
    }

    .hero__content {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .hero__cta {
        flex-direction: column;
        align-items: center;
    }

    .hero__cta .btn {
        width: 100%;
        max-width: 320px;
    }

    .hero__stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .why__badges-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .single-article__nav {
        flex-direction: column;
    }

    .single-nav-link {
        max-width: 100%;
    }

    .cta-section__buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-section__buttons .btn {
        width: 100%;
        max-width: 320px;
    }

    .topbar__inner {
        justify-content: center;
    }

    .section {
        padding: 60px 0;
    }

    .error-404__actions {
        flex-direction: column;
        align-items: center;
    }
}

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

    .why__badges-grid {
        grid-template-columns: 1fr;
    }

    .topbar__inner {
        flex-direction: column;
        gap: 8px;
        padding: 10px 0;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.2rem; }
}

/* ----------------------------------------------------------
   31. PRINT
   ---------------------------------------------------------- */
@media print {
    .header,
    .topbar,
    .footer,
    .mobile-nav,
    .nav__burger,
    .btn,
    .hero__cta {
        display: none !important;
    }
    body {
        font-size: 12pt;
        color: #000;
    }
}
