/* ============================================================
   pages-shared.css — Estilos compartilhados entre as páginas
   internas do Instituto Xamânico Rama & Sita
   (sobre.php · contato.php · orientacoes.php · registros.php)
   Esquema de cores alinhado com index.php / style.css
   ============================================================ */

/* ── Variáveis (idênticas à index) ─────────────────────────── */
:root {
    --purple-deep:   #0a0a0a;
    --purple-medium: #121212;
    --purple-light:  #e91e63;
    --pink-vibrant:  #e91e63;
    --pink-soft:     #ff8ab8;
    --gold:          #d4af37;
    --cream:         #f0f0f0;
    --shadow-glow:   rgba(0, 0, 0, 0.35);
    --text-primary:  #f0f0f0;
    --card-bg:       rgba(18, 18, 18, 0.85);
}

body.light-mode {
    --purple-deep:   #f8f1e9;
    --purple-medium: #f0e6d9;
    --purple-light:  #91173f;
    --pink-vibrant:  #e91e63;
    --pink-soft:     #691432;
    --gold:          #4b390b;
    --cream:         #1f1f1f;
    --shadow-glow:   rgba(0, 0, 0, 0.25);
    --text-primary:  #1f1f1f;
    --card-bg:       rgba(240, 230, 217, 0.95);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

/* ── Body ───────────────────────────────────────────────────── */
body {
    font-family: 'Cormorant Garamond', serif;
    background: linear-gradient(135deg, #050505 0%, #121212 50%, #1f1f1f 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

body.light-mode {
    background: linear-gradient(135deg, #f8f1e9 0%, #f0e6d9 50%, #e8d9c7 100%);
}

/* Estrelas de fundo */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(233,30,99,0.25), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(233,30,99,0.25), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(233,30,99,0.25), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(233,30,99,0.25), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(233,30,99,0.25), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(233,30,99,0.25), transparent),
        radial-gradient(1px 1px at 15% 60%, rgba(233,30,99,0.25), transparent);
    background-size: 200% 200%;
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 0.55; }
}

/* ── Partículas canvas ──────────────────────────────────────── */
.particle-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -10;
}

/* ── Navegação ──────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(180deg,
        rgba(10,10,10,0.98) 0%,
        rgba(18,18,18,0.85) 50%,
        rgba(10,10,10,0)    100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.3s ease;
}

body.light-mode nav {
    background: linear-gradient(180deg,
        rgba(248,241,233,0.98) 0%,
        rgba(240,230,217,0.85) 50%,
        transparent           100%);
}

nav.scrolled {
    background: linear-gradient(180deg,
        rgba(10,10,10,0.99) 0%,
        rgba(18,18,18,0.90) 70%,
        rgba(10,10,10,0.30) 100%);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pink-vibrant);
    text-shadow: 0 2px 12px rgba(0,0,0,0.9);
    letter-spacing: 2px;
}

.logo img { height: 50px; width: auto; display: block; }

.logo.cache-refresh-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: max-content;
}

.cache-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.22s ease, filter 0.22s ease;
    pointer-events: none;
    cursor: default;
}

.cache-refresh-btn:hover,
.cache-refresh-btn:focus-visible {
    transform: translateY(-1px) scale(1.02);
    filter: drop-shadow(0 0 12px rgba(233,30,99,0.28));
    outline: none;
}

.cache-refresh-btn img {
    pointer-events: none;
}

.cache-refresh-badge {
    position: absolute;
    top: calc(100% + 6px);
    left: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(233,30,99,0.92), rgba(145,23,63,0.92));
    border: 1px solid rgba(255,255,255,0.14);
    color: #fff6fb;
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
    animation: cacheBadgeBlink 1.15s ease-in-out infinite;
    pointer-events: none;
    z-index: 30;
}

body.light-mode .cache-refresh-badge {
    background: linear-gradient(135deg, rgba(145,23,63,0.96), rgba(233,30,99,0.9));
    color: #fff7fb;
    border-color: rgba(75,57,11,0.18);
}

@keyframes cacheBadgeBlink {
    0%, 100% {
        opacity: 0.78;
        transform: translateY(0) scale(0.98);
        box-shadow: 0 10px 24px rgba(0,0,0,0.28);
    }
    50% {
        opacity: 1;
        transform: translateY(-1px) scale(1.02);
        box-shadow: 0 14px 30px rgba(233,30,99,0.34);
    }
}

@media (max-width: 768px) {
    .cache-refresh-badge {
        top: calc(100% + 4px);
        left: 0;
        padding: 5px 9px;
        font-size: 0.56rem;
        letter-spacing: 0.8px;
    }
}

/* Menu */
.nav-menu {
    display: flex;
    gap: 35px;
    align-items: center;
    list-style: none;
}

.nav-menu li { background: none !important; padding: 0 !important; }

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    background: transparent !important;
    padding: 0 !important;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--pink-vibrant), var(--pink-soft));
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after { width: 100%; }

