/* Main CSS File */
:root {
    --primary-color: #D62626;
    /* Angola Red */
    --secondary-color: #F7D00F;
    /* Yellow */
    --accent-color: #111111;
    /* Softer Black */

    /* Standardized Palette - Softer Dark Mode */
    --body-bg: #1a1a1a;
    --surface-bg: #252525;

    --dark-bg: #1a1a1a;
    /* Deprecated alias, keep for compat */
    --dark-card: #252525;
    /* Deprecated alias, keep for compat */

    --text-color: #f0f0f0;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-radius: 12px;
}

[data-theme="light"] .province-name {
    color: #fff;
    /* Always white inside card overlay */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] {
    /* Backgrounds */
    --body-bg: #ffffff;
    --surface-bg: #f8f9fa;

    --dark-bg: #ffffff;
    --dark-card: #f8f9fa;

    /* Text */
    --text-color: #212529;

    /* Accent */
    --accent-color: #212529;

    /* Borders & Dividers */
    --border-color: #dee2e6;
    --border-color-light: #e9ecef;
}

/* Header in Light Mode */
[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .site-title a,
[data-theme="light"] .main-navigation a {
    color: #1a1a1a;
    font-weight: 600;
}

[data-theme="light"] .site-title a:hover,
[data-theme="light"] .main-navigation a:hover {
    color: var(--primary-color);
}

[data-theme="light"] .theme-toggle svg {
    stroke: #212529;
}

[data-theme="light"] .menu-toggle span {
    color: #212529;
}

/* Cards in Light Mode */
[data-theme="light"] .tour-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .tour-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-8px);
}

/* Sections in Light Mode */
[data-theme="light"] .map-section {
    background: #f8f9fa;
}

