/* ============================================
   MUCCI PAGE BUILDER — Frontend Module Styles
   Complements homepage.css for modules that
   don't have homepage equivalents.
   ============================================ */

/* ── Hero (inner page variant — no search bar) ────────────── */
.mpb-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mpb-hero .hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    padding-top: calc(var(--header-height, 100px) + 60px);
}

/* -- Alignment modifiers -------------------------------------------------- */
.mpb-hero--center .hero__content {
    text-align: center;
    align-items: center;
}
.mpb-hero--center .hero__title,
.mpb-hero--center .hero__subtitle {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.mpb-hero--left .hero__content {
    text-align: left;
    align-items: flex-start;
}

/* -- Custom padding-top via CSS variable ---------------------------------- */
@media (min-width: 769px) {
    .mpb-hero[style*='--hero-pt'] .hero__content {
        padding-top: var(--hero-pt);
    }
}

/* ── Text Content ─────────────────────────────────────────── */
.mpb-text-content__inner {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.mpb-text-content__inner h2,
.mpb-text-content__inner h3,
.mpb-text-content__inner h4 {
    font-family: var(--font-heading);
    color: var(--navy);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.mpb-text-content__inner p {
    margin-bottom: 1.2em;
}

.mpb-text-content__inner a {
    color: var(--gold);
    text-decoration: underline;
}

.mpb-text-content__inner img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.mpb-text-content__inner ul,
.mpb-text-content__inner ol {
    padding-left: 1.5em;
    margin-bottom: 1.2em;
}

/* ── Image + Text ─────────────────────────────────────────── */
.mpb-image-text__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.mpb-image-text--image-right .mpb-image-text__inner {
    direction: rtl;
}

.mpb-image-text--image-right .mpb-image-text__inner > * {
    direction: ltr;
}

.mpb-image-text__image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.mpb-image-text__content .section-label {
    margin-bottom: 8px;
}

.mpb-image-text__content .section-heading {
    margin-bottom: 16px;
}

.mpb-image-text__content .section-text {
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .mpb-image-text__inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .mpb-image-text--image-right .mpb-image-text__inner {
        direction: ltr;
    }
}

/* ── Gallery ──────────────────────────────────────────────── */
.mpb-gallery__grid {
    display: grid;
    gap: 16px;
}

.mpb-gallery__grid--2 { grid-template-columns: repeat(2, 1fr); }
.mpb-gallery__grid--3 { grid-template-columns: repeat(3, 1fr); }
.mpb-gallery__grid--4 { grid-template-columns: repeat(4, 1fr); }

.mpb-gallery__item {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.mpb-gallery__item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s var(--ease);
}

.mpb-gallery__item:hover img {
    transform: scale(1.05);
}

.mpb-gallery__item figcaption {
    padding: 10px 12px;
    font-size: 0.85rem;
    color: var(--text-medium);
    background: var(--off-white);
}

@media (max-width: 768px) {
    .mpb-gallery__grid--3,
    .mpb-gallery__grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .mpb-gallery__grid--2,
    .mpb-gallery__grid--3,
    .mpb-gallery__grid--4 {
        grid-template-columns: 1fr;
    }
}

/* ── Contact Info ─────────────────────────────────────────── */
.mpb-contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.mpb-contact__item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.mpb-contact__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--off-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mpb-contact__icon svg {
    width: 20px;
    height: 20px;
    color: var(--navy);
}

.mpb-contact__detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mpb-contact__detail strong {
    font-size: 0.9rem;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mpb-contact__detail span {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.5;
}

.mpb-contact__map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.mpb-contact__map iframe {
    width: 100%;
    height: 400px;
    border: 0;
    display: block;
}

@media (max-width: 768px) {
    .mpb-contact__grid {
        grid-template-columns: 1fr;
    }
}

/* ── Team Grid ────────────────────────────────────────────── */
.mpb-team__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

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

.mpb-team__photo {
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.mpb-team__photo img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    transition: transform 0.4s var(--ease);
}

.mpb-team__member:hover .mpb-team__photo img {
    transform: scale(1.03);
}

.mpb-team__name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--navy);
    margin: 0 0 4px;
}

.mpb-team__role {
    display: block;
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.mpb-team__bio {
    font-size: 0.88rem;
    color: var(--text-medium);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .mpb-team__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

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

/* ── Spacing between modules ──────────────────────────────── */

/* Zero out default section padding — controlled per-module from the builder */
.section,
.about,
.features,
.fleet,
.destinations,
.faq,
.testimonial,
.cta-banner,
.hero,
.mpb-intro,
.mpb-contact-form,
.mpb-contact,
.mpb-feature-blocks,
.mpb-gallery,
.mpb-icon-cards,
.mpb-image-text,
.mpb-service-cards,
.mpb-team,
.mpb-text-content,
.mpb-testimonial,
.mpb-hero,
.mpb-faq,
.mpb-fleet,
.mpb-destinations,
.mpb-cta-banner {
    padding-top: 0;
    padding-bottom: 0;
}

.mpb-intro + .mpb-service-cards,
.mpb-intro + .mpb-feature-blocks {
    margin-top: -40px;
}

/* ── Contact Form + Map ───────────────────────────────────── */
.mpb-contact-form__header {
    text-align: center;
    margin-bottom: 3rem;
}

.mpb-contact-form__header .section-text {
    max-width: 650px;
    margin: 0.75rem auto 0;
}

.mpb-contact-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: stretch;
}

/* ── Left: Map + Details ──────────────────────────────────── */
.mpb-contact-form__left {
    display: flex;
    flex-direction: column;
}

.mpb-contact-form__map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 28px;
    flex: 1 1 auto;
    min-height: 320px;
}

.mpb-contact-form__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.mpb-contact-form__details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mpb-contact-form__detail {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.mpb-contact-form__detail-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--off-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mpb-contact-form__detail-icon svg {
    width: 20px;
    height: 20px;
    color: var(--navy);
}

.mpb-contact-form__detail-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mpb-contact-form__detail-text strong {
    font-size: 0.8rem;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mpb-contact-form__detail-text span,
.mpb-contact-form__detail-text a {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.5;
    text-decoration: none;
}

.mpb-contact-form__detail-text a:hover {
    color: var(--gold);
}

/* ── Right: Form ──────────────────────────────────────────── */
.mpb-contact-form__right {
    background: var(--off-white);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mpb-contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.mpb-contact-form__field {
    margin-bottom: 16px;
}

.mpb-contact-form__row .mpb-contact-form__field {
    margin-bottom: 0;
}

.mpb-contact-form__field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.mpb-contact-form__field input,
.mpb-contact-form__field select,
.mpb-contact-form__field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    box-sizing: border-box;
}

.mpb-contact-form__field input:focus,
.mpb-contact-form__field select:focus,
.mpb-contact-form__field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 162, 101, 0.15);
}

.mpb-contact-form__field input::placeholder,
.mpb-contact-form__field textarea::placeholder {
    color: var(--text-light);
}

.mpb-contact-form__field textarea {
    resize: vertical;
    min-height: 120px;
}

.mpb-contact-form__field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A6A7A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ── Privacy checkbox ─────────────────────────────────────── */
.mpb-contact-form__privacy {
    margin-bottom: 20px;
}

.mpb-contact-form__privacy label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-medium);
    line-height: 1.4;
}

.mpb-contact-form__privacy input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--navy);
}

.mpb-contact-form__privacy a {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.mpb-contact-form__privacy a:hover {
    text-decoration: underline;
}

/* ── Submit button ────────────────────────────────────────── */
.mpb-contact-form__submit {
    text-align: right;
}

.mpb-contact-form__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ── Feedback ─────────────────────────────────────────────── */
.mpb-contact-form__feedback {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.4;
}

.mpb-contact-form__feedback--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.mpb-contact-form__feedback--error {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ── Loading state ────────────────────────────────────────── */
.mpb-contact-form__btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.mpb-contact-form__btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mpb-spin 0.6s linear infinite;
}

@keyframes mpb-spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .mpb-contact-form__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .mpb-contact-form__right {
        padding: 24px;
    }

    .mpb-contact-form__row {
        grid-template-columns: 1fr;
    }
}
