/*
Theme Name: Teatro Coelima
Theme URI: https://teatrocoelima.pt
Author: Agilstore
Author URI: https://agilstore.pt
Description: Tema oficial do Teatro Coelima — design dark elegante com paleta dourada.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teatrocoelima
Tags: dark, theater, custom-menu, template-parts
*/

/* -----------------------------------------------
   Variáveis Globais & Tema Dark
----------------------------------------------- */
:root {
    --bg-dark-950: #0a0a0c;
    --bg-dark-900: #111114;
    --bg-dark-800: #1a1a1f;
    --bg-dark-700: #242429;
    --bg-dark-600: #2e2e35;
    --color-gold-400: #d4a843;
    --color-gold-500: #c9952e;
    --color-gold-600: #b3831f;
    --color-cream-100: #f5f0e8;
    --color-cream-200: #e8e0d0;
}

/* -----------------------------------------------
   Reset & Base Dark
----------------------------------------------- */
html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark-950);
    color: var(--color-cream-100);
}

body {
    background-color: var(--bg-dark-950) !important;
    color: var(--color-cream-100) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
}

/* Garantir que títulos, textos e links não recebam preto/cinza do WordPress */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-cream-100);
}

p,
span,
div,
li,
td,
th,
label {
    color: inherit;
}

a {
    color: var(--color-cream-200);
    text-decoration: none;
}

a:hover {
    color: var(--color-gold-400);
}

/* -----------------------------------------------
   Classes Utilitárias de Cores (Fallback & Override)
----------------------------------------------- */
.text-cream-100 {
    color: #f5f0e8 !important;
}

.text-cream-200 {
    color: #e8e0d0 !important;
}

.text-gold-400 {
    color: #d4a843 !important;
}

.text-gold-500 {
    color: #c9952e !important;
}

.text-dark-950 {
    color: #0a0a0c !important;
}

.bg-dark-950 {
    background-color: #0a0a0c !important;
}

.bg-dark-900 {
    background-color: #111114 !important;
}

.bg-dark-800 {
    background-color: #1a1a1f !important;
}

.bg-dark-700 {
    background-color: #242429 !important;
}

.bg-gold-500 {
    background-color: #c9952e !important;
}

.bg-gold-400 {
    background-color: #d4a843 !important;
}

.border-dark-700 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.aspect-2-3 {
    aspect-ratio: 2 / 3 !important;
}

.aspect-16-9 {
    aspect-ratio: 16 / 9 !important;
}

.border-dark-600 {
    border-color: #2e2e35 !important;
}

.border-gold-400 {
    border-color: #d4a843 !important;
}

/* -----------------------------------------------
   Classes de Espaçamento de Letras (Letter Spacing)
----------------------------------------------- */
.tracking-neg-01 {
    letter-spacing: -0.01em;
}

.tracking-neg-02 {
    letter-spacing: -0.02em;
}

.tracking-02 {
    letter-spacing: 0.02em;
}

.tracking-06 {
    letter-spacing: 0.06em;
}

.tracking-08 {
    letter-spacing: 0.08em;
}

/* -----------------------------------------------
   Hero Gradient
----------------------------------------------- */
.hero-gradient {
    background: linear-gradient(135deg, #0a0a0c 0%, #1a1a1f 50%, #111114 100%);
}

/* -----------------------------------------------
   Efeitos visuais
----------------------------------------------- */
.gold-glow {
    box-shadow: 0 0 40px rgba(201, 149, 46, 0.15);
}

.text-glow {
    text-shadow: 0 0 30px rgba(201, 149, 46, 0.3);
}

/* -----------------------------------------------
   Animação fadeInUp
----------------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* -----------------------------------------------
   Navbar — estado com scroll
----------------------------------------------- */
.navbar-scrolled {
    background-color: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(12px);
}

/* -----------------------------------------------
   Formulário de contacto — feedback
----------------------------------------------- */
.form-feedback {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.form-feedback.success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.form-feedback.error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* -----------------------------------------------
   Menu mobile
----------------------------------------------- */
#mobile-menu {
    display: none;
}

#mobile-menu.open {
    display: block;
}

/* -----------------------------------------------
   Linha divisória entre Serviços e Equipa
----------------------------------------------- */
#servicos {
    border-bottom: 1px solid rgba(46, 46, 53, 0.5);
}

/* -----------------------------------------------
   Carrossel Swiper de Eventos Destacados (16:9)
----------------------------------------------- */
.aspect-video {
    aspect-ratio: 16 / 9;
}

.swiper-featured-events .aspect-video {
    transform: translate3d(0, 0, 0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    will-change: transform;
}

.swiper-featured-events .aspect-video img {
    will-change: transform;
}

.swiper-featured-events {
    padding-bottom: 3rem !important;
    overflow: visible !important;
}

.event-card-overlay {
    background: linear-gradient(
        to top,
        rgba(10, 10, 12, 0.95) 0%,
        rgba(10, 10, 12, 0.8) 40%,
        rgba(10, 10, 12, 0.3) 75%,
        transparent 100%
    );
    pointer-events: none;
}

.swiper-featured-events .swiper-slide {
    opacity: 0.4;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: scale(0.92);
}

.swiper-featured-events .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
}

