:root {
    --primary: #1f6f78;
    --primary-dark: #15535a;
    --soft: #f4f8f7;
    --primary-soft: #eef7f6;
    --text: #24343a;
    --muted: #66777d;
    --border: #dfe8e6;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
}

a {
    text-decoration: none;
}

/* Navbar */
.navbar {
    min-height: 78px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
}

.nav-link {
    color: #334b53;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
}

/* Hero */
.hero-section {
    margin-top: 78px;
}

.hero-slide {
    min-height: 620px;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-1 {
    background:
        linear-gradient(
            135deg,
            rgba(21, 83, 90, 0.35),
            rgba(31, 111, 120, 0.15)
        ),
        url("https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?auto=format&fit=crop&w=1800&q=80")
            center / cover;
}

.hero-2 {
    background:
        linear-gradient(
            135deg,
            rgba(21, 83, 90, 0.25),
            rgba(31, 111, 120, 0.2)
        ),
        url("https://images.unsplash.com/photo-1551836022-d5d88e9218df?auto=format&fit=crop&w=1800&q=80")
            center / cover;
}

.hero-3 {
    background:
        linear-gradient(
            135deg,
            rgba(21, 83, 90, 0.3),
            rgba(31, 111, 120, 0.15)
        ),
        url("https://images.unsplash.com/photo-1529156069898-49953e39b3ac?auto=format&fit=crop&w=1800&q=80")
            center / cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(14, 39, 46, 0.82),
        rgba(14, 39, 46, 0.25)
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.hero-content h1,
.hero-content h2 {
    max-width: 850px;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.02;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.hero-content .lead {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    margin-bottom: 1.75rem;
}

#heroCarousel .carousel-indicators {
    bottom: 18px;
    margin-bottom: 0;
}

/* Sections */
.section-space {
    padding: 96px 0;
}

.bg-soft {
    background: var(--soft);
}

.bg-primary-soft {
    background: var(--primary-soft);
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 48px;
}

.section-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 800;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.12;
    font-weight: 750;
    margin-bottom: 1rem;
}

/* Cards */
.feature-card,
.service-card,
.team-card,
.video-card,
.contact-panel,
.contact-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(29, 61, 65, 0.06);
}

.feature-card,
.service-card {
    padding: 28px;
}

.feature-card h3,
.service-card h3,
.team-card h3,
.video-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.feature-card p,
.service-card p,
.video-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.icon-box,
.service-card > i {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

/* Process */
.process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.process-step {
    padding: 26px 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
}

.process-step span {
    color: var(--primary);
    font-weight: 800;
}

.process-step h3 {
    margin-top: 12px;
    font-size: 1.1rem;
}

.process-step p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Team */
.team-card {
    overflow: hidden;
}

.team-photo {
    min-height: 260px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #dbeceb, #f6fbfa);
    color: var(--primary);
    font-size: 5rem;
}

.team-role {
    color: var(--primary);
    font-weight: 700;
}

/* Certifications */
.cert-card {
    min-height: 150px;
    border: 1px dashed #b9d1cc;
    border-radius: 20px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 20px;
}

.cert-card i {
    color: var(--primary);
    font-size: 2.2rem;
}

/* Placeholders */
.image-placeholder,
.gallery-item,
.map-placeholder,
.video-placeholder {
    border: 1px dashed #b9d1cc;
    background: linear-gradient(135deg, #eef7f6, #f9fbfb);
    color: var(--primary);
    border-radius: 18px;
}

.image-placeholder {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.image-placeholder i {
    font-size: 2.4rem;
}

.tall-placeholder {
    min-height: 460px;
}

.family-placeholder {
    min-height: 360px;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Videos */
.video-card {
    overflow: hidden;
}

.video-placeholder {
    display: grid;
    place-items: center;
    font-size: 4rem;
}

/* FAQ */
.faq-accordion {
    max-width: 860px;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

/* CTA */
.cta-section {
    padding: 84px 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
}

.cta-section h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    margin: 0.5rem 0 1rem;
}

.cta-section p {
    max-width: 700px;
    margin: 0 auto 1.5rem;
    color: rgba(255, 255, 255, 0.88);
}

/* Contact */
.contact-panel,
.contact-form {
    padding: 30px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--muted);
}

.contact-list i {
    color: var(--primary);
    font-size: 1.25rem;
}

.map-placeholder {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
}

.map-placeholder i {
    font-size: 2.5rem;
    display: block;
}

.form-control {
    min-height: 48px;
    border-radius: 12px;
    border-color: var(--border);
}

textarea.form-control {
    min-height: 140px;
}

/* Footer */
.site-footer {
    background: #17363c;
    color: rgba(255, 255, 255, 0.82);
    padding: 64px 0 28px;
}

.brand-mark-footer {
    background: #fff;
    color: var(--primary-dark);
}

.footer-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.78);
}

.site-footer hr {
    border-color: rgba(255, 255, 255, 0.15);
    margin: 32px 0 20px;
}

/* Back to top */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease,
        background 0.2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* Eventos carousel */

#eventosCarousel .evento-media {
    display: flex;
    justify-content: center;
    align-items: center;
}

