/* ========================================
   VARIABLES GLOBALES (Sistema de Diseño)
   ======================================== */
:root {
    /* Colores Principales */
    --th-color-primary: #0A2647;      /* Azul Profundo */
    --th-color-primary-light: #144272;
    --th-color-secondary: #F28C28;    /* Naranja Vibrante */
    --th-color-secondary-light: #F9A84C;
    --th-color-bg: #F8FAFC;
    --th-color-text: #1E293B;
    --th-color-white: #FFFFFF;
    --th-color-gray: #94A3B8;

    /* Tipografía */
    --th-font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    --th-font-size-base: 1rem;        /* 16px */
    --th-line-height-base: 1.6;

    /* Espaciado */
    --th-spacing-xs: 0.25rem;         /* 4px */
    --th-spacing-sm: 0.5rem;          /* 8px */
    --th-spacing-md: 1rem;            /* 16px */
    --th-spacing-lg: 2rem;            /* 32px */
    --th-spacing-xl: 4rem;            /* 64px */

    /* Bordes y Sombras */
    --th-border-radius: 0.5rem;       /* 8px */
    --th-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --th-box-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Contenedor */
    --th-container-max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--th-font-family);
    font-size: var(--th-font-size-base);
    line-height: var(--th-line-height-base);
    color: var(--th-color-text);
    background-color: var(--th-color-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

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

ul,
ol {
    list-style: none;
}

/* ========================================
   UTILIDADES Y CONTENEDOR
   ======================================== */
.th-container {
    width: 90%;
    max-width: var(--th-container-max-width);
    margin: 0 auto;
    padding: 0 var(--th-spacing-md);
}

.th-section {
    padding: var(--th-spacing-xl) 0;
}

.th-section__title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    color: var(--th-color-primary);
    text-align: center;
    margin-bottom: var(--th-spacing-sm);
}

.th-section__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--th-color-gray);
    text-align: center;
    margin-bottom: var(--th-spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.th-highlight {
    color: var(--th-color-secondary);
}

/* ========================================
   BOTONES
   ======================================== */
.th-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--th-border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.5;
}

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

.th-btn--primary:hover,
.th-btn--primary:focus {
    background-color: var(--th-color-secondary-light);
    border-color: var(--th-color-secondary-light);
    transform: scale(1.02);
    box-shadow: var(--th-box-shadow-hover);
}

.th-btn--secondary {
    background-color: transparent;
    color: var(--th-color-white);
    border-color: var(--th-color-white);
}

.th-btn--secondary:hover,
.th-btn--secondary:focus {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.th-btn--large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ========================================
   HEADER Y NAVEGACIÓN (Mobile-First)
   ======================================== */
.th-header {
    background-color: var(--th-color-white);
    box-shadow: var(--th-box-shadow);
    padding: var(--th-spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.th-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--th-spacing-md);
}

.th-logo img {
    max-height: 40px;
    width: auto;
}

.th-nav__list {
    display: flex;
    gap: var(--th-spacing-md);
    flex-wrap: wrap;
}

.th-nav__link {
    font-weight: 500;
    padding: var(--th-spacing-xs) 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.th-nav__link:hover,
.th-nav__link:focus {
    border-bottom-color: var(--th-color-secondary);
    color: var(--th-color-primary);
}

.th-header__whatsapp {
    font-weight: 700;
    color: #25D366; /* Color oficial de WhatsApp */
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: var(--th-spacing-xs);
    background-color: #F0FDF4;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid #BBF7D0;
    transition: all 0.3s ease;
}

.th-header__whatsapp:hover,
.th-header__whatsapp:focus {
    background-color: #DCFCE7;
    transform: scale(1.02);
}

/* ========================================
   HERO (Mobile-First)
   ======================================== */
.th-hero {
    background: linear-gradient(135deg, var(--th-color-primary) 0%, var(--th-color-primary-light) 100%);
    padding: var(--th-spacing-xl) 0;
    text-align: center;
    color: var(--th-color-white);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.th-hero__title {
    font-size: clamp(2.2rem, 8vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--th-spacing-md);
}

.th-hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto var(--th-spacing-lg);
}

.th-hero__actions {
    display: flex;
    justify-content: center;
    gap: var(--th-spacing-md);
    flex-wrap: wrap;
}

/* ========================================
   ABOUT (Quiénes Somos)
   ======================================== */
.th-about {
    background-color: var(--th-color-white);
}

.th-about__content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: var(--th-spacing-md);
}

/* ========================================
   SERVICIOS (Grid)
   ======================================== */
.th-services {
    background-color: var(--th-color-bg);
}

.th-services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--th-spacing-md);
    margin-top: var(--th-spacing-lg);
}

