/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* CSS Variables */
:root {
    --color-bg-primary: #0A0D14;
    --color-bg-secondary: #111622;
    --color-gold-accent: #EAB308;
    --color-gold-hover: #CA8A04;
    --font-headings: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Global Styles */
html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    background-color: var(--color-bg-primary);
    color: #FFFFFF;
}

body {
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #1F2937;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-accent);
}

/* Dynamic Image Placeholder Styling */
.img-placeholder {
    position: relative;
    background: linear-gradient(135deg, #111622 0%, #1A202E 100%);
    border: 1px dashed rgba(234, 179, 8, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #9CA3AF;
    transition: all 0.3s ease;
}

.img-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(234, 179, 8, 0.05) 1px, transparent 0);
    background-size: 16px 16px;
    pointer-events: none;
}

.img-placeholder:hover {
    border-color: rgba(234, 179, 8, 0.5);
    background: linear-gradient(135deg, #161C2A 0%, #20293A 100%);
}

/* Premium Gold Text Gradient */
.text-gold-gradient {
    background: linear-gradient(to right, #FFE066 0%, #F59E0B 50%, #D97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(17, 22, 34, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-panel-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(234, 179, 8, 0.2);
    box-shadow: 0 10px 30px -10px rgba(234, 179, 8, 0.1);
}

/* WhatsApp Floating Button Ripple Animation */
.whatsapp-ripple {
    position: relative;
}

.whatsapp-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background-color: #25D366;
    opacity: 0.4;
    z-index: -1;
    animation: ripple 2s infinite ease-in-out;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Pulse animation for CTA buttons */
@keyframes goldPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.4);
    }
    50% {
        box-shadow: 0 0 12px 4px rgba(234, 179, 8, 0.2);
    }
}

.pulse-gold {
    animation: goldPulse 3s infinite;
}

/* Custom form styling for Selects and Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
    color-scheme: dark;
}

/* Smooth Accordion for FAQs */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.faq-chevron {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    color: var(--color-gold-accent);
}

/* Hero Overlay Graphic */
.hero-gradient-overlay {
    background: linear-gradient(to bottom, rgba(10, 13, 20, 0.3) 0%, rgba(10, 13, 20, 0.95) 90%, rgba(10, 13, 20, 1) 100%);
}

/* Reusable Page Hero with Dynamic Background Image */
.page-hero {
  background-image:
    linear-gradient(180deg, rgba(10, 13, 20, 0.72), rgba(10, 13, 20, 0.96)),
    var(--hero-image),
    linear-gradient(180deg, #020617, #0A0D14);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(234, 179, 8, 0.12), transparent 45%);
  pointer-events: none;
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

/* Home Page Specific Hero Styles */
.home-hero-overlay {
    background: linear-gradient(to right, rgba(10, 13, 20, 0.95) 0%, rgba(10, 13, 20, 0.8) 45%, rgba(10, 13, 20, 0.1) 100%);
}

.home-hero-content {
    max-width: 650px;
}

@media (max-width: 768px) {
    .home-hero-overlay {
        background: linear-gradient(to bottom, rgba(10, 13, 20, 0.5) 0%, rgba(10, 13, 20, 0.95) 80%, rgba(10, 13, 20, 1) 100%);
    }
    
    .home-hero-content {
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Homepage service cards */
.services-overview {
    background:
        radial-gradient(circle at 50% 0%, rgba(234, 179, 8, 0.08), transparent 32rem),
        linear-gradient(180deg, #111622 0%, #0d121d 100%);
}

.services-section-heading {
    max-width: 780px;
    margin: 0 auto 3rem;
}

.services-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold-accent);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
}

.services-title {
    margin: 0.75rem auto 0;
    color: #ffffff;
    font-family: var(--font-headings);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0;
    text-transform: uppercase;
}

.services-intro {
    max-width: 680px;
    margin: 1rem auto 0;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.7;
}

.services-heading-rule {
    width: 4rem;
    height: 0.25rem;
    margin: 1.35rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #facc15, #ca8a04);
    box-shadow: 0 0 28px rgba(234, 179, 8, 0.28);
}

.services-image-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
}

.service-image-card {
    position: relative;
    display: flex;
    min-height: 320px;
    padding: 1.35rem;
    overflow: hidden;
    isolation: isolate;
    color: #ffffff;
    text-decoration: none;
    background: #131a27;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 20px 45px -26px rgba(0, 0, 0, 0.9);
    transform: translateY(0);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    aspect-ratio: auto;
}

.service-image-card-bg,
.service-image-card-placeholder,
.service-image-card-overlay {
    position: absolute;
    inset: 0;
}

.service-image-card-bg {
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.94;
    transform: scale(1);
    transition: transform 0.7s ease, opacity 0.35s ease;
}

.service-image-card-bg.is-hidden {
    opacity: 0;
}

.service-image-card-placeholder {
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.65rem;
    color: rgba(203, 213, 225, 0.42);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    border: 1px dashed rgba(234, 179, 8, 0.22);
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 35%, rgba(234, 179, 8, 0.12), transparent 15rem),
        linear-gradient(135deg, #111622, #1c2636);
}

.service-image-card-overlay {
    z-index: 2;
    background: linear-gradient(to bottom, rgba(10, 13, 20, 0.15), rgba(10, 13, 20, 0.45), rgba(10, 13, 20, 0.92));
    transition: background 0.35s ease;
}

.service-image-card-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
}

.service-image-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    color: #05070d;
    background: #facc15;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(234, 179, 8, 0.32), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.service-image-card-content > div:last-child {
    margin-top: auto;
}