.nav-menu a:hover,
.nav-menu a.active { color: var(--pink-soft); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 25px; height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(8px,8px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(8px,-8px); }

/* ── Theme Toggle Button (igual ao da index) ────────────────── */
.theme-toggle-btn {
    position: fixed;
    top: 92px; right: 16px;
    z-index: 9999;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.45);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 18px rgba(0,0,0,0.55);
}

body.light-mode .theme-toggle-btn {
    background: #1a1a2e;
    color: #ffffff;
}

/* ── Hero de página interna ─────────────────────────────────── */
.page-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-size: cover;
    background-position: center 20%;
    background-attachment: fixed;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10,10,10,0.55) 0%,
        rgba(10,10,10,0.25) 30%,
        rgba(10,10,10,0.35) 65%,
        rgba(10,10,10,0.75) 85%,
        rgba(10,10,10,0.98) 100%
    );
    z-index: 1;
}

body.light-mode .page-hero::before {
    background: linear-gradient(
        to bottom,
        rgba(10,10,10,0.50) 0%,
        rgba(255,255,255,0) 30%,
        rgba(8,8,8,0.30)   65%,
        rgba(31,32,32,0.60) 85%,
        rgba(125,138,146,0.90) 100%
    );
}

@media (max-width: 768px) {
    .page-hero { background-attachment: scroll; }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 20px;
    max-width: 900px;
    margin-top: 80px;
}

.page-hero h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 30px;
    text-shadow:
        0 0 30px rgba(0,0,0,0.9),
        0 0 60px rgba(0,0,0,0.7),
        0 6px 12px rgba(0,0,0,1);
    line-height: 1.2;
}

body.light-mode .page-hero h1 {
    -webkit-text-fill-color: rgba(231,223,223,1);
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: rgba(255,255,255,0.95);
    line-height: 2;
    text-shadow:
        0 5px 10px rgba(0,0,0,0.9),
        0 8px 20px rgba(0,0,0,0.7);
    padding: 28px 40px;
    border-radius: 15px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

@media (max-width: 768px) {
    .hero-description { padding: 14px 18px; font-size: 0.95rem; }
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 20px;
    text-align: center;
    border-top: 2px solid rgba(233,30,99,0.3);
    position: relative;
    z-index: 10;
}

footer p {
    margin: 6px 0;
    color: var(--text-primary);
    font-size: 0.93rem;
}

footer a {
    color: var(--pink-vibrant);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover { color: var(--pink-soft); }

body.light-mode footer {
    background: rgba(248,241,233,0.9);
}

/* ── Responsivo — nav mobile ────────────────────────────────── */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    nav { padding: 15px 20px; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(18,18,18,0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.8);
        padding: 30px 0;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        gap: 24px;
        z-index: 999;
    }

    body.light-mode .nav-menu {
        background: rgba(248,241,233,0.98);
    }

    .nav-menu.active { left: 0; }
    .nav-menu a { font-size: 1.1rem; }

    /* Ajusta posição do botão de tema no mobile para não sobrepor hamburger */
    .theme-toggle-btn {
        top: 86px;
        right: 16px;
    }
}

/* ============================================================
   Cosmic Gold Refresh
   ============================================================ */

:root {
    --cosmic-bg: #07070b;
    --cosmic-bg-soft: #0b1020;
    --cosmic-surface: rgba(10, 14, 28, 0.78);
    --cosmic-surface-strong: rgba(9, 12, 24, 0.9);
    --cosmic-border: rgba(212, 175, 55, 0.32);
    --cosmic-border-soft: rgba(155, 172, 255, 0.16);
    --cosmic-gold: #e9c988;
    --cosmic-gold-strong: #f4d79a;
    --cosmic-text: #f6eddc;
    --cosmic-muted: rgba(246, 237, 220, 0.76);
    --cosmic-cyan: rgba(98, 208, 255, 0.42);
    --cosmic-violet: rgba(192, 120, 255, 0.34);
}

body {
    font-family: 'Cormorant Garamond', serif;
    background:
        radial-gradient(circle at 20% 20%, rgba(86, 174, 255, 0.08), transparent 24%),
        radial-gradient(circle at 78% 18%, rgba(207, 118, 255, 0.11), transparent 28%),
        radial-gradient(circle at 50% 120%, rgba(255, 204, 130, 0.08), transparent 30%),
        linear-gradient(180deg, #05060c 0%, #080b15 38%, #07070b 100%);
    color: var(--cosmic-text);
}

body::before {
    background-image:
        radial-gradient(circle at 14% 22%, rgba(255,255,255,0.8) 0 1px, transparent 1.9px),
        radial-gradient(circle at 34% 10%, rgba(255,225,179,0.7) 0 1.1px, transparent 1.9px),
        radial-gradient(circle at 52% 16%, rgba(233,188,255,0.7) 0 1.2px, transparent 2px),
        radial-gradient(circle at 76% 24%, rgba(88,212,255,0.7) 0 1px, transparent 1.8px),
        radial-gradient(circle at 82% 66%, rgba(255,255,255,0.65) 0 1px, transparent 1.8px),
        radial-gradient(circle at 18% 74%, rgba(212,175,55,0.5) 0 1px, transparent 1.8px),
        linear-gradient(180deg, rgba(7,7,11,0.12), rgba(7,7,11,0.28));
    background-size: auto, auto, auto, auto, auto, auto, auto;
    opacity: 0.55;
    animation: none;
}

body.light-mode {
    background:
        radial-gradient(circle at 18% 18%, rgba(86, 174, 255, 0.08), transparent 22%),
        radial-gradient(circle at 82% 14%, rgba(207, 118, 255, 0.08), transparent 24%),
        linear-gradient(180deg, #f7f0e5 0%, #efe4d2 52%, #e8dbc4 100%);
    color: #221a14;
}

body.light-mode::before {
    opacity: 0.28;
}

.particle-canvas {
    display: none !important;
}

nav {
    padding: 18px 32px;
    background: linear-gradient(180deg, rgba(6, 7, 14, 0.94) 0%, rgba(8, 11, 20, 0.86) 62%, rgba(6, 7, 14, 0.18) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: none;
    box-shadow: none;
}

nav.scrolled {
    background: linear-gradient(180deg, rgba(6, 7, 14, 0.98) 0%, rgba(8, 11, 20, 0.92) 74%, rgba(6, 7, 14, 0.48) 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

body.light-mode nav,
body.light-mode nav.scrolled {
    background: linear-gradient(180deg, rgba(247, 240, 229, 0.96) 0%, rgba(239, 228, 210, 0.9) 68%, rgba(247, 240, 229, 0.5) 100%);
}

.logo {
    color: var(--cosmic-gold);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.logo img {
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.48));
}

.nav-menu {
    gap: 30px;
}

.nav-menu a {
    color: var(--cosmic-text);
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.42);
}

.nav-menu a::after {
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.95), rgba(244, 215, 154, 0.35));
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--cosmic-gold-strong);
}

body.light-mode .nav-menu a {
    color: #2b2118;
    text-shadow: none;
}

.page-hero {
    min-height: 86svh;
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
}

.page-hero::before {
    background:
        radial-gradient(circle at 50% 18%, rgba(227, 154, 255, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(6, 7, 14, 0.62) 0%, rgba(7, 8, 16, 0.36) 28%, rgba(7, 9, 18, 0.54) 72%, rgba(5, 6, 12, 0.94) 100%);
}

body.light-mode .page-hero::before {
    background:
        linear-gradient(180deg, rgba(22, 18, 14, 0.38) 0%, rgba(22, 18, 14, 0.14) 30%, rgba(247, 240, 229, 0.18) 58%, rgba(239, 228, 210, 0.82) 100%);
}

.page-hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.48), transparent);
    z-index: 2;
}

