/* ==========================================
   PALETA DE COLORES NOBLE MADERA
   ==========================================

   Colores principales:
   - Nogal Oscuro: #4A3728 (principal, header, footer)
   - Caoba: #8B5A3C (secundario, acentos)
   - Arena: #E8DCC4 (fondos claros)
   - Verde Bosque: #2C5F2D (detalles, hover)
   - Crema: #F5F1E8 (fondo principal)
   - Negro Suave: #2B2B2B (texto)
   - Dorado: #C9A961 (acentos especiales)
*/

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-nogal: #4A3728;
    --color-caoba: #8B5A3C;
    --color-arena: #E8DCC4;
    --color-verde: #2C5F2D;
    --color-crema: #F5F1E8;
    --color-texto: #2B2B2B;
    --color-dorado: #C9A961;
    --color-blanco: #FFFFFF;
    --transicion: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--color-texto);
    background-color: var(--color-crema);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ==========================================
   HEADER Y NAVEGACIÓN
   ========================================== */

.header {
    background: linear-gradient(135deg, var(--color-nogal) 0%, #5a4536 100%);
    color: var(--color-crema);
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-dorado);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.tagline {
    font-size: 0.85rem;
    color: var(--color-arena);
    font-style: italic;
    margin-top: -5px;
}

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

.nav-link {
    color: var(--color-crema);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transicion);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-dorado);
    transition: var(--transicion);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--color-dorado);
}

.nav-link:hover::after {
    width: 80%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-crema);
    border-radius: 2px;
    transition: var(--transicion);
}

/* ==========================================
   SECCIÓN HERO - CARRUSEL
   ========================================== */

.hero {
    margin-top: 90px;
    height: 600px;
    position: relative;
    overflow: hidden;
}

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

.carousel-container {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.8s ease-in-out;
}

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

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transicion);
}

.indicator.active {
    background-color: var(--color-dorado);
    transform: scale(1.2);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(74, 55, 40, 0.4) 0%,
        rgba(74, 55, 40, 0.7) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: var(--color-blanco);
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    color: var(--color-dorado);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

/* ==========================================
   BOTONES
   ========================================== */

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transicion);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-caoba) 0%, #a66e4a 100%);
    color: var(--color-blanco);
    box-shadow: 0 4px 15px rgba(139, 90, 60, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a66e4a 0%, var(--color-caoba) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 90, 60, 0.6);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #1ebe57 100%);
    color: var(--color-blanco);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #1ebe57 0%, #25D366 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    font-size: 1.5rem;
    vertical-align: middle;
}

/* ==========================================
   SECCIÓN QUIÉNES SOMOS
   ========================================== */

.about {
    padding: 5rem 0;
    background-color: var(--color-blanco);
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-nogal);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-caoba), var(--color-dorado));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-caoba);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    font-style: italic;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
}

.about-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: 10px;
    bottom: 10px;
    border: 3px solid var(--color-dorado);
    border-radius: 15px;
    z-index: -1;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    transition: var(--transicion);
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text h3 {
    font-size: 1.8rem;
    color: var(--color-caoba);
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    text-align: justify;
}

.about-features {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--color-arena);
    border-radius: 10px;
    transition: var(--transicion);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-caoba);
}

.feature span:last-child {
    font-weight: 600;
    color: var(--color-nogal);
    text-align: center;
    font-size: 0.95rem;
}

/* ==========================================
   SECCIÓN NUESTROS TRABAJOS
   ========================================== */

.portfolio {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--color-crema) 0%, var(--color-arena) 100%);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: var(--transicion);
    aspect-ratio: 1;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transicion);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(74, 55, 40, 0.7) 100%
    );
    opacity: 0;
    transition: var(--transicion);
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ==========================================
   SECCIÓN CONTACTO
   ========================================== */

.contact {
    padding: 5rem 0;
    background-color: var(--color-blanco);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    align-items: center;
}

.contact-info h3 {
    font-size: 2rem;
    color: var(--color-nogal);
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.contact-action {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--color-arena) 0%, var(--color-crema) 100%);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-phone {
    margin-top: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-caoba);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: linear-gradient(135deg, var(--color-nogal) 0%, #3a2918 100%);
    color: var(--color-arena);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin: 0.5rem 0;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-nogal);
        padding: 1rem 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        display: block;
        padding: 1rem 2rem;
    }

    .hero {
        height: 400px;
        margin-top: 80px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* ==========================================
   UTILIDADES Y ANIMACIONES
   ========================================== */

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Placeholder para imagen de equipo si no existe */
#teamImage {
    background: linear-gradient(135deg, var(--color-arena) 0%, var(--color-crema) 100%);
    min-height: 400px;
    width: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

#teamImage[src=""] {
    opacity: 0;
}

#teamImage:not([src=""]) {
    opacity: 1;
}

/* ==========================================
   MODAL DE IMAGEN
   ========================================== */

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.3s ease;
}

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

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background-color: var(--color-caoba);
    color: var(--color-blanco);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transicion);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    background-color: var(--color-dorado);
    transform: rotate(90deg);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(139, 90, 60, 0.8);
    color: var(--color-blanco);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transicion);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-nav:hover {
    background-color: rgba(201, 169, 97, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

.modal-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(74, 55, 40, 0.8);
    color: var(--color-crema);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
}

/* Agregar indicador de clic en miniaturas */
.gallery-item::before {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 300;
    color: var(--color-blanco);
    opacity: 0;
    transition: var(--transicion);
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background-color: rgba(139, 90, 60, 0.9);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.gallery-item:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 768px) {
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .modal-nav.prev {
        left: 10px;
    }

    .modal-nav.next {
        right: 10px;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .modal-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 8px 15px;
    }

    .modal-content {
        max-width: 95%;
    }
}