/* Single Tour Light Mode */
[data-theme="light"] .tour-main-title {
    background: linear-gradient(135deg, #111111 0%, #555555 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .tour-breadcrumbs {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #444;
}

[data-theme="light"] .tour-breadcrumbs .separator {
    color: #888;
}

[data-theme="light"] .section-title {
    color: #111;
}

[data-theme="light"] .tour-body-text {
    color: #333;
}

[data-theme="light"] .technical-sheet {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .sheet-title {
    color: #111;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sheet-item .value {
    color: #111;
}

[data-theme="light"] .info-block {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .info-block p,
[data-theme="light"] .info-block li {
    color: #444;
}

[data-theme="light"] .info-block:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

/* Provinces Mosaic Light Mode */
[data-theme="light"] .provinces-mosaic {
    background: #ffffff;
}

[data-theme="light"] .provinces-mosaic .section-header h2,
[data-theme="light"] .provinces-mosaic .section-header p {
    color: #212529;
}

/* Tours Archive Light Mode */
[data-theme="light"] .tours-filter-bar {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .filter-select,
[data-theme="light"] .filter-search {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

[data-theme="light"] .filter-select:focus,
[data-theme="light"] .filter-search:focus {
    background: #fff;
}

[data-theme="light"] .filter-select option {
    background: #fff;
    color: #333;
}

[data-theme="light"] .pagination .nav-links {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .pagination a,
[data-theme="light"] .pagination span {
    color: #444;
}

[data-theme="light"] .pagination a:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .pagination .current {
    color: #fff;
}

/* Footer in Light Mode */
[data-theme="light"] .site-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
}

[data-theme="light"] .footer-description,
[data-theme="light"] .footer-links a,
[data-theme="light"] .footer-contact,
[data-theme="light"] .footer-contact a {
    color: #6c757d;
}

[data-theme="light"] .footer-title,
[data-theme="light"] .footer-heading {
    color: #212529;
}

[data-theme="light"] .social-link {
    background: rgba(0, 0, 0, 0.05);
    color: #6c757d;
    border: 1px solid #dee2e6;
}

[data-theme="light"] .social-link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* =========================================
   Base Styles
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: var(--font-body);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Header
   ========================================= */
.site-header {
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-title a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    line-height: 1;
    display: inline-block;
}

.site-title span {
    color: var(--secondary-color);
}

.custom-logo {
    max-height: 50px;
    width: auto;
    display: block;
}

.main-navigation {
    margin-left: auto;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.main-navigation a:hover {
    color: #fff;
}

.main-navigation a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 10px;
    /* Small gap between menu and actions */
}

/* Botão Toggle Switch (Light/Dark Mode) */
.theme-toggle {
    position: relative;
    width: 64px;
    height: 32px;
    background: #e5e7eb;
    /* Fundo Leve (Light Mode) */
    border-radius: 32px;
    border: 2px solid #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Ícones dentro do switch */
.theme-toggle svg {
    width: 16px;
    height: 16px;
    stroke: #666;
    z-index: 10;
    transition: stroke 0.4s ease;
    display: block !important;
    /* Forçar display para layout */
}

/* Bolinha que desliza */
.theme-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    /* White Circle */
    border-radius: 50%;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), background 0.3s ease;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Estados quando em modo escuro (Dark Mode) */
[data-theme="dark"] .theme-toggle {
    background: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(214, 38, 38, 0.3);
}

/* Move a bolinha para a direita */
[data-theme="dark"] .theme-toggle::after {
    transform: translateX(32px);
    background: #ffffff;
}

/* Ajuste de ícones */
.theme-icon-sun {
    opacity: 1;
    stroke: #FDB813 !important;
    /* Solar Yellow */
}

.theme-icon-moon {
    opacity: 1;
}

/* Quando active, ícone muda de cor (opcional) */
[data-theme="dark"] .theme-toggle .theme-icon-moon {
    stroke: #fff;
    /* Lua fica branca no escuro */
}

[data-theme="light"] .theme-toggle .theme-icon-sun {
    stroke: #FDB813 !important;
    /* Sol fica amarelo no claro */
}

.menu-toggle {
    display: none;
}

/* =========================================
   Structured Single Tour Layout
   ========================================= */

.single-tour-page-wrapper {
    padding-top: 40px;
    padding-bottom: 80px;
}

/* 1. Header do Tour */
.tour-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

.tour-main-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #fff;
    background: linear-gradient(135deg, #ffffff 0%, #aaaaaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tour-breadcrumbs {
    font-size: 0.85rem;
    color: #ccc;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1.5px;
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tour-breadcrumbs .active {
    color: var(--secondary-color);
}

.tour-breadcrumbs .separator {
    margin: 0 10px;
    color: #555;
    font-size: 1.2rem;
    line-height: 1;
}

.tour-viewer-box {
    width: 100%;
    margin-bottom: 60px;
    position: relative;
}

.tour-viewer-box::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background: var(--primary-color);
    filter: blur(100px);
    opacity: 0.15;
    /* Reduzida a base para ser mais subtil */
    z-index: -1;
    border-radius: 50%;
    animation: pulseGlow 8s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.9);
        opacity: 0.1;
        /* Min glow */
    }

    100% {
        transform: scale(1.05);
        opacity: 0.2;
        /* Max glow */
    }
}

.pannellum-viewer {
    width: 100%;
    height: 70vh;
    min-height: 600px;
    max-height: 800px;
    border-radius: 12px;
    /* Reduzida a curvatura de 24px para 12px */
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    /* Sombra preta muito mais suavizada (antes 60%) */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#panorama {
    width: 100%;
    height: 100%;
}

.viewer-badge {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 10px 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}

.viewer-badge .dashicons {
    color: var(--secondary-color);
}

.viewer-badge:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 15px rgba(247, 208, 15, 0.2);
    border-color: rgba(247, 208, 15, 0.3);
}

/* 3. Grid de Conteúdo */
.tour-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* 2/3 para texto, 1/3 para sidebar */
    gap: 60px;
}

/* Coluna Principal */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw + 0.5rem, 1.8rem);
    text-transform: uppercase;
    margin-bottom: 25px;
    color: #fff;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}

[data-theme="light"] .section-title {
    color: #1a1a1a;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 2px;
}

.tour-body-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 40px;
}

[data-theme="light"] .tour-body-text {
    color: #555;
}

.info-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.info-block {
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.4s ease;
}

[data-theme="light"] .info-block {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.info-block:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

[data-theme="light"] .info-block:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.info-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: 1px;
}

.info-block p,
.info-block li {
    font-size: 0.95rem;
    color: #ddd;
    margin: 0;
}

.info-block ul {
    padding-left: 20px;
    margin: 0;
}