#eventosCarousel .evento-imagen {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 560px;
    object-fit: contain;
}

#eventosCarousel .carousel-control-prev,
#eventosCarousel .carousel-control-next {
    width: 56px;
}

#eventosCarousel .carousel-control-prev-icon,
#eventosCarousel .carousel-control-next-icon {
    width: 42px;
    height: 42px;
    background-size: 22px;
    background-color: rgba(31, 111, 120, 0.85);
    border-radius: 50%;
}

#eventosCarousel .carousel-control-prev {
    left: 8px;
}

#eventosCarousel .carousel-control-next {
    right: 8px;
}

/* Responsive: tablets */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 16px 0 20px;
    }

    .hero-slide {
        min-height: 600px;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive: >= 576px */
@media (min-width: 576px) {
    .hero-slide {
        align-items: flex-start;
    }

    .hero-content {
        width: 100%;
        padding-top: 60px;
        padding-bottom: 80px;
    }
}

/* Responsive: mobile */
@media (max-width: 767.98px) {

    #eventosCarousel .evento-imagen {
        max-height: 480px;
    }
    .section-space {
        padding: 72px 0;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 2.6rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item {
        min-height: 170px;
    }

}

/* Responsive: small mobile */
@media (max-width: 575.98px) {
    .hero-slide {
        min-height: 590px;
        align-items: flex-start;
    }

    .hero-content {
        width: 100%;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

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

    .navbar-brand strong {
        font-size: 0.92rem;
    }

    .navbar-brand small {
        display: none;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

html, body {
    overflow-x: hidden;
}

.contact-list a {
    color: inherit;
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nosotros-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.familia-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.navbar-logo {
  width: 180px;
  height: auto;
  object-fit: contain;
}
@media (max-width: 576px) {
  .navbar-logo {
    width: 165px;
  }
}

.footer-logo {
  width: 180px;
  height: auto;
  object-fit: contain;
}

.footer-credit-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-credit-link:hover {
    color: #fff;
}

.site-footer p,
.site-footer a {
  overflow-wrap: anywhere;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.footer-social-link:hover {
    color: #fff;
}

.footer-social-link i {
    font-size: 1.25rem;
}

.nosotros-card {
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  background: #fff;
}

.nosotros-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.nosotros-card p {
  margin-bottom: 0;
  color: #6c757d;
  line-height: 1.7;
  text-align: justify;
}

.nosotros-media {
  padding-top: 0.35rem;
}

.video-thumbnail-link {
    display: block;
    text-decoration: none;
}

.video-thumbnail-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #dfe9ea;
    border: 1px dashed rgba(31, 111, 120, 0.18);
}

.video-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.video-play-badge i {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 2rem;
    transition: transform 0.2s ease;
}

.video-thumbnail-link:hover .video-play-badge i {
    transform: scale(1.08);
}
