/* ───────── Serveis (Zen + paleta Rosa/Verd) ───────── */
@import url('https://fonts.googleapis.com/css2?family=Zen+Antique+Soft:wght@400;700&family=Zen+Maru+Gothic:wght@400;500;700&display=swap');

:root{
    --rosa: rgba(252,210,232,.58);
    --verd: rgba(223,243,164,.57);
    --primary-color:#8B4513;     /* fallback */
    --secondary-color:#D2B48C;   /* fallback */
    --accent-color:#228B22;      /* fallback */
    --text-dark:#2C3E50;
}

h1,h2,h3,.section-title{ font-family:"Zen Antique Soft", Georgia, serif; }
p,li,blockquote,button,.btn{ font-family:"Zen Maru Gothic", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

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

/* ───────── Header MUY fino y blanco ───────── */
.serveis-hero{
    background:#fff;
    color: var(--text-dark, #2C3E50);
    padding: 24px 0;                           /* fino */
    border-bottom: 1px solid rgba(0,0,0,.06);
    text-align:center;
}
.serveis-hero .display-4{
    font-family:"Zen Antique Soft", Georgia, serif;
    font-size: clamp(1.6rem, 3.6vw, 2.3rem);
    margin: 0 0 .25rem 0;
    line-height: 1.15;
}
.serveis-hero .lead{
    font-family:"Zen Maru Gothic", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: clamp(.95rem, 2vw, 1.05rem);
    color:#6b6f76;
    margin:0;
}
@media (max-width: 991.98px){
    .serveis-hero{ padding: 18px 0; }          /* aún más fino en móvil */
}

/* ───────── Accordion horizontal ───────── */
.serveis-accordion{
    display:flex; gap:16px;
    height: clamp(420px, 62vh, 680px);
}
.serveis-panel{
    position:relative;
    flex:1 1 0%;
    min-width:0;
    border-radius:22px;
    overflow:hidden;
    cursor:pointer;
    color:#fff;
    background-image:
            linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 60%, rgba(0,0,0,0) 100%),
            var(--photo);
    background-size: cover;
    background-position: center;
    box-shadow:
            0 16px 36px rgba(0,0,0,.14),
            inset 0 0 0 4px var(--frame, transparent);
    transition: flex .45s ease, transform .4s ease, box-shadow .3s ease;
}
.serveis-accordion:hover .serveis-panel{ flex:1; }
.serveis-panel:hover,
.serveis-panel.is-active{
    flex: 2.8;
    transform: translateY(-2px);
    box-shadow:
            0 26px 64px rgba(0,0,0,.22),
            inset 0 0 0 4px var(--frame, transparent);
}

/* Contenido del panel */
.panel-content{
    position:relative;
    z-index:2;
    display:flex; flex-direction:column;
    padding: 26px 22px;
    height: 100%;
    justify-content: flex-end;
}
.panel-title{
    margin: 0 0 6px 0; color:#fff;
    text-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.panel-sub{
    margin: 0 0 10px 0; color:#e9efe9;
}
.panel-bullets{
    list-style:none; margin:0; padding:0;
    max-height: 0; overflow:hidden;
    opacity: 0;
    transition: max-height .45s ease, opacity .45s ease;
}
.panel-bullets li{
    padding: 2px 0 2px 18px; position:relative; font-size:.98rem;
}
.panel-bullets li::before{
    content:"—"; position:absolute; left:0; top:0; opacity:.95;
}
.serveis-panel:hover .panel-bullets,
.serveis-panel.is-active .panel-bullets{
    max-height: 320px; opacity: 1;
}
.panel-actions{ margin-top: 14px; }
.btn-panel{
    display:inline-block;
    background: rgba(255,255,255,.14);
    border: 1.5px solid rgba(255,255,255,.55);
    color:#fff; padding: 10px 16px; border-radius:12px;
    backdrop-filter: blur(2px);
    text-decoration:none;
}
.btn-panel:hover{ background: rgba(255,255,255,.22); color:#fff; }

/* ───────── CTA ───────── */
.serveis-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    text-align: center;
}

.serveis-cta h2 {
    color: #fff;
}

.serveis-cta p.lead {
    color: #f8f9fa;
}
/* ───────── Carrusel (altura estable) ───────── */
.serveis-carousel{ height: clamp(240px, 45vw, 420px); }
.serveis-carousel .carousel-item,
.serveis-carousel .carousel-item img{ height:100%; }
.serveis-carousel .carousel-item img{ object-fit: cover; }

/* ───────── Responsive: apilar en mòbil ───────── */
@media (max-width: 991.98px){
    .serveis-accordion{ flex-direction: column; height:auto; }
    .serveis-panel{ min-height: 320px; }
    .serveis-panel:hover{ transform:none; }
}
/* Contenedor ancho para la galeria */
.container-wide{ max-width: min(1320px, 94vw); }

/* Galeria GRID (más grande) */
.serveis-gallery{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
    gap:18px;
    margin-bottom: 10px;
}
@media (min-width: 1400px){
    .serveis-gallery{ grid-template-columns: repeat(3, 1fr); }
}
.serveis-gallery a{
    display:block; position:relative; border-radius:18px; overflow:hidden;
    box-shadow:0 14px 34px rgba(0,0,0,.12);
    aspect-ratio: 4 / 3;           /* tamaño uniforme y grande */
    background:#000;
}
.serveis-gallery img{
    width:100%; height:100%; object-fit: cover; object-position:center;
    transition: transform .45s ease, filter .45s ease;
}
.serveis-gallery a:hover img{ transform: scale(1.06); filter: brightness(1.05); }

/* Lightbox simple */
.sg-lightbox{
    position:fixed; inset:0; z-index:1060;
    display:none; align-items:center; justify-content:center;
    background: rgba(0,0,0,.86); padding:6vh 6vw;
}
.sg-lightbox.open{ display:flex; }
.sg-lightbox img{
    max-width:100%; max-height:88vh; border-radius:12px;
    box-shadow:0 30px 80px rgba(0,0,0,.5);
}
.sg-close{
    position:absolute; top:16px; right:20px; border:0; background:transparent;
    color:#fff; font-size:2.1rem; line-height:1; cursor:pointer;
}
/* ---- Header fino, blanco y con offset anti-navbar ---- */
:root{ --nav-h: 92px; }          /* ajusta si tu navbar es más alto/bajo */

.serveis-hero{
    background:#fff;
    color: var(--text-dark, #2C3E50);
    padding: calc(var(--nav-h) + 8px) 0 22px;   /* empuja por debajo del navbar */
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.serveis-hero h1{ margin:0; font-weight:700; }
.serveis-hero .lead{ margin:6px 0 0; color: rgba(0,0,0,.62); }

/* móvil: navbar suele ser más bajito */
@media (max-width: 991.98px){
    :root{ --nav-h: 72px; }
    .serveis-hero{ padding: calc(var(--nav-h) + 6px) 0 18px; }
}

/* que cualquier ancla aterrice por debajo del navbar */
section{ scroll-margin-top: calc(var(--nav-h) + 12px); }
/* Galeria de cavalls més compacta */
.horse-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* miniatures més petites */
    gap: 12px;
}
.horse-gallery a {
    aspect-ratio: 1 / 1; /* quadrades */
}
.sg-prev, .sg-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    background: rgba(0,0,0,.35);
    border: none;
    padding: 10px 14px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}
.sg-prev { left: 20px; }
.sg-next { right: 20px; }
.sg-prev:hover, .sg-next:hover { background: rgba(0,0,0,.55); }
/* Miniatures uniformes a les galeries */
.serveis-gallery a,
.horse-gallery a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;     /* totes quadrades */
    background: #000;        /* fons negre per si no carrega la foto */
}

.serveis-gallery img,
.horse-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* retalla però manté proporcions */
    object-position: center; /* centra la imatge */
    transition: transform .3s ease, filter .3s ease;
}

.serveis-gallery a:hover img,
.horse-gallery a:hover img {
    transform: scale(1.05);
    filter: brightness(1.05);
}