/* Coluna Lateral (Ficha Técnica) */
.technical-sheet {
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .technical-sheet {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.sheet-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 30px;
    color: #fff;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="light"] .sheet-title {
    color: #1a1a1a;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.sheet-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary-color);
}

.sheet-item {
    margin-bottom: 20px;
}

.sheet-item .label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.sheet-item .value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

[data-theme="light"] .sheet-item .value {
    color: #333;
}

.sheet-item .value.highlight {
    color: var(--primary-color);
    font-weight: 700;
    /* Destaque na província */
}


.sheet-actions {
    margin-top: 40px;
}

.btn-explore {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 30px;
    padding: 15px 0;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 4px 15px rgba(214, 38, 38, 0.3);
    margin-bottom: 5px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.btn-explore::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease-out;
    border-radius: 50%;
}

.btn-explore:hover {
    background: #b51b1b;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(214, 38, 38, 0.5), 0 0 20px rgba(214, 38, 38, 0.2);
}

.btn-explore:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Loader */
.viewer-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .tour-content-grid {
        grid-template-columns: 1fr;
        /* Empilhar colunas */
        gap: 40px;
    }

    .tour-viewer-box {
        height: auto;
        /* Was 50vh, caused overlap because child was taller */
        margin-bottom: 30px;
    }

    .pannellum-viewer {
        height: 50vh;
        min-height: 350px;
        /* Reduced from 500px for mobile */
        margin-bottom: 0;
    }

    /* Force more space below viewer on mobile to preventing overlap */
    .tour-viewer-box {
        margin-bottom: 0;
        display: block;
    }

    .tour-main-title {
        font-size: 2.2rem;
    }

    .info-blocks {
        grid-template-columns: 1fr;
        /* Empilhar blocos de info */
    }

    /* Ajuste para Províncias no Mobile */
    .provinces-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 Colunas no mobile */
        gap: 15px;
    }

    .province-card {
        height: 140px;
        /* Cartões mais baixos */
        padding: 15px;
    }

    .province-name {
        font-size: 1.1rem;
    }

    .province-explore {
        font-size: 0.8rem;
    }
}

/* Standard Fullscreen Button: Let Pannellum handle visibility unless we override */
/* .pnlm-fullscreen-toggle-button rule removed to avoid duplicate/overlapping buttons on iOS */

/* =========================================
   Front Page Styles
   ========================================= */
/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #121212 0%, #2a2a2a 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
    /* Fallback */
}

/* Page Header (Tours) */
.page-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1547471080-7528185270d4?q=80&w=2609&auto=format&fit=crop');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 120px 0;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.page-title {
    font-size: 3rem;
    color: #fff !important;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.2rem;
    color: #ddd !important;
    max-width: 600px;
    margin: 0 auto;
}

/* Garantir visibilidade no modo Light */
[data-theme="light"] .page-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('https://images.unsplash.com/photo-1489493887464-892be6d1daae?q=80&w=2667&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

[data-theme="light"] .page-title {
    color: #fff !important;
}

[data-theme="light"] .page-header p {
    color: #ddd !important;
}

/* Provinces Mosaic */
.provinces-mosaic {
    padding: 100px 0;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1516026672322-bc52d61a55d5?q=80&w=2672&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax mood */
    color: #fff;
    color: #fff;
    position: relative;
    /* Adicionar um degradê preto no topo para melhor leitura do menu se necessário */
}

/* Espaçamento e Estilo do Cabeçalho da Secção de Províncias */
.provinces-mosaic .section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    /* Mais espaço em baixo do texto */
    padding-top: 40px;
    /* Mais espaço em cima do texto */
}

.provinces-mosaic .section-header h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.provinces-mosaic .section-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
}