.swiper-featured-events .swiper-slide-active .aspect-video {
    box-shadow: 0 10px 40px -10px rgba(212, 168, 67, 0.25);
}

/* Setas de navegação personalizadas do Swiper */
.featured-swiper-prev,
.featured-swiper-next {
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 9999px;
    background-color: rgba(17, 17, 20, 0.85) !important;
    border: 1px solid rgba(212, 168, 67, 0.3) !important;
    color: #d4a843 !important;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease !important;
    top: 50% !important;
    margin-top: -1.5rem !important;
}

.featured-swiper-prev:hover,
.featured-swiper-next:hover {
    background-color: #c9952e !important;
    border-color: #c9952e !important;
    color: #0a0a0c !important;
    box-shadow: 0 0 25px rgba(201, 149, 46, 0.4);
}

.featured-swiper-prev::after,
.featured-swiper-next::after {
    font-size: 1.1rem !important;
    font-weight: bold;
}

/* Paginação personalizada do Swiper */
.featured-swiper-pagination {
    bottom: 0 !important;
}

.featured-swiper-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #2e2e35;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.featured-swiper-pagination .swiper-pagination-bullet-active {
    width: 28px;
    border-radius: 5px;
    background-color: #d4a843 !important;
    opacity: 1;
}

.hidden-bullet {
    display: none !important;
}

/* -----------------------------------------------
   Preloader — Abertura de Cortinas (Split Curtain)
----------------------------------------------- */
#preloader {
    pointer-events: auto;
    transition: opacity 0.4s ease 1s, visibility 0.4s ease 1s;
}

#preloader-panel-left,
#preloader-panel-right {
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);
    will-change: transform;
}

#preloader-content {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Barra de progresso do preloader */
.preloader-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #d4a843;
    border-radius: 9999px;
    animation: preloaderProgress 1.2s ease-in-out infinite;
}

@keyframes preloaderProgress {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Estado de abertura (quando a página carrega) */
#preloader.loaded #preloader-content {
    opacity: 0;
    transform: scale(0.9);
}

#preloader.loaded #preloader-panel-left {
    transform: translateX(-100%);
}

#preloader.loaded #preloader-panel-right {
    transform: translateX(100%);
}

#preloader.loaded {
    pointer-events: none;
    visibility: hidden;
}

/* -----------------------------------------------
   Cartaz Lightbox — motion.dev
----------------------------------------------- */
.tc-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.tc-lightbox-overlay.active {
    pointer-events: auto;
}

.tc-lightbox-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(6, 6, 8, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
}

.tc-lightbox-img {
    position: fixed;
    z-index: 9999;
    object-fit: cover;
    box-shadow: 0 25px 80px -20px rgba(0, 0, 0, 0.6);
}

.tc-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(17, 17, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-cream-100);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    padding: 0;
}

.tc-lightbox-close:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

.tc-lightbox-download {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: var(--color-gold-500);
    color: var(--bg-dark-950);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(201, 149, 46, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.tc-lightbox-download:hover {
    background-color: var(--color-gold-400);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(201, 149, 46, 0.45);
    color: var(--bg-dark-950);
}

.tc-lightbox-download svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

@media (max-width: 640px) {
    .tc-lightbox-download {
        bottom: 16px;
        right: 16px;
        padding: 8px 14px;
        font-size: 0.65rem;
    }

    .tc-lightbox-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
    }
}

/* -----------------------------------------------
   Flatpickr — Dark Theme Overrides (Admin)
----------------------------------------------- */
.flatpickr-calendar {
    background: #111114 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    font-family: 'Inter', system-ui, sans-serif;
}

.flatpickr-months {
    background: #111114;
    border-radius: 12px 12px 0 0;
}

.flatpickr-months .flatpickr-month {
    color: #f5f0e8 !important;
    fill: #f5f0e8 !important;
    height: 44px;
}

.flatpickr-current-month {
    color: #f5f0e8 !important;
    font-weight: 600;
}

.flatpickr-current-month input {
    color: #f5f0e8 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #1a1a1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #f5f0e8;
}

span.flatpickr-weekday {
    color: #d4a843 !important;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.flatpickr-day {
    color: #e8e0d0 !important;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    transition: all 0.15s ease;
    line-height: 2.7rem;
    font-size: 0.8rem;
}

.flatpickr-day:hover {
    background: #1a1a1f !important;
    border-color: rgba(212, 168, 67, 0.3) !important;
    color: #d4a843 !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #c9952e !important;
    border-color: #c9952e !important;
    color: #0a0a0c !important;
    font-weight: 700;
}

.flatpickr-day.today {
    border-color: rgba(212, 168, 67, 0.4) !important;
}

.flatpickr-day.today:hover {
    background: rgba(212, 168, 67, 0.1) !important;
}

.flatpickr-day.flatpickr-disabled {
    color: #2e2e35 !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #2e2e35 !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #d4a843 !important;
    fill: #d4a843 !important;
    padding: 6px;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: #c9952e !important;
    fill: #c9952e !important;
}

.flatpickr-weeks {
    padding-bottom: 4px;
}

.flatpickr-weeks + span.flatpickr-months {
    border-radius: 0;
}

/* -----------------------------------------------
   Date Rows — Lista de datas no Admin Meta Box
----------------------------------------------- */
#evento-datas-time-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tc-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #1a1a1f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.tc-date-row:hover {
    border-color: rgba(212, 168, 67, 0.3);
}