.service-image-card h3 {
    margin: 0 0 0.65rem;
    color: #ffffff;
    font-family: var(--font-headings);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.service-image-card p {
    margin: 0 0 1rem;
    color: #e5e7eb;
    font-size: 0.8rem;
    line-height: 1.55;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.service-image-card-content > div:last-child > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.15rem;
    padding: 0.5rem 0.72rem;
    color: #facc15;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    background: rgba(10, 13, 20, 0.46);
    border: 1px solid rgba(250, 204, 21, 0.38);
    border-radius: 8px;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-image-card-content > div:last-child > span i {
    transition: transform 0.3s ease;
}

.service-image-card:hover {
    transform: translateY(-6px);
    border-color: rgba(234, 179, 8, 0.78);
    box-shadow: 0 26px 58px -28px rgba(234, 179, 8, 0.52), 0 24px 44px -28px rgba(0, 0, 0, 0.95);
}

.service-image-card:hover .service-image-card-bg {
    opacity: 1;
    transform: scale(1.05);
}

.service-image-card:hover .service-image-card-overlay {
    background: linear-gradient(to bottom, rgba(10, 13, 20, 0.08), rgba(10, 13, 20, 0.34), rgba(10, 13, 20, 0.84));
}

.service-image-card:hover .service-image-card-content > div:last-child > span {
    color: #05070d;
    background: #facc15;
    border-color: #facc15;
    box-shadow: 0 10px 26px rgba(234, 179, 8, 0.3);
}

.service-image-card:hover .service-image-card-content > div:last-child > span i {
    transform: translateX(3px);
}

@media (min-width: 640px) {
    .services-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-title {
        font-size: 2.45rem;
    }
}

@media (min-width: 900px) {
    .services-image-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .service-image-card {
        min-height: 340px;
    }
}

@media (min-width: 1180px) {
    .services-section-heading {
        margin-bottom: 3.4rem;
    }

    .services-image-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 1rem;
    }

    .service-image-card {
        min-height: 360px;
        padding: 1.2rem;
    }

    .services-title {
        font-size: 3rem;
    }
}


/* ===== Efeito hover premium dos cards "Tours Mais Populares" ===== */
.popular-card {
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
    will-change: transform;
}
.popular-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px -18px rgba(234, 179, 8, .45);
    border-color: rgba(234, 179, 8, .55);
}
.popular-card img {
    transition: transform .6s cubic-bezier(.2, .6, .2, 1);
}
.popular-card:hover img {
    transform: scale(1.09);
}
.popular-card h3 {
    transition: color .3s ease;
}
.popular-card:hover h3 {
    color: #ca8a04;
}
.popular-card a[href] {
    transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.popular-card:hover a[href] {
    box-shadow: 0 10px 22px -8px rgba(234, 179, 8, .6);
    transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
    .popular-card, .popular-card img, .popular-card h3, .popular-card a[href] { transition: none; }
    .popular-card:hover, .popular-card:hover img, .popular-card:hover a[href] { transform: none; }
}


/* ===== Heros com imagem + texto sobreposto (Avaliações, Contactos) — responsivo ===== */
.media-hero { position: relative; }
.media-hero > img { display: block; width: 100%; height: auto; }
/* Telemóvel: vira um hero com altura mínima e imagem a preencher, para o texto
   nunca ficar apertado nem sobreposto numa imagem baixa. */
@media (max-width: 767px) {
    .media-hero { min-height: 48vh; }
    .media-hero > img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
    .media-hero h1 { font-size: 1.9rem; line-height: 1.1; }
}