[data-theme="light"] .provinces-mosaic {
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('https://images.unsplash.com/photo-1516026672322-bc52d61a55d5?q=80&w=2672&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Mobile Load More Logic */
.load-more-container {
    display: none;
    text-align: center;
    margin-top: 30px;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(214, 38, 38, 0.3);
}

[data-theme="light"] .btn-secondary {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(214, 38, 38, 0.2);
}

[data-theme="light"] .btn-secondary:hover {
    background: #b51b1b;
    border-color: #b51b1b;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(214, 38, 38, 0.4);
}

/* Esconder províncias extras no mobile (via CSS apenas como fallback inicial, JS fará a lógica) */
@media (max-width: 768px) {
    .province-card:nth-child(n+7) {
        display: none;
    }

    .province-card.visible {
        display: flex !important;
        animation: fadeIn 0.5s ease;
    }

    .load-more-container {
        display: block;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.provinces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    /* Responsive grid */
    gap: 20px;
    margin-top: 40px;
}

/* Forçar a grelha de províncias no Mobile e Tablet para ser equilibrada */
@media (max-width: 768px) {
    .provinces-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .provinces-grid {
        grid-template-columns: 1fr;
    }
}

.province-card {
    position: relative;
    height: 240px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0);
}

[data-theme="light"] .province-card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.province-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 10;
}

[data-theme="light"] .province-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.province-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
}

.province-card:hover .province-card-bg {
    transform: scale(1.1) rotate(1deg);
}

.province-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    transition: background 0.5s ease;
    z-index: 1;
}

.province-card:hover .province-card-overlay {
    background: linear-gradient(to top, rgba(214, 38, 38, 0.9) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0) 100%);
}

.province-name {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    line-height: 1.2;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.province-card:hover .province-name {
    transform: translateY(0);
}

.province-explore {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    letter-spacing: 1px;
}

.province-explore .dashicons {
    background: var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.province-card:hover .province-explore {
    opacity: 1;
    transform: translateY(0);
}

/* Custom iOS Fullscreen Button */
.custom-ios-fs {
    position: absolute;
    bottom: 35px;
    left: 15px;
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
    z-index: 10001;
    border-radius: 8px;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z'/%3E%3C/svg%3E");
    background-size: 22px 22px;
    background-position: center;
    background-repeat: no-repeat;
}

.custom-ios-fs:active {
    transform: scale(0.9);
    background-color: rgba(0, 0, 0, 0.9);
}

/* Fullscreen Mode - Safari/iOS Compatible */
.ios-fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    /* Dynamic viewport height (modern browsers) */
    height: -webkit-fill-available !important;
    /* Safari fallback */
    z-index: 999999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    transform: none !important;
    /* Prevent position:fixed issues in Safari */
    -webkit-transform: none !important;
}

.ios-fullscreen-active .pannellum-viewer {
    height: 100% !important;
    height: 100dvh !important;
    height: -webkit-fill-available !important;
    min-height: 100% !important;
    max-height: none !important;
    width: 100% !important;
    border-radius: 0 !important;
}

/* Close icon when active */
.ios-fullscreen-active .custom-ios-fs {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z'/%3E%3C/svg%3E");
    background-color: rgba(214, 38, 38, 0.8);
    /* Red to indicate close action */
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    z-index: 1000000 !important;
}

/* Prevent body scroll when fullscreen */
body.no-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0;
    left: 0;
    touch-action: none;
    /* Prevent Safari touch scroll */
    -webkit-overflow-scrolling: auto;
    /* Disable momentum scroll on iOS */
}

.eyebrow {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: transform 0.2s, background 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #b51b1b;
    transform: translateY(-2px);
}

/* Map Section */
.map-section {
    padding: 80px 0;
    background: #181818;
    text-align: center;
}

.interactive-map-wrapper {
    max-width: 800px;
    margin: 40px auto 0;
}

/* Tours Grid */
.featured-tours {
    padding: 80px 0;
}

.tours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

.tour-card {
    background: var(--surface-bg, var(--dark-card));
    border-radius: 24px;
    /* Aumentado para Visual Nativo de App */
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Animação mais suave e elástica */
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Borda envidraçada fina */
    height: 100%;
    position: relative;
    transform: translateZ(0);
}

[data-theme="light"] .tour-card {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    /* Sombra difusa elegante no branco */
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.tour-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(214, 38, 38, 0.15);
    /* Glow e Levantamento Supremo */
    border-color: rgba(214, 38, 38, 0.4);
}

[data-theme="light"] .tour-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12), 0 0 30px rgba(214, 38, 38, 0.1);
    border-color: rgba(214, 38, 38, 0.3);
}

.tour-card-image {
    position: relative;
    height: 260px;
    background: #2a2a2a;
    overflow: hidden;
}

.tour-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.tour-card:hover .tour-card-image::after {
    opacity: 0.8;
}

