body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #ffffff;
    
    background-image: url('Imagenes/gaf-clickz-gryMACx9reI-unsplash.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: ''; 
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.541); 
    z-index: -1; 
}

.container {
    width: 100%;
    max-width: 2500px;
    margin: auto;
    padding: 5px;
    position: relative;
    z-index: 2;
}

/* ---- Header ---- */
header {
    position: relative;
    color: #fff;
    padding: 20px 0 10px 0;
    text-align: center;
    border-bottom: 4px solid #1c492e;
    
    background-image: url('Imagenes/buzz-andersen-E4944K_4SvI-unsplash.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 10;
    will-change: transform;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(27, 32, 29, 0.7);
    z-index: -1;
}

.logo{
    /* Ajustes para un mejor control del logo */
    width: 400px;
    max-width: 80%; /* Asegura que sea responsivo */
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 0; 
    margin-left: 0; 
    height: auto;
    display: block;
    margin: 0 0 5px 0;
}
.header-content {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    padding: 0 10px; 
}

.header-titles {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem; 
    font-weight: 700;
    letter-spacing: 1px; 
    margin: 0;
    color: rgb(0, 255, 34);
}

.slogan {
    font-size: 1rem;
    margin-top: 5px;
    letter-spacing: 1px;
    width: 100%;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; 
    font-style: bold; 
    color: #88f74d;
}

header h1, .slogan {
    position: relative;
    z-index: 1;
}

/* ---- Menú ---- */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #a8ff78;
}

/* ---- Secciones ---- */
.section {
    background-color: #ffffff;
    padding: 30px;
    margin: 30px 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 3;
    /* Asegurar que el texto dentro de la sección blanca sea oscuro */
    color: #333; 
}

.section h2 {
    color: #2c7744;
    border-bottom: 3px solid #38955d;
    padding-bottom: 15px;
    margin-top: 0;
    font-size: 2rem;
    font-weight: 600;
}

/* ---- Servicios ---- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.service-card {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.service-card .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
}

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

.service-card h3 {
    color: #2c7744;
    margin-top: 0;
    font-size: 1.5rem;
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    color: #666;
    display: flex;
    align-items: center;
}

ul li:before {
    content: '✓';
    color: #38955d;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: 10px;
}

ul li:last-child {
    border-bottom: none;
}

/* ---- Contacto ---- */
.contact-info {
    background-color: #2c7744;
    color: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    margin: 30px 0;
    position: relative;
    z-index: 3;
}

.contact-info p {
    margin: 10px 0;
    font-size: 1.2rem;
}

.contact-info strong {
    font-weight: 600;
}

/* ARREGLO CLAVE: Estilo para los enlaces de contacto (email y teléfono) */
.contact-info a {
    color: #a8ff78; /* Verde claro para buen contraste sobre el fondo oscuro */
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ---- Footer ---- */
footer {
    text-align: center;
    padding: 20px 0;
    color: #888;
    font-size: 0.9rem;
    position: relative;
    z-index: 3;
}

/* ---- Trabajos ---- */
.works-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.work-item {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
}

.work-text {
    flex: 1;
    padding: 2rem;
    z-index: 2; 
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px 0 0 12px;
}

.work-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c7744;
}

.work-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.work-image {
    position: relative;
    flex: 1;
    max-width: 50%;
    overflow: hidden;
}

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

.image-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Responsive para trabajos */
@media (max-width: 768px) {
    .work-item {
        flex-direction: column;
    }
    .work-text {
        border-radius: 12px 12px 0 0;
    }
    .work-image {
        max-width: 100%;
    }
}

/* ---- Carrusel ---- */
.mi-carrusel {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carrusel-interior {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carrusel-item {
    min-width: 100%;
    position: relative;
    display: none;
}

.carrusel-item.activo {
    display: block;
}

.carrusel-item img {
    width: 100%;
    height: auto;
    display: block;
}

.carrusel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    text-align: center;
}

.carrusel-caption h5 {
    margin: 0 0 5px 0;
    font-size: 1.5em;
}

.carrusel-caption p {
    margin: 0;
    font-size: 1em;
}

.carrusel-control-anterior,
.carrusel-control-siguiente {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    font-size: 1.5em;
    transition: background-color 0.2s ease;
}

.carrusel-control-anterior:hover,
.carrusel-control-siguiente:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.carrusel-control-anterior {
    left: 10px;
}

.carrusel-control-siguiente {
    right: 10px;
}

.carrusel-indicadores {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.indicador {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.indicador.activo {
    background-color: white;
    border-color: white;
}

/* ---- Preview sections for index page ---- */
.preview-section {
    text-align: center;
}

.button-container {
    margin-top: 20px;
    text-align: center;
}

.btn-primary {
    display: inline-block;
    background-color: #2c7744;
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-primary:hover {
    background-color: #1c492e;
    color: white;
}

/* ---- Contact page layout ---- */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.contact-info h3, .contact-form h3 {
    color: #2c7744;
    margin-top: 0;
}

.google-form-container {
    width: 100%;
    margin-top: 20px;
}

.google-form-container iframe {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.contact-info a {
    color: #38955d;
    text-decoration: none;
    font-weight: bold;
}

.contact-info a:hover {
    color: #2c7744;
    text-decoration: underline;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c7744;
    box-shadow: 0 0 5px rgba(44, 119, 68, 0.3);
}

.map-placeholder {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
}

/* ---- Active navigation link ---- */
nav.main-nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #a8ff78;
    font-weight: bold;
}

/* ---- Responsive general ---- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    header p {
        font-size: 1rem;
    }
    .section h2 {
        font-size: 1.5rem;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
    
    .contact-content {
        grid-template-columns: 1fr; /* Stack elements on mobile */
    }
}

/* ====== Menú responsive tipo hamburguesa ====== */
.menu-toggle {
    display: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 20;
    
    /* ARREGLO CLAVE: Reset para que el <button> se vea como un ícono */
    background: none; 
    border: none;    
    padding: 0;      
    line-height: 1;  
}

/* --- En pantallas pequeñas --- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-titles {
        align-items: flex-start;
        text-align: left;
    }
    
    .menu-toggle {
        display: block;
        margin-left: auto; /* Position menu toggle to the right */
    }

    .main-nav {
        display: none;
        background-color: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        text-align: center;
        padding: 15px 0;
        z-index: 15;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        margin: 0;
        justify-content: flex-start;
    }

    .main-nav.active {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
}