/* VARIABLES Y RESET */
:root {
    --azul-oscuro: #031F5C;
    --rojo-cruz-azul: #e1251b;
    --fondo-gris: #f4f5f7;
    --texto-principal: #333333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--fondo-gris);
    color: var(--texto-principal);
    display: block !important; 
    overflow-x: hidden; 
}

/* NAVEGACIÓN */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 25px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo {
    height: 50px;
    width: auto;
}

.nav-logotipo {
    height: 35px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--rojo-cruz-azul);
}

.btn-nav-contacto {
    background-color: #ffffff;
    color: var(--azul-oscuro) !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 800 !important;
    transition: transform 0.2s;
}

.btn-nav-contacto:hover {
    transform: scale(1.05);
    background-color: var(--rojo-cruz-azul);
    color: #ffffff !important;
}

/* HERO SECTION */
.hero {
    background-image: url('../img/costalito.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 50px;
    color: #ffffff;
}

.hero h1 {
    font-size: 4rem;
    max-width: 800px;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

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

/* CONTENEDOR PRINCIPAL */
.main-content {
    background-color: #ffffff;
    border-radius: 50px 50px 0 0;
    margin-top: -100px;
    position: relative;
    z-index: 10;
    padding: 80px 50px;
    min-height: 50vh;
}

/* PRESENTACIÓN DE LA EMPRESA */
.company-intro {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 100px auto;
    padding: 0 20px;
}

.intro-content {
    flex: 1;
}

.intro-content h2 {
    font-size: 2.2rem;
    color: var(--azul-oscuro);
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.intro-content p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-outline {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--azul-oscuro);
    color: var(--azul-oscuro);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--azul-oscuro);
    color: #ffffff;
}

.intro-images {
    flex: 1;
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-images img {
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    object-fit: cover;
}

.img-main {
    width: 80%;
    height: 350px;
    position: relative;
    z-index: 1;
}

.img-secondary {
    width: 50%;
    height: 250px;
    position: absolute;
    bottom: -20px;
    right: 0;
    z-index: 2;
    border: 8px solid #ffffff;
}

/* CARRUSEL MORTERO */
.mortero-section {
    max-width: 1200px;
    margin: 0 auto 100px auto;
    padding: 0 20px;
    text-align: center;
}

.mortero-header {
    margin-bottom: 40px;
}

.mortero-header h2 {
    font-size: 2.2rem;
    color: var(--azul-oscuro);
    font-weight: 800;
}

.mortero-header p {
    color: #666;
    font-size: 1.1rem;
    margin-top: 10px;
}

.slider-wrapper {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    background-color: #ffffff;
}

.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  
    scrollbar-width: none; 
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.slide {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    scroll-snap-align: center;
    display: block;
}

/* SECCIÓN DE FORMULARIO */
.form-section {
    background-color: var(--azul-oscuro);
    border-radius: 30px;
    padding: 50px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(3, 31, 92, 0.2);
}

.form-text {
    flex: 1;
}

.form-text h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.form-text p {
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.5;
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    outline: none;
}

.contact-form input::placeholder, 
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form input:focus, 
.contact-form textarea:focus {
    background-color: rgba(255, 255, 255, 0.2);
}

.contact-form textarea {
    resize: none;
    height: 120px;
}

.contact-form button {
    background-color: #ffffff;
    color: var(--azul-oscuro);
    font-weight: 800;
    font-size: 1.1rem;
    padding: 15px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.contact-form button:hover {
    background-color: var(--rojo-cruz-azul);
    color: #ffffff;
}

.form-text {
    width: 100%;
}

.form-section .links-container {
    padding: 0 !important; 
    width: 100%;
}

.form-section .link-card {
    width: 100%;
}

/* RESPONSIVIDAD MÓVIL */
@media (max-width: 800px) {
    .navbar { 
        padding: 15px 20px; 
        background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 100%);
    }
    .nav-logo { height: 30px; } 
    .nav-logotipo { height: 20px; } 
    .nav-links a:not(.btn-nav-contacto) { display: none; }
    .btn-nav-contacto {
        padding: 8px 16px;
        font-size: 0.8rem !important;
    }

    .ocultar-en-movil {
        display: none;
    }
    
    .hero { 
        padding: 0 20px; 
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 40vh;
        align-items: flex-start; 
        text-align: left; 
        background-size: cover; 
        background-position: 85% center; 
        padding-bottom: 0;
    }
    
    .hero h1 { 
        font-size: 1.4rem;
        line-height: 1.2;
        margin-bottom: 10px;
        max-width: 55%;
    }
    
    .hero p {
        font-size: 0.85rem;
        line-height: 1.4;
        max-width: 55%;
        margin-bottom: 20px;
    }
    
    .hero h1, .hero p {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important;
    }
    
    .main-content { 
        padding: 40px 20px; 
        border-radius: 24px 24px 0 0; 
        margin-top: -60px; 
    }

    .company-intro { margin-bottom: 60px; gap: 20px; }
    .intro-content h2 { font-size: 1.6rem; margin-bottom: 15px; line-height: 1.3;}
    .intro-content p { font-size: 0.95rem; margin-bottom: 15px; }

    /* Corrección estricta para evitar que Cedis 1 y Cedis 2 se aplasten en móvil */
    .intro-images { 
        display: block;
        position: relative;
        min-height: 280px;
        margin-top: 15px; 
        width: 100%;
    }
    
    .img-main { 
        display: block;
        width: 80%; 
        height: 220px; 
        object-fit: cover; 
        border-radius: 12px; 
    }

    .img-secondary { 
        width: 55%; 
        height: 150px; 
        object-fit: cover; 
        position: absolute; 
        bottom: 0px; 
        right: 0px; 
        border: 3px solid #ffffff; 
        border-radius: 12px; 
    }

    .mortero-section { margin-bottom: 60px; }
    .mortero-header h2 { font-size: 1.6rem; }
    .mortero-header p { font-size: 0.95rem; }
    .slider-wrapper { width: 90%; border-radius: 16px; }

    .form-section { flex-direction: column; padding: 30px 20px; gap: 25px; border-radius: 20px;}
    .form-text h2 { font-size: 1.6rem; }
    .contact-form input, .contact-form textarea { padding: 12px 15px; font-size: 0.95rem; border-radius: 10px; }
}

/* RESPONSIVIDAD PARA PC */
@media (min-width: 900px) {
    .company-intro {
        flex-direction: row;
        align-items: center;
    }
    
    .carousel-card {
        flex: 0 0 400px;
        scroll-snap-align: start;
    }
}