.tour-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tour-card:hover .tour-card-image img {
    transform: scale(1.1) rotate(1deg);
    /* Cinemática de Zoom + Rotação */
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f1f1f, #333333);
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Province Tag over Image */
.province-tag,
.card-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(214, 38, 38, 0.85);
    /* Vermelho Glassmorphism */
    color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    /* Pílulas hiper arredondadas */
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(214, 38, 38, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-badge {
    left: auto;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.tour-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: var(--surface-bg, var(--dark-card));
    position: relative;
    z-index: 2;
}

.tour-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color, #fff);
    line-height: 1.3;
    font-weight: 700;
}

.tour-excerpt {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
    line-height: 1.6;
}

[data-theme="light"] .tour-excerpt {
    color: #666;
}

.btn-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

.tour-card:hover .btn-card,
.btn-card:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 10px 25px rgba(214, 38, 38, 0.4);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 900px) {

    /* Header & Navigation */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 101;
    }

    .main-navigation {
        position: fixed;
        top: 60px;
        /* Header height */
        left: 0;
        width: 100%;
        background: rgba(18, 18, 18, 0.95);
        /* Upgrade de UI para Premium Blur */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 40px 20px;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        /* Soft border */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        /* Sombra mais funda */
    }

    .main-navigation.toggled {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        /* Mais espaço para tapar nos links com o dedo */
    }

    .main-navigation a {
        font-size: 1.2rem;
        /* Aumentar leitura no telemóvel */
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

    /* Single Tour Layout */
    .tour-content-grid {
        grid-template-columns: 1fr;
        /* Empilhar colunas */
        gap: 40px;
    }

    /* Removed height: 50vh to let .pannellum-viewer shape the box */

    .tour-main-title {
        font-size: 2rem;
        /* Menor para mobile */
    }

    .info-blocks {
        grid-template-columns: 1fr;
        /* Empilhar blocos de info */
    }
}

@media (max-width: 768px) {

    /* Hero Section */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
        /* Mais espaço para o Mapa respirar sob o botão (Mobile) */
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }

    .hero-description {
        font-size: 1rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        /* Stack tudo */
        gap: 30px;
        text-align: center;
    }

    /* Forçar Tours Grid a 1 coluna em mobile para garantir estética */
    .tours-grid {
        grid-template-columns: 1fr;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social {
        justify-content: center;
        margin-top: 15px;
    }

    .footer-contact li {
        justify-content: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-height: 600px) {
    .scroll-indicator {
        display: none;
        /* Esconder em telas baixas/landscape mobile */
    }
}

/* Map Tooltip */
.map-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    white-space: nowrap;
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.map-tooltip.visible {
    opacity: 1;
}

svg {
    max-width: 100%;
    height: auto;
}

/* =========================================
   Footer Styles
   ========================================= */
.site-footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #aaa;
    margin-top: 80px;
}

.footer-main {
    padding: 60px 0 40px;
    border-bottom: 1px solid #2a2a2a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-column h3,
.footer-column h4 {
    margin-bottom: 20px;
}

.footer-title {
    font-size: 1.8rem;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
}

.footer-title span {
    color: var(--secondary-color);
}

.footer-description {
    color: #999;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #aaa;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.social-link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-heading {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 15px;
}

.footer-links a::before {
    content: '';
    position: absolute;
    left: 0;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 20px;
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #999;
}

.footer-contact svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

.footer-contact a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-bottom {
    background: #0a0a0a;
    padding: 25px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-bottom-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom-links .separator {
    color: #333;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Demo Tour Cards */
.tour-card-demo {
    cursor: default;
    opacity: 0.95;
}

.demo-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.demo-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, transparent 48%, rgba(214, 38, 38, 0.1) 49%, rgba(214, 38, 38, 0.1) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(247, 208, 15, 0.1) 49%, rgba(247, 208, 15, 0.1) 51%, transparent 52%);
    background-size: 20px 20px;
    opacity: 0.3;
}

.demo-emoji {
    font-size: 4rem;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: floatEmoji 3s ease-in-out infinite;
}

@keyframes floatEmoji {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.demo-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
}

.tour-card-demo .tour-card-content h3 {
    color: #ddd;
}

.tour-card-demo:hover {
    transform: translateY(-3px);
}

/* =========================================
   COMPREHENSIVE LIGHT MODE OVERRIDES
   ========================================= */

/* Page Elements */
[data-theme="light"] .tour-main-title {
    color: #212529;
}

[data-theme="light"] .tour-breadcrumbs {
    color: #6c757d;
}

[data-theme="light"] .tour-header {
    border-bottom-color: #dee2e6;
}

[data-theme="light"] .section-title {
    color: #212529;
}

[data-theme="light"] .tour-body-text,
[data-theme="light"] .tour-body-text p {
    color: #495057;
}

[data-theme="light"] .info-title {
    color: var(--primary-color);
}

[data-theme="light"] .sheet-title {
    color: #212529;
    border-bottom-color: var(--secondary-color);
}

[data-theme="light"] .sheet-item .label {
    color: #6c757d;
}

[data-theme="light"] .sheet-item .value {
    color: #212529;
}

[data-theme="light"] .sheet-item .value.highlight {
    color: var(--primary-color);
}

/* Cards and Grids */
[data-theme="light"] .tour-card-title,
[data-theme="light"] .tour-card h3 {
    color: #212529;
}

[data-theme="light"] .tour-card-province {
    color: #6c757d;
}

[data-theme="light"] .tour-card-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, transparent 60%);
}

