/* Paleta de Colores Corporativa */
:root {
    --logo-red: #843723;         /* Color oficial del logotipo */
    --legacy-red: #d02f0e;       /* Rojo heredado para footer y barra divisoria */
    --dark-charcoal: #1c1c1c;
    --warm-cream: #f4ebd9;
    --card-bg: #f0dcbd;          /* Fondo específico para tarjetas y descripción */
    --coral-accent: #e2664c;
    --pure-white: #ffffff;
    --text-dark: #333333;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    /* Fondo con repetición de mosaico (tiling) */
    background-image: url('../img/back.jpg');
    background-repeat: repeat;
    line-height: 1.6;
}

.section-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Header */
.main-header {
    width: 100%;
    overflow: hidden;
    display: block;
}

.header-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Barra de Navegación */
.navigation-bar {
    background-color: var(--dark-charcoal);
    padding: 15px 0;
    border-bottom: 4px solid var(--logo-red);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--pure-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

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

/* Sección Alerta de Accidentes (Estilo Moderno en 2 Columnas) */
.accident-alert-section {
    background: transparent;
    padding: 60px 20px;
    border-top: 4px solid var(--logo-red);
    display: flex;
    justify-content: center;
    align-items: center;
}

.accident-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.55); /* Efecto cristalino sutil sobre fondo de mosaico */
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(132, 55, 35, 0.12);
    box-shadow: 0 10px 30px rgba(132, 55, 35, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.accident-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(132, 55, 35, 0.1);
}

/* Columna Izquierda (Sello) */
.accident-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sello-img {
    max-width: 100%;
    height: auto;
    max-height: 320px; /* Se escala perfectamente al alto del div */
    object-fit: contain;
    filter: drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s ease;
}

.accident-container:hover .sello-img {
    transform: scale(1.03) rotate(2deg);
}

/* Columna Derecha (Contenido de texto) */
.accident-right {
    flex: 1.2;
    text-align: left; /* Alineación limpia y asimétrica */
}

/* Badge 24/7 */
.badge-247 {
    background-color: var(--logo-red);
    color: var(--pure-white);
    display: inline-block;
    padding: 6px 18px;
    font-weight: 900;
    font-size: 1.1rem;
    border-radius: 30px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.accident-alert-section h2 {
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    color: var(--logo-red);
    text-transform: uppercase;
}

.accident-alert-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #4f473c;
    font-weight: 500;
}

/* Botón de Llamada con Efecto de Ondas y Resplandor Pulsante */
.alert-call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: var(--logo-red);
    color: var(--pure-white);
    text-decoration: none;
    font-weight: 900;
    font-size: 1.4rem;
    padding: 16px 45px;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 0 rgba(132, 55, 35, 0.6);
    animation: pulse-button 2s infinite;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

