/* =========================================
   RESET
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =========================================
   OPTIMIZACIONES
   ========================================= */

img,
button,
.service-card,
.hero h1,
.hero h2 {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.hero,
.service-card,
.about-image,
.mobile-menu,
.chat-toggle {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
}

* {
    transition:
        color 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        opacity 0.3s ease,
        transform 0.3s ease;
}


/* =========================================
   BODY
   ========================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f3f4f6;
}

body.menu-open,
body.modal-open {
    overflow: hidden;
}


/* =========================================
   HEADER
   ========================================= */

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1f2937;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
    will-change: background-color, box-shadow;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-right: 0;
    padding-left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: #1f2937;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    left: 0;
    margin-left: 0;
    padding-left: 0;
}

.logo img {
    height: 40px;
    width: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.logo:hover {
    color: #6b7280;
}


/* =========================================
   NAVEGACIÓN
   ========================================= */

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-left: auto;
    margin-right: 0;
}

.nav-menu a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #6b7280;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}


/* =========================================
   MENÚ MÓVIL
   ========================================= */

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #1f2937;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, visibility;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
}

.mobile-menu li {
    margin: 2rem 0;
}

.mobile-menu a {
    color: #1f2937;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #6b7280;
}

.mobile-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: #1f2937;
    font-size: 2rem;
    cursor: pointer;
}


/* =========================================
   CONTENEDOR
   ========================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}


/* =========================================
   HERO
   ========================================= */

.service-hero {
    background: linear-gradient(
        135deg,
        rgba(75, 85, 99, 0.9) 0%,
        rgba(107, 114, 128, 0.8) 100%
    );
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.service-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}


/* =========================================
   CONTENIDO SUPERIOR
   ========================================= */

.service-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

.service-content > * {
    min-width: 0;
}


/* =========================================
   TEXTO
   ========================================= */

.service-text {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-text h2 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.service-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.service-text p {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.8;
}


/* =========================================
   LISTA
   ========================================= */

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(107, 114, 128, 0.05);
    border-radius: 8px;
    border-left: 4px solid #6b7280;
    color: #374151;
}

.features-list li:last-child {
    margin-bottom: 0;
}


/* =========================================
   FOTO
   ========================================= */

.service-image {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: transparent;
}

.service-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 50%;
    display: block;
    border-radius: 15px;
}


/* =========================================
   ESPESORES + CTA
   ========================================= */

.thickness-cta-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 3rem;
    width: 100%;
    align-items: stretch;
    margin-bottom: 3rem;
}

.thickness-cta-wrapper > * {
    min-width: 0;
}


/* =========================================
   SECCIÓN DE ESPESORES
   ========================================= */

.thickness-section {
    width: 100%;
    margin-bottom: 0;
    min-width: 0;
}

.thickness-card {
    width: 100%;
    background: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    min-width: 0;
}


/* =========================================
   TÍTULO
   ========================================= */

.thickness-card h2 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.thickness-heading-line {
    width: 70px;
    height: 3px;
    background: #6b7280;
    border-radius: 10px;
    margin: 0 auto 1.5rem auto;
}


/* =========================================
   CUADRO DE INFORMACIÓN
   ========================================= */

.thickness-info-box {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(107, 114, 128, 0.12);
    overflow: hidden;
}


/* =========================================
   TABLA
   ========================================= */

.thickness-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.thickness-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-family: 'Montserrat', sans-serif;
    color: #374151;
    font-size: 0.9rem;
    text-align: center;
}


/* =========================================
   CELDAS
   ========================================= */

.thickness-table th,
.thickness-table td {
    padding: 1rem 0.85rem;
    border-right: 1px solid #d1d5db;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}


/* =========================================
   ENCABEZADO
   ========================================= */

.thickness-table th {
    background: #4b5563;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.5;
}

.thickness-table thead tr:nth-child(2) th:first-child {
    border-right: 1px solid #d1d5db;
}

.thickness-table thead tr:nth-child(2) th:last-child {
    border-right: 1px solid #d1d5db;
}


/* =========================================
   CUERPO
   ========================================= */

.thickness-table tbody tr:nth-child(even) {
    background: #f3f4f6;
}

.thickness-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.thickness-table tbody tr:hover {
    background: rgba(107, 114, 128, 0.08);
}

.thickness-table td:first-child {
    font-weight: 600;
    color: #1f2937;
}


/* =========================================
   BORDES
   ========================================= */

.thickness-table th:last-child,
.thickness-table td:last-child {
    border-right: none;
}

.thickness-table tbody tr:last-child td {
    border-bottom: none;
}


/* =========================================
   CTA
   ========================================= */

.cta-section {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(75, 85, 99, 0.95) 0%,
        rgba(107, 114, 128, 0.9) 100%
    );
    color: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cta-section h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}


/* =========================================
   MÓVIL
   ========================================= */

@media (max-width: 768px) {

    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        margin-right: 1.2rem;
    }

    .mobile-menu {
        display: flex;
    }

    .service-content {
        grid-template-columns: 1fr;
    }

    .service-image {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .service-image img {
        position: relative;
        width: 100%;
        height: auto;
    }

    .thickness-cta-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .thickness-card {
        padding: 1.5rem;
    }

    .thickness-card h2 {
        font-size: 2rem;
    }


    /* =====================================
       TABLA RESPONSIVE
       ===================================== */

    .thickness-table-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .thickness-table {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        table-layout: fixed;
        font-size: 0.65rem;
    }

    .thickness-table th,
    .thickness-table td {
        padding: 0.55rem 0.25rem;
        word-break: break-word;
        overflow-wrap: anywhere;
    }


    /* =====================================
       HERO
       ===================================== */

    .service-hero h1 {
        font-size: 2rem;
    }


    /* =====================================
       CONTENEDOR
       ===================================== */

    .container {
        padding: 1rem;
    }
}


/* =========================================
   MÓVIL PEQUEÑO
   ========================================= */

@media (max-width: 480px) {

    .thickness-card {
        padding: 1rem;
    }

    .thickness-card h2 {
        font-size: 1.7rem;
    }

    .cta-section {
        padding: 2rem 1.5rem;
    }

    .cta-section h3 {
        font-size: 1.6rem;
    }


    /* =====================================
       TABLA MÁS COMPACTA
       ===================================== */

    .thickness-table {
        font-size: 0.58rem;
    }

    .thickness-table th,
    .thickness-table td {
        padding: 0.45rem 0.2rem;
    }
}