/* Importación de tipografía moderna para mayor profesionalidad */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

/* Paleta de Colores:
    - Principal (Confianza): #34495e (Azul Oscuro)
    - Acento (Acción/CTAs): #5DADE2 (Azul Claro Neutral)
    - Secundario (Experiencia): #f39c12 (Naranja/Ámbar)
*/

/* Base Reset y Tipografía */
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    color: #333;
    /* Suaviza el desplazamiento de los enlaces internos (#) */
    scroll-behavior: smooth; 
}

h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
    color: #34495e;
    font-weight: 700;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header (Hero Section) */
.hero {
    background-color: #34495e;
    /* Carga la imagen de fondo desde la carpeta img/ */
    background-image: url('img/cerramiento-exterior.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 100px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}
/* Overlay oscuro para legibilidad del texto */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    /* text-transform: uppercase; */
    color: white;
    letter-spacing: 2px;
}

.hero h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
    /* text-transform: uppercase; */
    color: white;
    letter-spacing: 2px;
}

.hero h3 {
    font-size: 1.0em;
    margin-bottom: 10px;
    /* text-transform: uppercase; */
    color: white;
    letter-spacing: 2px;
}

.hero a {
    color: #f39c12;
}

.hero .subtitle, .hero .highlight, .hero .contact-header {
    color: white;
}

.hero .highlight {
    color: #f39c12;
}

/* Botones (CTAs) con color Azul Claro */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 5px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.2s, border-color 0.3s;
    text-transform: uppercase;
}

.primary {
    background-color: #5DADE2; 
    color: white;
    border: 2px solid #5DADE2;
}

.secondary {
    background-color: transparent;
    color: white;
    border: 2px solid #5DADE2;
}

.primary:hover {
    background-color: #2E86C1;
    transform: translateY(-2px);
}

.secondary:hover {
    background-color: rgba(93, 173, 226, 0.1);
    border-color: white; 
    transform: translateY(-2px);
}

/* Services Section (Tarjetas) */
.section-services {
    padding: 80px 0;
    text-align: center;
    background-color: white;
}

.section-services h2 {
    font-size: 2.8em;
    margin-bottom: 10px;
}

.section-services .experience {
    font-size: 1.3em;
    color: #f39c12;
    font-weight: 600;
    margin-bottom: 50px;
}

.service-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.service-card {
    flex: 1 1 calc(33.333% - 60px);
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 300px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.service-card h3 {
    padding: 15px;
    margin: 0;
    background-color: #5DADE2;
    color: white;
    font-size: 1.3em;
    text-align: center;
    text-transform: uppercase;
}
.service-card .card-link {
    display: block;
    padding: 10px 15px;
    text-align: right;
    font-weight: 600;
    color: #34495e;
    background-color: #f4f4f4;
}

.service-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Detail Sections (Contenido de servicio) */
.section-detail {
    padding: 80px 0;
    background-color: #f8f8f8;
    border-top: 1px solid #ddd;
}
.section-detail.reverse {
    background-color: white;
}

.detail-title {
    text-align: center;
    color: #5DADE2;
    margin-bottom: 50px;
    font-size: 2.5em;
    text-transform: uppercase;
}

.detail-content {
    display: flex;
    align-items: center;
    gap: 50px;
}
.detail-content img {
    max-width: 50%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}
.detail-content .text-block {
    flex: 1;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
}
.section-detail.reverse .detail-content .text-block {
    background-color: #f8f8f8;
}

.reverse .detail-content {
    flex-direction: row-reverse;
}

.detail-content h4 {
    color: #34495e;
    font-size: 1.5em;
    margin-top: 0;
    border-bottom: 2px solid #5DADE2;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* Listas en Bloques de Detalle */
.detail-content ul {
    list-style: none;
    padding-left: 0;
}

.detail-content ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.detail-content ul li::before {
    content: '✅';
    position: absolute;
    left: 0;
    color: #5DADE2;
}

.back-link {
    display: block;
    margin-top: 40px;
    text-align: center;
    font-weight: 600;
    color: #5DADE2;
    text-decoration: none;
    transition: color 0.3s;
}
.back-link:hover {
    color: #34495e;
}

/* ==============================================
ESTILO DE FORMULARIO REPETIDO (INLINE)
============================================== */
.section-form-inline {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-top: 40px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border: 1px solid #5DADE2;
    text-align: center;
}
.section-form-inline p {
    font-size: 1.1em;
    color: #34495e;
    font-weight: 600;
}
.google-form-embed-inline {
    max-width: 800px;
    margin: 10px auto;
}
.google-form-embed-inline iframe {
    height: 450px; /* Altura más pequeña para que quepa bien dentro de la sección de detalle */
    display: block;
    border: none;
}

/* ==============================================
ESTILO DE FORMULARIO PRINCIPAL (FULL)
============================================== */
.section-form-full {
    padding: 60px 0;
    background-color: white;
    text-align: center;
    border-top: 5px solid #5DADE2;
}
.section-form-full h2 {
    color: #5DADE2;
    margin-bottom: 10px;
}
.google-form-embed-full {
    max-width: 800px;
    margin: 30px auto;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fcfcfc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.google-form-embed-full iframe {
    display: block;
    border: none;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
    font-size: 1em;
}

.legal-links a {
    color: #f39c12;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .service-card {
        flex: 1 1 calc(50% - 45px);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5em;
    }
    .service-card {
        flex: 1 1 100%;
    }
    .detail-content {
        flex-direction: column;
    }
    .reverse .detail-content {
        flex-direction: column;
    }
    .detail-content img {
        max-width: 100%;
        margin-bottom: 20px;
    }
    .detail-content .text-block {
        padding: 10px;
    }
    .hero {
        /* Desactiva el fondo fijo en móviles (causa problemas de rendimiento) */
        background-attachment: scroll; 
    }
    .google-form-embed-inline iframe {
        height: 550px;
    }
}