/* ==========================================================================
   Componentes reutilizables (títulos, tarjetas, carruseles, pestañas,
   formularios, acordeones, galerías, lightbox)
   ========================================================================== */

/* ---------- Títulos y texto ---------- */
.title-xl { color: #fff; font-size: 50px; font-weight: 700; line-height: 1; }
.title-lg { color: #fff; font-size: 35px; font-weight: 700; line-height: 1; }
.title-md { color: #fff; font-size: 35px; font-weight: 700; line-height: 1.1; margin-bottom: 25px; }
.kicker { color: #fff; font-size: 15px; font-weight: 500; line-height: 1; text-transform: uppercase; letter-spacing: .5px; }
.lead { color: #fff; font-size: 16px; line-height: 1.5; }

.rich-text { color: #fff; font-size: 16px; line-height: 1.5; }
.rich-text p + p { margin-top: 1em; }
.rich-text a { color: var(--c-red); text-decoration: underline; }
.rich-text--justify { text-align: justify; }

@media (max-width: 1024px) {
    .title-xl { font-size: 40px; }
    .title-lg { font-size: 30px; }
}
@media (max-width: 767px) {
    .title-xl { font-size: 32px; line-height: 1.1; }
    .title-lg, .title-md { font-size: 28px; }
}

/* ---------- Tarjetas ---------- */
.card { background: var(--c-card); border-radius: var(--radius); }

.mini-card {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--c-card-2); border-radius: var(--radius); padding: 28px;
}
.mini-card-icon { width: 20px; height: 20px; fill: var(--c-red); }
.mini-card h3 { color: #fff; font-size: 19px; font-weight: 600; line-height: 1.2; margin-bottom: 8px; }

.check-item { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 16px; line-height: 1.4; }
.check-item svg { width: 14px; height: 14px; flex-shrink: 0; fill: var(--c-primary); }

/* ---------- Carrusel / slider ---------- */
.slider { position: relative; }
.slider-viewport { overflow: hidden; }
.slider-track {
    --per-view: 1; --gap: 20px;
    display: flex; gap: var(--gap);
    transition: transform .5s var(--ease);
    will-change: transform;
}
.slider-slide { flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view)); min-width: 0; }
.slider-slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-dots { display: none; justify-content: center; gap: 8px; margin-top: 16px; }
.slider-dots button {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .35); transition: background-color .3s ease, transform .3s ease;
}
.slider-dots button.is-active { background: #fff; transform: scale(1.2); }
.slider.has-dots .slider-dots { display: flex; }
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .6); color: #fff; border: 2px solid rgba(255, 255, 255, .2);
    font-size: 20px; transition: all .3s ease; user-select: none;
}
.slider-arrow:hover { background: #ef4135; border-color: #ef4135; }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }

/* ---------- Pestañas ---------- */
.tabs-nav { display: flex; border-bottom: 1px solid var(--c-accent); margin-bottom: 30px; }
.tab-btn {
    position: relative; padding: 15px 35px; background: transparent; border: 0;
    color: var(--c-gray-ee); font-size: 16px; font-weight: 500; line-height: 24px;
    transition: color .3s ease;
}
.tab-btn::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--c-red); transform: scaleX(0); transition: transform .3s ease;
}
.tab-btn:hover { color: #fff; }
.tab-btn.is-active { color: #fff; }
.tab-btn.is-active::after { transform: scaleX(1); }
.tab-panel { animation: tab-in .4s var(--ease); }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Formularios ---------- */
.form-grid { display: flex; flex-wrap: wrap; margin: 0 -5px; row-gap: 10px; }
.form-field { padding: 0 5px; }
.form-field.col-50 { flex: 0 0 50%; }
.form-field.col-100 { flex: 0 0 100%; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form input[type="number"],
.form input[type="date"], .form select, .form textarea {
    width: 100%; padding: 10px 16px; border: 1px solid #69727D; border-radius: 4px;
    background: transparent; color: #fff; font: inherit; font-size: 16px; line-height: 1.4;
    transition: border-color .3s ease;
}
.form textarea { resize: vertical; min-height: 126px; padding: 6px 16px; }
.form ::placeholder { color: #9B9B9B; opacity: 1; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--c-red); }
.form .is-invalid { border-color: var(--c-red) !important; }
.btn--submit { padding: 10px 80px; height: 40px; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 12px; font-size: 15px; min-height: 1.4em; color: #ccc; }
.form-status.is-success { color: #6fdc8c; }
.form-status.is-error { color: #ff7a70; }
.form.is-sending .btn--submit { opacity: .6; pointer-events: none; }

@media (max-width: 767px) {
    .form-field.col-50 { flex-basis: 100%; }
    .btn--submit { width: 100%; }
}

/* ---------- Acordeón ---------- */
.accordion-item { margin-bottom: 10px; }
.accordion-header {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 15px 10px; background: transparent; border: 1px solid var(--c-gray-555);
    color: var(--c-gray-555); font-size: 16px; font-weight: 500; line-height: 1.2; text-align: left;
    transition: color .3s ease, border-color .3s ease;
}
.accordion-item.is-open .accordion-header, .accordion-header:hover { color: #fff; }
.accordion-icon { position: relative; width: 12px; height: 12px; flex-shrink: 0; }
.accordion-icon::before, .accordion-icon::after {
    content: ''; position: absolute; left: 0; top: 50%; width: 12px; height: 2px; background: currentColor;
    transition: transform .3s ease;
}
.accordion-icon::after { transform: rotate(90deg); }
.accordion-item.is-open .accordion-icon::after { transform: rotate(0deg); }
.accordion-content {
    padding: 15px; border: 1px solid var(--c-gray-ee); border-top: 0;
    color: var(--c-gray-ee); font-size: 16px; line-height: 1.7;
}

/* ---------- Mosaico de fotos (6 imágenes) ---------- */
.mosaic {
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 280px 280px; gap: 16px;
    width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px;
}
.mosaic-item {
    position: relative; overflow: hidden; border: 0; padding: 0; border-radius: 5px;
    background: #f0e8df; box-shadow: 0 4px 12px rgba(0, 0, 0, .05); cursor: zoom-in;
}
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .3s ease; }
.mosaic-item:hover img { transform: scale(1.03); filter: brightness(.9); }
.mosaic-1 { grid-column: 1; grid-row: 1; }
.mosaic-2 { grid-column: 1; grid-row: 2; }
.mosaic-3 { grid-column: 2; grid-row: 1; height: 320px; z-index: 2; }
.mosaic-4 { grid-column: 2; grid-row: 2; margin-top: 40px; height: 240px; }
.mosaic-5 { grid-column: 3; grid-row: 1; height: 240px; }
.mosaic-6 { grid-column: 3; grid-row: 2; margin-top: -40px; height: 320px; z-index: 2; }

@media (max-width: 768px) {
    .mosaic { grid-template-columns: 1fr; grid-template-rows: auto; gap: 12px; padding: 0; }
    .mosaic-item { display: none; }
    .mosaic-1, .mosaic-2 { display: block; grid-column: 1; grid-row: auto; height: 280px; margin-top: 0; }
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 100000; padding: 20px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .85); opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.is-active { opacity: 1; visibility: visible; }
.lightbox-inner { position: relative; max-width: 90%; max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); object-fit: contain; transform: scale(.96); transition: transform .3s ease; }
.lightbox.is-active img { transform: scale(1); }
.lightbox-close { position: absolute; top: -40px; right: 0; background: none; border: 0; color: #fff; font-size: 32px; line-height: 1; }
.lightbox-nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); border: 0; color: #fff; font-size: 26px; width: 46px; height: 46px; border-radius: 50%; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
