/* ==========================================================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================================================== */
:root {
    /* Paleta Principal */
    --c-prim-bg: #F9F5F0;
    --c-prim-text: #2D1601;
    --c-prim-acc1: #B29475;
    --c-prim-acc2: #8A6D55;
    --c-soft-section-bg: #f1ebd8;
    
    /* Paleta Secundaria */
    --c-sec-1: #1E1A14;
    --c-sec-2: #826953;
    --c-sec-3: #8C6353;
    --c-sec-4: #432B26;

    /* Tipografías */
    --font-titles: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Layout */
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 81px; /* Ajustado exactamente al alto del navbar móvil para que no asome la sección anterior */
}

@media (min-width: 1024px) {
    html {
        scroll-padding-top: 82px; /* Altura del navbar en desktop */
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--c-prim-bg);
    color: var(--c-prim-text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-titles);
    color: var(--c-sec-1);
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 0;
}

.bg-secondary {
    background-color: var(--c-soft-section-bg); /* Tono muy suave derivado para separar secciones */
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn-primary {
    display: inline-block;
    background-color: var(--c-prim-acc2);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--c-sec-4);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--c-sec-4);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    border: 2px solid var(--c-prim-acc2);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--c-prim-acc2);
    color: #fff;
    transform: translateY(-2px);
}

.btn-large {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    margin: 0.5rem;
}

/* ==========================================================================
   BOTONES FLOTANTES (RRSS)
   ========================================================================== */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.btn-float {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.btn-float:hover {
    transform: scale(1.1);
}

.btn-wsp {
    background-color: #25D366;
}

.btn-ig {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    background-color: var(--c-prim-acc2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

.logo-img {
    max-height: 55px;
    width: auto;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

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

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

.nav-links a {
    font-weight: 500;
    color: #fff;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--c-prim-acc1);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 5%;
    gap: 2rem;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
}

.hero-image {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: min(100%, 520px);
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
}

/* ==========================================================================
   SOBRE NOSOTROS
   ========================================================================== */
.sobre-nosotros-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.sobre-nosotros-text p {
    margin-bottom: 1rem;
}

.sobre-nosotros-text ul {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.sobre-nosotros-text li {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   NUESTROS TRABAJOS (CARROUSEL)
   ========================================================================== */
.trabajos .container {
    position: relative;
}

.carousel-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 15px 0; /* Espacio para que no se corte la sombra de las imágenes */
}

.carousel-track {
    display: flex;
    list-style: none;
    transition: transform 0.4s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%; /* Cada imagen ocupa todo el ancho, sin asomar la siguiente */
    padding: 0 10px; /* Separación entre imágenes */
}

.carousel-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); /* Movimos la sombra a cada foto directamente */
}

.carousel-btn {
    background: var(--c-prim-bg);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--c-sec-1);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: var(--c-prim-acc1);
    color: #fff;
}

.carousel-btn.prev {
    left: -10px;
}

.carousel-btn.next {
    right: -10px;
}

/* ==========================================================================
   UBICACIÓN
   ========================================================================== */
.locations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.location-card {
    background: var(--c-prim-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

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

.location-img img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.location-info {
    padding: 1.5rem;
    text-align: center;
}

.location-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--c-prim-acc2);
    font-weight: 500;
    transition: color 0.3s ease;
    text-decoration: none;
}

.location-link:hover {
    color: var(--c-sec-4);
}

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.servicios-intro {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-category {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.service-category h3 {
    color: var(--c-prim-acc2);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--c-prim-bg);
    padding-bottom: 0.5rem;
}

.service-category ul {
    list-style-type: none;
}

.service-category li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-category li::before {
    content: '•';
    color: var(--c-prim-acc1);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.abordajes-section {
    margin-top: 4rem;
    text-align: center;
}

.abordajes-title {
    color: var(--c-sec-4);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.abordajes-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.abordaje-item {
    background-color: var(--c-soft-section-bg);
    color: var(--c-sec-4);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--c-prim-acc1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.abordaje-item:hover {
    transform: translateY(-3px);
    background-color: var(--c-prim-acc1);
    color: #fff;
}

.service-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--c-prim-bg);
    padding-bottom: 0.5rem;
}

.service-category-header h3 {
    margin-bottom: 0.25rem;
    border-bottom: none;
    padding-bottom: 0;
}

.service-brand {
    display: block;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--c-prim-acc1);
    font-family: var(--font-body);
    letter-spacing: 0.03em;
}

.service-brand-img {
    width: 150px;
    height: 120px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
}



/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contacto-msg {
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
    font-size: 1.1rem;
}

.contacto-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background-color: var(--c-sec-1);
    color: var(--c-prim-bg);
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    max-height: 80px;
    width: auto;

}

/* ==========================================================================
   MEDIA QUERIES (TABLET / DESKTOP)
   ========================================================================== */
@media (min-width: 768px) {
    .navbar {
        padding: 0.8rem 7%;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    .hero {
        flex-direction: row;
        align-items: center;
        height: auto;
        padding: 2rem 5%;
        gap: 1.5rem;
    }

    .hero-content {
        justify-content: center;
    }

    .hero-image {
        align-items: center;
    }

    .hero-image img {
        max-height: min(62dvh, 520px);
    }
    
    .locations-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .carousel-container {
        max-width: 800px;
    }
    
    .carousel-slide {
        flex: 0 0 33.333%;
        padding: 0 10px;
    }
}

@media (min-width: 1024px) {
    .carousel-container {
        max-width: 1100px;
    }
    
    .carousel-slide {
        flex: 0 0 25%;
    }
}

/* Desktop ancho con puntero fino: hero a pantalla completa */
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
    .hero {
        height: calc(100dvh - 82px);
        padding: 1.25rem 5%;
        gap: 2rem;
    }

    .hero-image img {
        max-height: min(74dvh, 620px);
    }
}

/* Nav + Hero ajustado para mobile */
@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }

    .navbar {
        padding: 0.8rem 5%;
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 1.5rem;
        padding: 1rem 0;
        background-color: var(--c-prim-acc2);
    }

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

@media (max-width: 767px) {
    p, li, a, span {
        font-size: 0.9rem;
    }

    .hero {
        padding: 3rem 0 2.5rem 0;
        gap: 1.5rem;
        min-height: auto;
        justify-content: flex-start;
        background-color: #ffffff;
    }

    .hero-content {
        flex: 0 0 auto;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
        width: 100%;
        padding: 0 5%;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 0.25rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        max-width: 32ch;
    }

    .hero-image {
        flex: 1 1 auto;
        width: 100%;
        margin-bottom: 0;
    }

    .hero-image img {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
    }

    .contacto-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .contacto-actions .btn-large {
        margin: 0;
        width: 100%;
    }

    .btn-primary, .btn-outline {
        font-size: 0.95rem;
        padding: 0.65rem 1.2rem;
    }
    .service-brand-img {
        width: 80px;
        height: 60px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .service-brand-img {
        width: 110px;
        height: 90px;
    }
}

/* Ajuste fino para anchos muy chicos */
@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .hero-image img {
        max-height: 220px;
        object-fit: cover;
    }
}