@keyframes pulse-button {
    0% {
        box-shadow: 0 0 0 0 rgba(132, 55, 35, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(132, 55, 35, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(132, 55, 35, 0);
    }
}

.alert-call-btn:hover {
    background-color: #682918;
    transform: scale(1.03);
    animation: none; /* Detiene la animación al interactuar */
    box-shadow: 0 8px 25px rgba(132, 55, 35, 0.35);
}

.alert-call-btn:active {
    transform: scale(0.98);
}

.phone-icon {
    transition: transform 0.3s ease;
}

.alert-call-btn:hover .phone-icon {
    transform: rotate(15deg) scale(1.1);
}

/* Servicios */
.services-section {
    background: transparent;
    padding-top: 0px;
}

/* Barra Horizontal de Título modificada a Rojo heredado de menú inferior con Línea Negra de 10px */
.services-title-bar {
    background-color: var(--legacy-red); /* Color de la barra de menú inferior */
    width: 100%;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 10px solid #000000; /* Línea negra inferior de 10px */
}

.services-title-bar .section-title {
    margin: 0;
    font-size: 2.3rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--pure-white); /* Texto cambiado a Blanco */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* Sombra adaptada para legibilidad */
}

/* Reducción de 30px del margen superior del Wrapper de Servicios */
.services-wrapper {
    padding-top: 30px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Tarjetas de Servicio modificadas a Rojo con Línea Negra inferior de 10px */
.service-card {
    background-color: var(--logo-red); /* Cambiado a Rojo corporativo del logo */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 10px solid #000000; /* Línea negra inferior de 10px */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.service-img-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.service-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card h3 {
    padding: 20px 20px 10px 20px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--pure-white); /* Texto del título cambiado a Blanco */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.service-card p {
    padding: 0 20px 25px 20px;
    font-size: 0.95rem;
    color: var(--pure-white); /* Texto de la descripción cambiado a Blanco */
    flex-grow: 1;
}

/* Botones de tarjetas modificados a Negro con Texto Blanco */
.service-cta-btn {
    display: block;
    background-color: #000000; /* Fondo del botón cambiado a Negro */
    color: var(--pure-white); /* Texto cambiado a Blanco */
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    padding: 12px 20px;
    margin: 0 20px 20px 20px;
    border-radius: 6px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.service-cta-btn:hover {
    background-color: #222222; /* Oscurecimiento sutil al pasar el cursor */
    transform: translateY(-1px);
}

/* Sección Descripción Breve modificada a Gris Claro */
.about-brief-section {
    background-color: #eaeaea; /* Fondo cambiado a Gris Claro */
    border-top: 2px solid rgba(0,0,0,0.05);
    border-bottom: 2px solid rgba(0,0,0,0.05);
    padding: 40px 0 0 0; /* padding inferior en 0 para que la imagen proud.png asiente al ras */
    overflow: hidden;
}

.brief-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end; /* Alinea los elementos al ras inferior */
    justify-content: space-between;
    gap: 40px;
    padding: 0 20px;
}

/* Columna Izquierda: proud.png */
.brief-left {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.proud-img {
    max-width: 100%;
    height: auto;
    display: block; /* Evita el espacio en blanco inferior por defecto de los elementos inline */
    margin-bottom: 0;
}

/* Columna Derecha: Texto descriptivo */
.brief-right {
    flex: 1.2;
    padding-bottom: 40px; /* Padding para compensar visualmente la alineación de la imagen */
    text-align: left;
}

.brief-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--logo-red); /* Más fuerza con el color del logo */
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15); /* Sombra de texto pronunciada */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.company-pitch {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444444; /* Adaptado a un tono oscuro legible sobre fondo gris claro */
    margin: 0;
}

/* Divisor de menú inferior */
.mid-menu-divider {
    background-color: var(--legacy-red);
    padding: 20px 0;
    text-align: center;
}

.mid-menu-divider a {
    color: var(--pure-white);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    margin: 0 15px;
    transition: opacity 0.3s;
}

.mid-menu-divider a:hover {
    opacity: 0.8;
}

/* Pie de Página de 3 Columnas */
.main-footer {
    background-color: var(--dark-charcoal);
    color: var(--pure-white);
    padding: 60px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-col h3 {
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-logo-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-logo {
    max-width: 180px;
    margin-bottom: 15px;
    height: auto;
}

.footer-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.footer-links a {
    color: var(--pure-white);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--coral-accent);
}

.lang-selector {
    color: #ffd800 !important;
}

/* Columna de Contacto Estilizada (Textos blancos y gruesos con iconos SVG) */
.footer-contact {
    color: var(--pure-white);
}

.footer-contact p {
    font-weight: 700; /* Texto grueso solicitado */
    font-size: 0.95rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact a {
    color: var(--pure-white); /* Enlace blanco solicitado */
    text-decoration: none;
    font-weight: 700; /* Texto grueso solicitado */
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--coral-accent); /* Resaltado al pasar el cursor */
}

.footer-phone {
    font-size: 1.2rem;
}

.footer-icon {
    color: var(--coral-accent); /* Color de realce para los iconos vectoriales */
    flex-shrink: 0;
}

.service-tag {
    color: var(--pure-white);
    font-weight: bold;
    margin-bottom: 10px;
}

.service-locations {
    margin-top: 15px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #aaa;
}

/* Páginas secundarias */
.page-main-content {
    background: transparent;
}

.about-hero-block {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    background-color: rgba(255, 255, 255, 0.45);
    padding: 30px;
    border-radius: 12px;
}

.about-hero-block p {
    font-size: 1.2rem;
    line-height: 1.8;
}

.gallery-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.6rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    background-color: #fafafa;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    padding: 10px;
    font-size: 0.85rem;
    text-align: center;
    color: #555;
    background: #fff;
}

/* Contacto */
.contact-layout {
    max-width: 650px;
    margin: 0 auto;
}

.modern-form {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

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

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.submit-btn {
    background-color: var(--logo-red);
    color: var(--pure-white);
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
}

.submit-btn:hover {
    background-color: #682918;
}

.status-msg {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-weight: bold;
}

.success-box {
    background-color: #d4edda;
    color: #155724;
}

.error-box {
    background-color: #f8d7da;
    color: #721c24;
}

/* Ubicación */
.location-details {
    text-align: center;
    margin-bottom: 30px;
}

.address-text {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.map-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

/* Botón Flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Ajustes de responsividad */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-logo-area {
        align-items: center;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .accident-container {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    .accident-right {
        text-align: center;
    }
    .sello-img {
        max-height: 220px;
    }
    
    /* Configuración responsiva para sección de descripción breve */
    .brief-container {
        flex-direction: column-reverse; /* El texto va arriba, la imagen proud.png se asienta al fondo */
        text-align: center;
        gap: 20px;
    }
    .brief-right {
        text-align: center;
        padding-bottom: 0; /* Se elimina el padding para que no empuje la imagen */
    }
    .about-brief-section {
        padding-top: 40px;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .accident-alert-section h2 {
        font-size: 1.6rem;
    }
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}