/* Map Section */
[data-theme="light"] .map-section-title {
    color: #212529;
}

[data-theme="light"] .map-section-description {
    color: #495057;
}

/* Archive Page */
[data-theme="light"] .archive-header h1 {
    color: #212529;
}

[data-theme="light"] .active-filter {
    color: #6c757d;
}

/* Viewer Sidebar */
[data-theme="light"] #viewer-sidebar {
    background: #ffffff;
    border-left: 1px solid #dee2e6;
}

[data-theme="light"] .sidebar-content h2,
[data-theme="light"] .sidebar-content h3,
[data-theme="light"] .sidebar-content h4 {
    color: #212529;
}

[data-theme="light"] .sidebar-content p,
[data-theme="light"] .sidebar-content li {
    color: #495057;
}

[data-theme="light"] #close-sidebar {
    color: #212529;
}

/* Demo Card */
[data-theme="light"] .tour-card-demo .tour-card-content h3 {
    color: #495057;
}

[data-theme="light"] .demo-overlay {
    background: rgba(33, 37, 41, 0.8);
    color: #fff;
}

[data-theme="light"] .demo-image-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Archive Page Header - Manter imagem de fundo em ambos os modos */
[data-theme="light"] .page-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1489493887464-892be6d1daae?q=80&w=2667&auto=format&fit=crop') !important;
    background-size: cover !important;
    background-position: center !important;
}

[data-theme="light"] .page-title,
[data-theme="light"] .page-header h1 {
    color: #fff !important;
}

[data-theme="light"] .page-header p {
    color: #ddd !important;
}

/* =========================================
   APP PRELOADER (SPLASH SCREEN)
   ========================================= */
#app-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--body-bg);
    /* Use theme variable */
    z-index: 9999999;
    /* Highest priority */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out, background-color 0.3s ease;
}

[data-theme="light"] #app-preloader {
    background: #ffffff;
    /* Light background */
}

#app-preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.spinner-360 {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin360 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 15px rgba(214, 38, 38, 0.3);
}

[data-theme="light"] .spinner-360 {
    border: 3px solid rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--primary-color);
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    animation: pulseFade 2s ease-in-out infinite;
}

[data-theme="light"] .brand-text {
    color: #1a1a1a;
}

.brand-text span {
    color: var(--primary-color);
}