.hero-content {
    max-width: 980px;
    padding: 60px 28px 34px;
    margin-top: 76px;
}

.page-hero h1 {
    color: var(--cosmic-gold-strong);
    text-shadow:
        0 10px 40px rgba(0, 0, 0, 0.56),
        0 0 24px rgba(255, 216, 158, 0.14);
    letter-spacing: 0.14em;
}

.hero-description {
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
    border: none;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--cosmic-text);
    font-size: clamp(1.08rem, 2vw, 1.4rem);
    line-height: 1.9;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.52);
}

body.light-mode .hero-description {
    color: #2b2118;
    text-shadow: none;
}

footer {
    background:
        linear-gradient(180deg, rgba(7, 9, 18, 0.32) 0%, rgba(7, 9, 18, 0.92) 24%, rgba(5, 6, 12, 0.98) 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

footer p,
footer a {
    color: rgba(246, 237, 220, 0.78);
}

footer a:hover {
    color: var(--cosmic-gold-strong);
}

body.light-mode footer {
    background: linear-gradient(180deg, rgba(239, 228, 210, 0.7) 0%, rgba(239, 228, 210, 0.94) 100%);
}

@media (max-width: 768px) {
    nav {
        padding: 16px 18px;
    }

    .nav-menu {
        top: 76px;
        width: calc(100% - 20px);
        margin: 0 10px;
        padding: 24px 18px 26px;
        background: rgba(8, 11, 20, 0.96);
        border: 1px solid rgba(212, 175, 55, 0.14);
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
        border-radius: 22px;
        gap: 10px;
    }

    body.light-mode .nav-menu {
        background: rgba(247, 240, 229, 0.98);
    }

    .nav-menu a {
        width: 100%;
        padding: 12px 14px !important;
        border-radius: 14px;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(212, 175, 55, 0.08) !important;
    }

    .hero-content {
        padding: 44px 18px 28px;
        margin-top: 54px;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.75;
    }
}
