/* =========================================
   DISEÑO CONSTRUCCIONES CASADO SA
   Colores: Blanco (#FFFFFF), Rojo (#D32F2F), Gris Oscuro (#222)
   ========================================= */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #333;
    overflow-x: hidden;
}

/* NAVEGACIÓN */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: #fff;
    border-bottom: 3px solid #d32f2f;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo img {
    height: 55px;
    width: auto;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    align-items: center;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: #d32f2f;
}

/* BOTÓN "QUIERO SER PARTE" */
.btn-rojo {
    background-color: #d32f2f;
    color: white !important;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.btn-rojo:hover {
    background-color: #b71c1c;
}

/* HERO SECTION (PORTADA) */
.hero-main {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?q=80&w=2070');
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin: 0;
    border: none;
    padding: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 20px auto;
}

.hero-btns {
    margin-top: 30px;
}

.btn-principal,
.btn-secundario {
    padding: 15px 35px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin: 10px;
    display: inline-block;
    transition: 0.3s;
}

.btn-principal {
    background-color: #d32f2f;
    color: white;
}

.btn-principal:hover {
    background-color: #b71c1c;
}

.btn-secundario {
    background-color: white;
    color: #333;
}

.btn-secundario:hover {
    background-color: #eee;
}

/* BARRA DE ESTADÍSTICAS */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    background: #d32f2f;
    color: white;
    padding: 50px 5%;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-item .num {
    font-size: 3rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.stat-item .txt {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CONTENEDOR GENERAL */
.container {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
}

h2.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    border: none;
    color: #222;
}

/* GRID DE PROYECTOS */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border: 1px solid #eee;
    overflow: hidden;
    transition: 0.4s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
    height: 250px;
    background-size: cover;
    background-position: center;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    margin-top: 0;
    color: #d32f2f;
}

/* SECCIÓN VALORES */
.values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin: 80px 0;
    text-align: center;
}

.value-box {
    padding: 20px;
}

.value-box i {
    font-size: 3.5rem;
    color: #d32f2f;
    margin-bottom: 20px;
}

.value-box h3 {
    margin-bottom: 15px;
}