@keyframes spin360 {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseFade {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Hide scrollbar while loading */
body.loading {
    overflow: hidden !important;
}

/* Highlight Province Card on Map Hover */
.province-card.highlight {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.4);
    border: 2px solid var(--primary-color);
    z-index: 10;
}

/* =========================================
   ARCHIVE FILTER BAR
   ========================================= */
.tours-filter-bar {
    background: var(--surface-bg);
    padding: 20px;
    border-radius: 12px;
    margin: -30px auto 40px;
    /* Pull up to overlap header slightly */
    position: relative;
    z-index: 5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-select,
.filter-search {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    background: var(--body-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.filter-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}

.filter-select:focus,
.filter-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.search-group {
    position: relative;
    display: flex;
}

.filter-btn {
    background: var(--primary-color);
    border: none;
    color: #fff;
    width: 48px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.filter-search {
    border-radius: 8px 0 0 8px;
    /* Connect to button */
}

.filter-btn:hover {
    background: #b51b1b;
}

.reset-filter {
    color: #888888;
    background: transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.reset-filter .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.reset-filter:hover {
    color: #fff;
    background: #ff4757;
    transform: rotate(90deg);
}

[data-theme="light"] .tours-filter-bar {
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .filter-select,
[data-theme="light"] .filter-search {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #212529;
}

[data-theme="light"] .filter-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23212529' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* =========================================
   LISTBOX / DROPDOWN FIXES
   ========================================= */
select option {
    background-color: var(--body-bg);
    color: var(--text-color);
    padding: 10px;
}

/* Specific fix for Dark Mode on Windows/Chrome */
:root:not([data-theme="light"]) select option {
    background-color: #121212;
    color: #f0f0f0;
}

/* Specific fix for Light Mode */
[data-theme="light"] select option {
    background-color: #ffffff;
    color: #212529;
}

/* Hide native search clear button (Blue X) */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none;
}

/* =========================================
   HERO SECTION STYLES (Improved Legibility)
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align left */
    overflow: hidden;
    padding-top: 80px;
    /* Header offset */
}

/* Background Video/Image Container */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contrast Overlay - Crucial for readability */
.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.85) 0%,
            rgba(0, 0, 0, 0.6) 40%,
            rgba(0, 0, 0, 0.2) 100%);
    z-index: 1;
}

/* Content Container */
.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    max-width: 1200px;
    justify-content: flex-start;
}

.hero-content {
    max-width: 700px;
}

/* Typography Enhancements */
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    /* Responsive size */
    font-weight: 800;
    line-height: 1.1;
    color: var(--secondary-color);
    /* Yellow Title */
    margin-bottom: 24px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    /* Strong shadow */
    letter-spacing: -1px;
}

.hero-title .highlight {
    color: #ffffff;
    /* Inverse highlight if used */
    display: block;
}

.hero-description {
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.6;
    color: #ffffff;
    /* Pure White */
    font-weight: 500;
    /* Extra weight for readability */
    margin-bottom: 40px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    /* Description shadow */
    max-width: 600px;
}

/* Call to Action Button */
.hero-actions .btn-primary {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(214, 38, 38, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(214, 38, 38, 0.6);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 3;
    opacity: 0.8;
}

.scroll-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.scroll-mouse {
    width: 26px;
    height: 42px;
    border: 2px solid #fff;
    border-radius: 13px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        top: 8px;
        opacity: 1;
    }

    100% {
        top: 24px;
        opacity: 0;
    }
}

/* =========================================
   LOAD MORE / LESS PROVINCES
   ========================================= */
.hidden-province {
    display: none;
}

.hidden-province.visible {
    display: block;
    animation: fadeInProvince 0.6s ease forwards;
}

@keyframes fadeInProvince {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
    display: block !important;
    /* Force show container */
}

/* =========================================
   PÁGINA: SOBRE NÓS (TEMPLATE)
   ========================================= */

.sobre-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: -60px;
    /* Sobrepõe a próxima secção para efeito de camada */
}

.sobre-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(18, 18, 18, 0.9) 100%);
    z-index: 1;
}

[data-theme="light"] .sobre-hero-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(248, 249, 250, 0.9) 100%);
}

.sobre-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.sobre-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw + 1rem, 5rem);
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.sobre-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #eee;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.sobre-content-section {
    position: relative;
    z-index: 10;
    padding: 0 0 60px 0;
}