.tc-date-label {
    color: #e8e0d0;
    font-size: 12px;
    font-weight: 600;
    min-width: 100px;
    white-space: nowrap;
}

.tc-date-time-input {
    flex: 1;
    background: #0a0a0c !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    color: #f5f0e8 !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    outline: none;
    transition: border-color 0.2s ease;
}

.tc-date-time-input:focus {
    border-color: #d4a843 !important;
}

.tc-date-time-input::placeholder {
    color: #2e2e35;
}

.tc-date-remove {
    background: none;
    border: none;
    color: #f87171;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tc-date-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* -----------------------------------------------
   Ajuste de Bordas Divisórias e Badges (Suporte a Opacidade do Tailwind CDN)
   ----------------------------------------------- */
.border-gold-400\/30 {
    border-color: rgba(212, 168, 67, 0.3) !important;
}

.border-gold-500\/30 {
    border-color: rgba(201, 149, 46, 0.3) !important;
}

.border-dark-700\/80 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.border-dark-700\/60 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.border-cream-100\/10 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.border-white\/10 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.border-white\/5 {
    border-color: rgba(255, 255, 255, 0.04) !important;
}

/* -----------------------------------------------
   Ajustes do Slider de Fundo (Hero Background)
   ----------------------------------------------- */
.hero-slider-wrapper,
.hero-slider-wrapper .wp-slider,
.hero-slider-wrapper .wp_slider,
.hero-slider-wrapper .swiper-container,
.hero-slider-wrapper .swiper-wrapper,
.hero-slider-wrapper .swiper-slide,
.hero-slider-wrapper img,
.hero-slider-wrapper iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    object-fit: cover !important;
}

/* -----------------------------------------------
   Transição de Rolagem do Header (Navbar)
   ----------------------------------------------- */
#site-navbar {
    background-color: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

#site-navbar.navbar-scrolled {
    background-color: rgba(10, 10, 12, 0.85) !important; /* Cor dark-950 com opacidade */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Transição de Altura da Navbar */
#site-navbar .navbar-inner {
    height: 6rem; /* Altura inicial maior (96px) */
    transition: height 0.3s ease;
}

#site-navbar.navbar-scrolled .navbar-inner {
    height: 4.5rem; /* Altura reduzida após rolar (72px) */
}

/* Transição do Logótipo (Imagem) */
#site-navbar .navbar-logo {
    height: 3.5rem; /* Tamanho inicial (56px) */
    transition: height 0.3s ease;
}

#site-navbar.navbar-scrolled .navbar-logo {
    height: 2.25rem; /* Tamanho reduzido após rolar (36px) */
}

/* Transição do Logótipo (Texto) */
#site-navbar .navbar-text-logo {
    font-size: 1.75rem; /* Tamanho inicial */
    transition: font-size 0.3s ease;
}

#site-navbar.navbar-scrolled .navbar-text-logo {
    font-size: 1.25rem; /* Tamanho reduzido após rolar */
}

/* -----------------------------------------------
   Paginação de Eventos
   ----------------------------------------------- */
.event-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 4rem;
}

.event-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-cream-200);
    background-color: var(--bg-dark-900);
    border: 1px solid var(--bg-dark-700);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.event-pagination .page-numbers:hover {
    color: var(--color-gold-400);
    border-color: var(--color-gold-400);
    background-color: var(--bg-dark-800);
    box-shadow: 0 0 15px rgba(212, 168, 67, 0.15);
}

.event-pagination .page-numbers.current {
    color: var(--bg-dark-950) !important;
    background-color: var(--color-gold-400);
    border-color: var(--color-gold-400);
    box-shadow: 0 4px 15px rgba(212, 168, 67, 0.25);
}

.event-pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    color: var(--color-cream-200);
    opacity: 0.5;
}

/* -----------------------------------------------
   Filtros de Agenda — Correção de Foco e Cliques
   ----------------------------------------------- */
.agenda-status-btn:focus,
.agenda-status-btn:active,
.agenda-status-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.agenda-status-btn.bg-gold-500:focus,
.agenda-status-btn.bg-gold-500:active {
    border-color: transparent !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.agenda-status-btn.bg-dark-800:focus,
.agenda-status-btn.bg-dark-800:active {
    border-color: rgba(255, 255, 255, 0.08) !important;
}