/* ===== 1. IMPORTACIÓN DE FUENTES ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* ===== 2. RESET Y BASE ===== */
* {
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.5;
    scroll-behavior: smooth;
    background-color: #ffffff;
    color: #1a1a1a;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ===== 3. HEADER Y NAVEGACIÓN ===== */
header {
    background-color: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.logo {
    font-weight: 900;
    color: #e2e3e5;
    letter-spacing: -0.5px;
}

.logo img {
    width: 200px;
    height: auto;
    max-width: 100%;
    display: block;
}

.logo span {
    color: #FC8004;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    color: #e2e3e5;
    transition: color 0.2s;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: #FC8004;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #e2e3e5;
}

.dark-mode-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #e2e3e5;
    margin-left: 1rem;
    transition: color 0.2s;
}

.dark-mode-btn:hover {
    color: #FC8004;
}

/* ===== 4. HERO Y CARRUSEL ===== */
.hero {
    position: relative;
    min-height: 90vh;
    overflow: hidden;
}

.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 8px;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: #FC8004;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}
/* Asegurar que el overlay del hero contenga todo el contenido y sea flex */
.hero-content-overlay {
    position: relative;  /* Cambia de absolute a relative */
    z-index: 5;
    min-height: 90vh;    /* Para que tenga altura como el hero */
    display: flex;
    align-items: center;  /* Centra verticalmente el grid */
}

/* Hero grid debe ocupar todo el ancho disponible */
.hero-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
}

/* Columna izquierda - texto institucional */
.hero-text {
    flex: 1;
    max-width: 550px;
    text-align: left; /* 👈 Alineado a la izquierda */
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    color: #F4F4F4;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 1.8rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    color: #F4F4F4;
}

/* Columna derecha - Tarjeta de obra (estilo INACAP) */
.hero-card {
    background: rgba(0, 0, 0, 0.75); /* Fondo negro semitransparente */
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 1.5rem;
    width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
   transition: transform 2s ease;
}

.hero-card:hover {
    transform: translateY(-5px);
}

.card-badge {
    display: inline-block;
    background-color: #FC8004;
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: white;
}

.card-details p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.card-details i {
    width: 20px;
    color: #FC8004;
    font-size: 1rem;
}


