/* ========================================
   COLOR VARIABLES & RESET
   ======================================== */
:root {
    --color-principal: #5A3E2B;   /* marrón oscuro */
    --color-secundario: #F4B400;  /* amarillo solar */
    --color-fondo: #EFE6D8;       /* beige suave */
    --color-blanco: #FFFFFF;
    --color-texto: #3A2A1A;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to bottom, #EFE6D8, #E4D4B5), url('images/textura.png');
    background-size: cover;
    background-attachment: fixed;
    color: var(--color-texto);
    padding-top: 60px;
}


/* ========================================
   HEADER & NAVIGATION
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 40px;
    background: #EFE6D8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

header h1 {
    margin: 0;
}

.logo {
    height: auto;
    width: 70px;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--color-principal);
    font-weight: 600;
    position: relative;
    transition: 0.3s;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--color-secundario);
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

nav a:hover {
    color: var(--color-secundario);
}

nav a:hover::after {
    width: 100%;
}


/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.4)), 
                url('images/fondo-hero.jpeg') center/cover no-repeat;
    color: white;
}

.hero h2 {
    font-size: 40px;
    margin-bottom: 10px;
    color: white;
}

.hero p {
    font-size: 20px;
    margin-bottom: 20px;
}


/* ========================================
   BUTTONS
   ======================================== */
.btn {
    background: linear-gradient(45deg, #F4B400, #FFD95A);
    padding: 14px 24px;
    color: #3A2A1A;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: 0.3s;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}


/* ========================================
   SECTIONS (General Styling)
   ======================================== */
section {
    margin: 50px auto;
    max-width: 1100px;
    background: rgba(255,255,255,0.85);
    border-radius: 12px;
    padding: 50px 30px;
    border: 1px solid rgba(90, 62, 43, 0.15);
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    backdrop-filter: blur(6px);
}

section h2 {
    margin-bottom: 20px;
    color: var(--color-principal);
}

section p,
section li {
    line-height: 1.6;
}

/* Section Backgrounds */
.servicios {
    background: linear-gradient(135deg, #ffffff, #E6D6B8);
    text-align: center;
    padding: 60px 20px;
}

.trabajos {
    background: linear-gradient(135deg, #EDE3D3, #D6C2A1);
    text-align: center;
    padding: 60px 20px;
}

.beneficios {
    text-align: center;
    padding: 50px 20px;
}

.beneficios-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.beneficio-card {
    background: rgba(255,255,255,0.9);
    padding: 25px;
    width: 320px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
    text-align: left;
}

.beneficio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.beneficio-card h3 {
    color: var(--color-principal);
    margin-bottom: 10px;
    text-align: center;
}

.beneficio-card p {
    line-height: 1.6;
}

.contacto {
    background: linear-gradient(135deg, #F4B40040, #E2C47A);
}


/* ========================================
   CARDS (Servicios)
   ======================================== */
.cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.card {
    background: rgba(255,255,255,0.9);
    padding: 20px;
    width: 280px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card h3 {
    margin-top: 10px;
}

.card p {
    padding: 0 10px 20px;
}


/* ========================================
   GALLERY (Trabajos)
   ======================================== */
.galeria {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.galeria img {
    width: 300px;
    border-radius: 10px;
    transition: 0.3s;
}

.galeria img:hover {
    transform: scale(1.05);
}


/* ========================================
   GALLERY PAGE (Grid)
   ======================================== */
.galeria-page {
    text-align: center;
    padding: 60px 20px;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: auto;
}

.galeria-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.galeria-grid img:hover {
    transform: scale(1.05);
}


/* ========================================
   LIGHTBOX MODAL
   ======================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox-img {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 80%;
    animation: zoomIn 0.3s ease;
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.cerrar {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}


/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
    }
    to {
        transform: scale(1);
    }
}


/* ========================================
   FLOATING WHATSAPP
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
}

.whatsapp-float img {
    width: 100%;
}


/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--color-principal);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-item a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.footer-item a:hover {
    color: var(--color-secundario);
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    nav {
        margin-top: 10px;
    }

    nav a {
        margin-left: 15px;
    }

    .cards {
        flex-direction: column;
        align-items: center;
    }
}