/* LLAMADA A LA ACCIÓN (CTA) */
.cta-bottom {
    background-color: #f8f8f8;
    padding: 100px 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.cta-bottom h2 {
    border: none;
    font-size: 2.5rem;
}

/* PIE DE PÁGINA */
footer {
    text-align: center;
    padding: 40px;
    background: #222;
    color: #bbb;
    font-size: 0.9rem;
}

.legal-links {
    margin-top: 12px;
    font-size: 0.78rem;
    color: #888;
}

.legal-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.legal-links a:hover {
    color: #d32f2f;
    text-decoration: underline;
}

.legal-links span {
    margin: 0 8px;
    color: #555;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
}

/* =========================================
   NUEVOS ESTILOS PARA LA PÁGINA DE CONTACTO
   ========================================= */

.hero-small {
    background: #f8f8f8;
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.hero-small h1 {
    border: none;
    font-size: 2.5rem;
    color: #222;
    margin-bottom: 10px;
}

/* Cuadrícula de botones cuadrados (Tarjetas) */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.contact-card {
    background: white;
    padding: 40px 20px;
    text-align: center;
    border: 1px solid #eee;
    border-bottom: 5px solid #d32f2f;
    /* El detalle rojo abajo */
    transition: 0.3s ease-in-out;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.contact-card i {
    font-size: 3rem;
    color: #d32f2f;
    margin-bottom: 20px;
}

.contact-card h3 {
    margin: 10px 0;
    font-size: 1.3rem;
    text-transform: uppercase;
    color: #222;
}

.contact-card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

.contact-link {
    display: inline-block;
    color: #d32f2f;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}

.contact-link:hover {
    color: #222;
}

/* Formulario Moderno */
.form-section {
    background: #ffffff;
    padding: 50px;
    border: 1px solid #eee;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.form-section h2 {
    text-align: center;
    margin-bottom: 30px;
    border: none;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modern-form input,
.modern-form textarea {
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.3s;
}

.modern-form input:focus,
.modern-form textarea:focus {
    outline: none;
    border-color: #d32f2f;
    background-color: #fffafb;
}

.btn-enviar {
    background: #d32f2f;
    color: white;
    padding: 18px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-enviar:hover {
    background: #222;
    transform: scale(1.02);
}

/* Ajuste móvil para el formulario */
@media (max-width: 650px) {
    .form-group {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 30px 20px;
    }
}


/* --- ESTILOS PÁGINA EMPLEO --- */

/* Badge de vacantes (Efecto parpadeo) */
.status-badge {
    display: inline-flex;
    align-items: center;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.dot {
    height: 10px;
    width: 10px;
    background-color: #2e7d32;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

/* Tarjetas de Trabajo */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.job-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    position: relative;
    transition: 0.3s;
    border-left: 4px solid #ff0000;
}

.job-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    background-color: #fffafb;
}

.job-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #d32f2f;
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.job-card h3 {
    margin-top: 0;
    color: #222;
}

.job-card p {
    color: #666;
    font-size: 0.9rem;
}

.btn-job {
    display: inline-block;
    margin-top: 15px;
    color: #d32f2f;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.btn-job:hover {
    border-bottom: 2px solid #d32f2f;
    color: #d32f2f;
}

.career-intro {
    max-width: 800px;
    margin-bottom: 50px;
}

.benefits {
    margin-top: 100px;
}

/* --- ESTILOS MODERNOS NOSOTROS --- */

/* Sección Intro con Imagen Flotante */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin: 60px 0;
}

.about-img-box {
    position: relative;
}

.about-img-box img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 20px 20px 0px #f4f4f4;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: #d32f2f;
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.experience-badge span {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
}

.subtitle {
    color: #d32f2f;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* Misión y Visión */
.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 80px 0;
}

.mission-card {
    background: #222;
    color: white;
    padding: 50px;
    border-radius: 15px;
    transition: 0.3s;
}

.mission-card:hover {
    background: #d32f2f;
    transform: translateY(-5px);
}

.mission-card i {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* --- LÍNEA DE TIEMPO INTERACTIVA V2 ACTUALIZADA --- */

.timeline-v2 {
    margin: 80px 0;
}

.timeline-line {
    display: flex;
    justify-content: space-between;
    margin: 60px 0;
    position: relative;
    padding-top: 15px;
    /* Pequeño ajuste para centrar la línea */
}

/* La línea gris horizontal que une los puntos */
.timeline-line::before {
    content: '';
    position: absolute;
    top: 30px;
    /* Centrada con respecto al punto */
    left: 0;
    width: 100%;
    height: 2px;
    background: #eee;
    z-index: 0;
}

/* El elemento contenedor de cada hito */
.timeline-item {
    position: relative;
    z-index: 1;
    /* Por encima de la línea gris */
    text-align: center;
    flex: 1;
    cursor: pointer;
    /* Cambia el cursor para indicar interacción */
}

/* El Punto Rojo (Bolita) */
.time-dot {
    width: 30px;
    height: 30px;
    background: #d32f2f;
    border: 5px solid white;
    /* Borde blanco para el efecto visual */
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-out;
    /* Transición suave para todos los cambios */
}

/* Contenedor del texto (Año y Descripción) */
.time-content {
    transition: all 0.3s ease-out;
    /* Transición suave para el texto */
    margin-top: 0;
}

.time-content h4 {
    color: #d32f2f;
    font-size: 1.5rem;
    margin: 0 0 5px 0;
    font-weight: bold;
}

.time-content p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* --- ANIMACIONES AL PASAR EL RATÓN (HOVER) --- */

/* 1. La Bolita Crece y Brilla al hacer hover sobre el item */
.timeline-item:hover .time-dot {
    transform: scale(1.3);
    /* Crece un 30% */
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.5);
    /* Añade un brillo rojo suave */
}

/* 2. El Texto Sube Ligeramente al hacer hover sobre el item */
.timeline-item:hover .time-content {
    transform: translateY(-8px);
    /* Sube 8 píxeles */
}


/* Ajustes para móviles (Responsivo) */
@media (max-width: 768px) {
    .timeline-line {
        flex-direction: column;
        align-items: flex-start;
        border-left: 2px solid #eee;
        margin-left: 20px;
        padding-top: 0;
    }

    .timeline-line::before {
        display: none;
    }

    /* Elimina la línea horizontal en móvil */
    .timeline-item {
        text-align: left;
        display: flex;
        gap: 20px;
        align-items: center;
        margin-bottom: 30px;
        width: 100%;
        margin-left: -16px;
        /* Ajuste para alinear con la línea vertical */
    }

    .time-dot {
        margin: 0;
    }

    /* El efecto en móvil es diferente: el texto no sube, la tarjeta entera flota un poco */
    .timeline-item:hover .time-content {
        transform: translateX(5px);
    }

    .timeline-item:hover {
        transform: translateY(-5px);
    }
}

/* --- ESTILOS ACTUALIDAD --- */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.4s;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(211, 47, 47, 0.1);
}

.news-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.news-content {
    padding: 25px;
}

.news-date {
    color: #d32f2f;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.news-content h3 {
    margin: 10px 0;
    font-size: 1.3rem;
    color: #222;
}

.news-link {
    text-decoration: none;
    color: #d32f2f;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 15px;
}

/* Sección de Equipo */
.team-section {
    padding: 60px 0;
    background: #fdfdfd;
    text-align: center;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.team-card {
    padding: 30px;
    background: #222;
    color: white;
    border-radius: 8px;
    transition: 0.3s;
}

.team-card:hover {
    background: #d32f2f;
}

.team-card h3 {
    margin-bottom: 5px;
}

.team-card .role {
    color: #bbb;
    font-style: italic;
    font-size: 0.9rem;
}

.team-card:hover .role {
    color: white;
}


/* --- ESTILOS TRABAJOS Y SERVICIOS --- */

.services-intro {
    text-align: center;
    max-width: 800px;
    margin: 60px auto;
}

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

.service-card {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #eee;
    transition: all 0.4s ease;
    cursor: pointer;
}

.service-card i {
    font-size: 3rem;
    color: #d32f2f;
    margin-bottom: 20px;
    transition: 0.3s;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #222;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Efecto WOW al pasar el ratón */
.service-card:hover {
    background: #222;
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-card:hover h3,
.service-card:hover p {
    color: #fff;
}

.service-card:hover i {
    transform: rotateY(180deg);
    color: #fff;
}

/* --- ESTILOS GALERÍA --- */

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.filter-btn {
    padding: 10px 25px;
    background: #f4f4f4;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: #d32f2f;
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

.gallery-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(211, 47, 47, 0.85);
    /* Rojo de la marca con transparencia */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transition: 0.4s;
    transform: translateY(20px);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-overlay span {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Ajuste móvil */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}


/* Estilos para el acceso en el Footer */
.admin-access {
    margin-top: 10px;
}

.admin-link {
    color: #888;
    font-size: 0.8rem;
    text-decoration: none;
    transition: 0.3s;
}

.admin-link:hover {
    color: #d32f2f;
}

/* Estilos para el Panel de Administración */
.admin-body {
    background-color: #f4f7f6;
}

.admin-container {
    padding: 40px 20px;
}

.admin-header {
    text-align: center;
    margin-bottom: 40px;
}

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

.admin-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-top: 4px solid #d32f2f;
}

.admin-card h3 {
    margin-bottom: 20px;
    color: #222;
}