@media (max-width: 768px) {
    .hero-grid {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .hero-text, .hero-card {
        text-align: center;
        align-items: center;
    }
    .card-details p {
        justify-content: center;
    }
    .hero-content-overlay {
        min-height: auto;
        padding: 3rem 0;
    }
}

/* ===== 5. BOTONES ===== */
.btn {
    display: inline-block;
    background-color: #FC8004;
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.btn:hover {
    background-color: #cc6600;
    transform: translateY(-2px);
}

button[type="submit"] {
    background-color: #FC8004;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

button[type="submit"]:hover {
    background-color: #cc6600;
}

/* ===== 6. SECCIONES COMUNES ===== */
.section {
    padding: 5rem 0;
    background-color: #ffffff;
}

.section-alt {
    background-color: #f4f4f6;
}

.section-title {
    font-size: 2.2rem;
    font-weight: bolder;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.section-title span {
    color: #FC8004;
}

/* ===== 7. QUIÉNES SOMOS ===== */
.about-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
}

.about-text {
    flex: 1.5;
}

.about-text p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.values {
    flex: 1;
    padding: 1.8rem;
    border-radius: 24px;
    border-top: 4px solid #FC8004;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background-color: #F5F5F4;
}

.values h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.value-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.value-item i {
    font-size: 1.6rem;
    color: #FC8004;
    min-width: 40px;
}

/* ===== 8. SERVICIOS ===== */
.services-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.card {
    border-radius: 28px;
    padding: 2rem 1.8rem;
    width: 280px;
    text-align: center;
    transition: transform 0.25s ease;
    border-bottom: 4px solid #FC8004;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background-color: #fff;
}

.card:hover {
    transform: translateY(-8px);
}

.card i {
    font-size: 3rem;
    color: #FC8004;
    margin-bottom: 1.2rem;
}

.card h3 {
    font-weight: 800;
}

.card p {
    color: #2c3e50;
}

/* ===== 9. EQUIPO ===== */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: center;
}

.team-member {
    border-radius: 32px;
    padding: 1.8rem;
    text-align: center;
    width: 240px;
    border-top: 4px solid #FC8004;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
    background-color: #F5F5F4;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member h4 {
    font-weight: 800;
}

.avatar {
    background: #fff;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 3rem;
    color: #FC8004;
}

.role {
    color: #FC8004;
    font-weight: 700;
}

/* ===== 10. CONTACTO ===== */
.contact-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.contact-info {
    flex: 1;
}

.contact-info p {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info i {
    font-size: 1.5rem;
    width: 32px;
    color: #FC8004;
}

.contact-form {
    flex: 1;
    padding: 2rem;
    border-radius: 28px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background-color: #ffffff;
}

.contact-form span {
    background-color: #e2e3e5;
    color: #1a1a1a;
}

.form-group {
    margin-bottom: 1.2rem;
}

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

textarea {
    border-radius: 24px;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #FC8004;
    box-shadow: 0 0 0 3px rgba(252, 128, 4, 0.2);
}

/* ===== 11. FOOTER ===== */
footer {
    background-color: #000;
    color: #F4F4F4;
    padding: 2.5rem 0;
    text-align: center;
}

.footer-social a {
    color: #FC8004;
    margin: 0 8px;
    font-size: 1.5rem;
    transition: 0.2s;
}

.footer-social a:hover {
    color: white;
}

/* ===== 12. TOAST MENSAJE ===== */
.toast-message {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #2c3e50;
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    animation: fadeInUp 0.3s ease;
}

.toast-message.success {
    background-color: #FC8004;
    border-left: 4px solid #cc6600;
}

.toast-message.error {
    background-color: #dc2626;
    border-left: 4px solid #991b1b;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 13. TEMA OSCURO ===== */
body.dark-mode {
    background-color: #1e2226;
    color: #eaeef2;
}

body.dark-mode .section {
    background-color: #1C1917;
}

body.dark-mode .section-alt {
    background-color: #292524;
}

body.dark-mode .card,
body.dark-mode .team-member,
body.dark-mode .values,
body.dark-mode .contact-form {
    background-color: #79716B;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

body.dark-mode .card h3,
body.dark-mode .team-member h4,
body.dark-mode .values h3 {
    color: #eee;
}

body.dark-mode .card p,
body.dark-mode .team-member p,
body.dark-mode .values p {
    color: #f0f0f0;
}

body.dark-mode .logo,
body.dark-mode .nav-links a,
body.dark-mode .menu-toggle {
    color: #e2e3e5;
}

body.dark-mode .avatar {
    background: #F5F5F4;
}

body.dark-mode .hero-text h1,
body.dark-mode .section-title {
    color: #ffffff;
}

body.dark-mode .contact-form span {
    background-color: #404040;
    color: #e2e3e5;
}

/* ===== 14. RESPONSIVE ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        text-align: center;
    }

    .nav-links.show {
        display: flex;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .about-grid {
        flex-direction: column;
    }

    .carousel-btn {
        font-size: 1.2rem;
        padding: 0.3rem 0.8rem;
    }

    .toast-message {
        bottom: 20px;
        right: 20px;
        left: 20px;
        text-align: center;
        border-radius: 30px;
    }
}
/* ===== DESCRIPCIÓN DE OBRA EN EL CARRUSEL ===== */
.obra-caption {
    margin-top: 2rem;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 50px;
    display: inline-block;
    backdrop-filter: blur(4px);
    border-left: 4px solid #FC8004;
    text-align: left;
    transition: all 0.3s ease;
}

.obra-caption h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: white;
}

.obra-caption p {
    font-size: 0.85rem;
    margin-bottom: 0;
    text-shadow: none;
    color: #e0e0e0;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .obra-caption {
        padding: 0.5rem 1rem;
        margin-top: 1rem;
        border-radius: 30px;
    }
    .obra-caption h3 {
        font-size: 0.9rem;
    }
    .obra-caption p {
        font-size: 0.7rem;
    }
}