.th-service-card {
    background-color: var(--th-color-white);
    padding: var(--th-spacing-lg);
    border-radius: var(--th-border-radius);
    box-shadow: var(--th-box-shadow);
    border-left: 6px solid var(--th-color-secondary);
    transition: all 0.3s ease;
    text-align: center;
}

.th-service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--th-box-shadow-hover);
}

.th-service-card__title {
    font-size: 1.25rem;
    margin-bottom: var(--th-spacing-xs);
    color: var(--th-color-primary);
}

.th-service-card__desc {
    color: var(--th-color-gray);
    margin-bottom: var(--th-spacing-sm);
}

.th-service-card__badge {
    display: inline-block;
    background-color: var(--th-color-secondary);
    color: var(--th-color-white);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   ZONAS DE ATENCIÓN (Grid)
   ======================================== */
.th-zones {
    background-color: var(--th-color-white);
}

.th-zones__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--th-spacing-lg);
    margin-top: var(--th-spacing-lg);
}

.th-zone-card {
    background-color: var(--th-color-bg);
    padding: var(--th-spacing-md);
    border-radius: var(--th-border-radius);
    border: 1px solid #E2E8F0;
}

.th-zone-card__title {
    font-size: 1.2rem;
    color: var(--th-color-primary);
    margin-bottom: var(--th-spacing-sm);
    padding-bottom: var(--th-spacing-xs);
    border-bottom: 3px solid var(--th-color-secondary);
    display: inline-block;
}

.th-zone-card__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--th-spacing-xs);
    padding-top: var(--th-spacing-sm);
}

.th-zone-card__list li {
    background-color: var(--th-color-white);
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #E2E8F0;
}

/* ========================================
   CONTACTO
   ======================================== */
.th-contact {
    background-color: var(--th-color-bg);
}

.th-contact__info {
    display: flex;
    flex-direction: column;
    gap: var(--th-spacing-md);
    max-width: 600px;
    margin: 0 auto var(--th-spacing-lg);
}

.th-contact__item {
    display: flex;
    align-items: flex-start;
    gap: var(--th-spacing-sm);
    background-color: var(--th-color-white);
    padding: var(--th-spacing-md);
    border-radius: var(--th-border-radius);
    box-shadow: var(--th-box-shadow);
}

.th-contact__item p {
    margin: 0;
}

/* Formulario */
.th-contact__form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--th-color-white);
    padding: var(--th-spacing-lg);
    border-radius: var(--th-border-radius);
    box-shadow: var(--th-box-shadow);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--th-spacing-md);
}

.th-form__group {
    display: flex;
    flex-direction: column;
    gap: var(--th-spacing-xs);
}

.th-form__group--full {
    grid-column: 1 / -1;
}

.th-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--th-color-primary);
}

.th-input,
.th-textarea {
    padding: 0.75rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--th-border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.th-input:focus,
.th-textarea:focus {
    outline: none;
    border-color: var(--th-color-secondary);
    box-shadow: 0 0 0 3px rgba(242, 140, 40, 0.3);
}

/* ========================================
   FOOTER
   ======================================== */
.th-footer {
    background-color: var(--th-color-primary);
    color: var(--th-color-white);
    padding: var(--th-spacing-lg) 0;
    text-align: center;
    margin-top: auto;
}

.th-footer__copy {
    margin-bottom: var(--th-spacing-xs);
}

.th-footer__dev {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ========================================
   MEDIA QUERIES (Responsive)
   ======================================== */
/* Tablets y pantallas medianas */
@media (min-width: 768px) {
    .th-services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .th-contact__info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .th-contact__item {
        flex: 1 1 200px;
    }

    .th-contact__form {
        grid-template-columns: 1fr 1fr;
    }
}

/* Escritorio y pantallas grandes */
@media (min-width: 1024px) {
    .th-services__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .th-zones__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .th-hero {
        min-height: 70vh;
    }

    .th-header__inner {
        flex-wrap: nowrap;
    }
}

/* Pantallas muy grandes (1440px+) */
@media (min-width: 1440px) {
    .th-container {
        max-width: 1300px;
    }

    .th-hero__title {
        font-size: 4.5rem;
    }
}