.sobre-content-glass {
    background: rgba(30, 30, 30, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    color: #ddd;
    font-size: 1.15rem;
    line-height: 1.8;
}

[data-theme="light"] .sobre-content-glass {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    color: #444;
}

.sobre-content-glass h2,
.sobre-content-glass h3 {
    color: #fff;
    font-family: var(--font-heading);
    margin-top: 40px;
    margin-bottom: 20px;
}

[data-theme="light"] .sobre-content-glass h2,
[data-theme="light"] .sobre-content-glass h3 {
    color: #1a1a1a;
}

/* --- TYPOGRAPHY UPGRADE (Storytelling) --- */
.story-chapter {
    padding: 70px 80px;
    font-size: 1.25rem;
    line-height: 1.9;
    letter-spacing: 0.3px;
}

.story-chapter p {
    margin-bottom: 30px;
}

.story-chapter p:last-child {
    font-weight: 600;
    font-size: 1.35rem;
}

/* DROP CAP - Letra Capitular Clássica */
.drop-cap {
    float: left;
    font-size: 5.5rem;
    line-height: 0.7;
    padding-top: 15px;
    padding-right: 15px;
    margin-bottom: -15px;
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 800;
    text-shadow: 2px 2px 20px rgba(214, 38, 38, 0.4);
}

/* --- TEAM PHOTO MODULE --- */
.sobre-team-module {
    margin-top: 60px;
    text-align: center;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .sobre-team-module {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.team-photo-premium {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sobre-team-module:hover .team-photo-premium {
    transform: scale(1.03);
    /* Zooms sutil cinematográfico */
}

.team-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s ease;
}

.sobre-team-module:hover .team-caption {
    transform: translateY(0);
    opacity: 1;
}

/* --- THE PREMIUM PILLARS --- */
.sobre-pillars-section {
    padding: 20px 0 120px 0;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

/* Pillar Override para ficar super Glassmorphism */
.pillar-card.premium {
    background: rgba(30, 30, 30, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) inset, 0 20px 40px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

[data-theme="light"] .pillar-card.premium {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
}

.pillar-card.premium:hover {
    transform: translateY(-10px);
    border-color: rgba(214, 38, 38, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(214, 38, 38, 0.1);
}

[data-theme="light"] .pillar-card.premium:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1), 0 0 30px rgba(214, 38, 38, 0.05);
}

/* .pillar-card info-block normal styles continuam abaixo para manter estrutura base... */
.pillar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 50px 35px;
}

.pillar-icon {
    width: 80px;
    height: 80px;
    background: rgba(214, 38, 38, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    border: 1px solid rgba(214, 38, 38, 0.2);
    box-shadow: 0 0 30px rgba(214, 38, 38, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.pillar-card:hover .pillar-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px rgba(214, 38, 38, 0.3);
    background: rgba(214, 38, 38, 0.2);
}

.pillar-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .story-chapter {
        padding: 50px 40px;
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {

    .sobre-content-glass,
    .story-chapter {
        padding: 30px 20px;
        font-size: 1.05rem;
    }

    .drop-cap {
        font-size: 4rem;
        padding-top: 10px;
    }

    .sobre-team-module {
        margin-top: 40px;
    }
}

/* =========================================
   FINAL UI TWEAKS (Overrides)
   ========================================= */
.hero-title {
    color: #ffffff !important;
    text-shadow: none !important;
}

.hero-description {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    font-weight: 500 !important;
}

/* Highlight 360 styling */
.text-highlight {
    color: #f7d00f !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
}

/* =========================================
   PANNELLUM CONTROLS OVERRIDE
   ========================================= */

/* Posicionar todos os controles (zoom e fullscreen) no canto inferior direito */
.pnlm-controls-container {
    bottom: 55px !important;
    right: 25px !important;
    left: auto !important;
    top: auto !important;
    z-index: 20 !important;
}

/* Esconder bússola ou elementos extra desnecessários para limpar o visual */
.pnlm-compass {
    display: none !important;
}

/* Base style for Zoom In, Zoom Out and Fullscreen: Translucid & Round */
.pnlm-zoom-controls,
.pnlm-fullscreen-toggle-button {
    background-color: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Arredondar a pill de zoom */
.pnlm-zoom-controls {
    border-radius: 30px !important;
    overflow: hidden !important;
}

/* Esconder o Botão Fullscreen Nativo do Pannellum completamente
   pois vamos utilizar o nosso botão customizado Universal */
.pnlm-fullscreen-toggle-button,
.pnlm-fullscreen-toggle-button-inactive {
    display: none !important;
}

/* Efeito Hover */
.pnlm-zoom-in:hover,
.pnlm-zoom-out:hover,
.pnlm-fullscreen-toggle-button:hover {
    background-color: rgba(255, 255, 255, 0.4) !important;
    opacity: 1 !important;
}

/* O Fullscreen toggle passa a ser posicionado via flexbox no pai, tiramos position absolute */
.pnlm-fullscreen-toggle-button {
    margin-bottom: 0 !important;
}