/* assets/css/styles.css */

:root {
    color-scheme: dark;
    --brand-primary: #38bdf8;
    --color-background-gold: #D98E0D;
    --gradient-gold: linear-gradient(135deg, hsl(43, 80%, 62%), hsl(43, 74%, 49%), hsl(43, 70%, 38%));
    --shadow-gold: 0 4px 30px hsla(43, 74%, 49%, 0.25);
}

.text-brand-primary { color: var(--brand-primary) !important; }

/* CRÍTICO: Prevenir overflow horizontal em TODOS os elementos */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(99, 102, 241, 0.18), transparent 60%),
                #020617;
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

main {
    overflow-x: hidden;
}

.dropdown-menu {
    z-index: 100 !important;
}

header {
    z-index: 60 !important; 
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a.bg-white\/10 span.font-semibold,
.dropdown-menu a:hover span.font-semibold {
    color: #38bdf8 !important;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    color: rgba(226, 232, 240, 0.88);
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.4rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, #1d4ed8);
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #38bdf8;
}

.nav-link.text-brand-red:hover, .nav-link.text-brand-red.active {
    color: #dc2626;
}

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

.nav-link.text-brand-red::after {
    background: linear-gradient(90deg, #dc2626, #b91c1c);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(148, 163, 184, 0.8);
    padding: 1rem 0;
}

.breadcrumb a {
    color: rgba(148, 163, 184, 0.9);
    transition: color 0.3s ease;
}

.breadcrumb a:hover, .breadcrumb .current {
    color: #38bdf8;
}

.breadcrumb .separator {
    color: rgba(148, 163, 184, 0.5);
}

/* Buttons */
.btn-primary, .btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 1.65rem 1.6rem !important;
    font-weight: 700;
    box-shadow: 0 15px 35px -15px rgba(16, 185, 129, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.btn-primary:hover, .btn-green:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 45px -18px rgba(16, 185, 129, 0.9);
    filter: brightness(1.1);
}

.btn-secondary {
    padding: 1.65rem 1.6rem !important;
    border-radius: 9999px;
    font-weight: 600;
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.6);
}

.btn-red {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: #ffffff;
    padding: 1.65rem 1.6rem !important;
    font-weight: 700;
    box-shadow: 0 15px 35px -15px rgba(220, 38, 38, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.btn-red:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 45px -18px rgba(220, 38, 38, 0.9);
    filter: brightness(1.1);
}

.btn-red-secundary {
    padding: 1.65rem 1.6rem !important;
}

/* Panels & Cards */
.glass-panel, .glass-panel-menu {
    backdrop-filter: blur(24px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -25px rgba(15, 23, 42, 0.9);
}

.glass-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Ícones dos Módulos */
.module-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 1.25rem;
  color: var(--brand-primary);
}


/* Controle do Accordion (Expandir/Recolher) */
.module-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.module-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
  padding: 0 1rem;
}

/* Quando estiver aberto (via JS) */
.module.active .module-content {
  max-height: 500px; /* Valor alto o suficiente */
  padding-bottom: 1rem;
}

.module.active .fa-chevron-down {
  transform: rotate(180deg);
  opacity: 1;
}

/* Estilização da Lista */
.module-list {
  list-style: none;
  padding-left: 0.5rem;
  margin-top: 0.5rem;
}

.module-list li {
  color: #94a3b8; /* slate-400 */
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.25rem;
}

.module-list li::before {
  content: "•";
  color: var(--brand-primary);
  position: absolute;
  left: 0;
}

/* Ajuste para arredondar o card externo e os internos */
.conteudo-card.glass-panel {
    width: 100%;           /* Ocupa toda a largura do div pai (max-w-3xl) */
    display: block;        /* Garante comportamento de bloco */
    border-radius: 1.5rem; /* Bordas arredondadas (24px) */
    overflow: hidden;      /* Corta o conteúdo que sair das bordas arredondadas */
    box-sizing: border-box; /* Garante que o padding não aumente a largura */
}

.module.glass-card {
    border-radius: 0.75rem; /* Raio menor para harmonia visual interna */
    width: 100%;           /* Garante que o item interno também preencha o card */
}

/* Opcional: Ajuste para o último item não encostar no fundo */
.conteudo-card .space-y-4 {
    padding-bottom: 0.5rem;
}

.floating-shape {
    filter: blur(60px);
    opacity: 0.65;
}

.card-premium, .card-premium-gold {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 60px -35px rgba(15, 23, 42, 0.8);
}

.card-premium { border: 1px solid rgba(148, 163, 184, 0.12); }
.card-premium-gold { border: 1px solid hsla(43, 74%, 49%, 0.3); }

.card-premium::before, .card-premium-gold::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-premium::before { background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), transparent 60%); }
.card-premium-gold::before { background: linear-gradient(135deg, hsla(43, 74%, 49%, 0.15), transparent 60%); }

.card-premium:hover::before, .card-premium-gold:hover::before { opacity: 1; }

.icon-gold { color: hsla(43, 74%, 49%, 0.9) !important; }
.bg-gold { background-color: var(--color-background-gold); transition: background-color 0.5s ease-in-out; }

.icon-gold-bg {
    background-color: rgba(217, 142, 13, 0.15); 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Disciplines */
.disciplines-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.discipline-card {
    background: rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(18px);
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(217, 142, 13, 0.3);
    text-align: center;
    transition: all 0.3s ease;
}

.discipline-card:hover {
    border-color: #D98E0D;
    box-shadow: 0 10px 30px -10px rgba(217, 142, 13, 0.3);
    transform: translateY(-5px);
}

.discipline-icon {
    width: 56px; height: 56px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: rgba(217, 142, 13, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #D98E0D;
    border: 1px solid rgba(217, 142, 13, 0.1);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: clamp(4rem, 9vw, 8rem) 0;
    width: 100%;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 58%),
                radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.18), transparent 55%),
                linear-gradient(135deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.75) 55%, rgba(15, 23, 42, 0.35) 100%);
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1.4rem;
    border-radius: 9999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(15, 23, 42, 0.6);
    color: #e0f2fe;
    font-size: 0.68rem;
    letter-spacing: 0.38em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.75rem, 5vw, 4.6rem);
    font-weight: 800;
    line-height: 1.05;
    color: #f8fafc;
}

.hero-title .highlight {
    background: linear-gradient(120deg, #38bdf8 0%, #1d4ed8 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Centralização do Logo MedCore */
.hero-logo {
    display: block;       /* Transforma em bloco para aceitar margens laterais automáticas */
    margin-left: auto;    /* Margem automática à esquerda para centralizar */
    margin-right: auto;   /* Margem automática à direita para centralizar */
    width: 30%;          /* Define a largura para 60% do tamanho original */
    height: auto;         /* Mantém a proporção da imagem automaticamente */
    max-width: 100%;      /* Garante que não ultrapasse a tela em celulares (importante para responsividade) */
}

/* Força a cor vermelha em qualquer resolução de Desktop */
/* === ECG Loader === */
#tm-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
              radial-gradient(circle at bottom right, rgba(99, 102, 241, 0.18), transparent 60%),
              #020617;
  transition: opacity 0.5s ease;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .disciplines-grid { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .hero-meta { grid-template-columns: repeat(3, 1fr) !important; }
    .btn-primary, .btn-secondary, .btn-red { width: 100%; }
    #chat-container { width: 90vw; height: 70vh; }
}

/* Countdown */
.countdown-item {
    padding: 1rem 0.75rem;
}
.countdown-value {
    font-size: clamp(2rem, 8vw, 3rem);
}

/* Estilos para elementos com cor vermelha */
.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(239, 68, 68, 0.08));
    border: 1px solid rgba(220, 38, 38, 0.25);
    backdrop-filter: blur(12px);
}
.countdown-value {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(220, 38, 38, 0.3);
}
.countdown-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(226, 232, 240, 0.7);
}

.media-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;      /* ← era 10px */
    padding: 16px;
}

.media-thumb {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 9/16;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.08);
    width: 180px;   /* ← era 120px */
    flex-shrink: 0;
}

.btn-gold {
    background: var(--gradient-gold);
    color: #ffffff;
    padding: 1.65rem 1.6rem !important;
    font-weight: 700;
    box-shadow: var(--shadow-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    border: none;
}

.btn-gold:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow: 0 8px 35px hsla(43, 74%, 49%, 0.4);
}

/* --- CSS CRÍTICO PARA O FLIP 3D --- */
.flip-card {
    background-color: transparent;
    perspective: 1200px; /* Intensidade do efeito 3D */
    height: 420px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d; /* Essencial para o 3D funcionar */
}

/* Gira o card no Hover (Desktop) e Classe Ativa (Mobile) */
.flip-card:hover .flip-card-inner, 
.flip-card.active .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;         /* Esconde a face oposta */
    border-radius: 1.5rem;
    overflow: hidden;
}

.flip-card-front {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 1));
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.flip-card-back {
    transform: rotateY(180deg); /* Já começa invertido para aparecer certo ao girar */
    z-index: 1;
}

/* Ajuste fino para o scroll do depoimento */
.custom-scroll::-webkit-scrollbar { width: 4px; }
.custom-scroll::-webkit-scrollbar-thumb { background: #D98E0D; border-radius: 10px; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}

/* Gradientes de Texto */

.text-gradiente-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
    display: inline-block; /* Garante que o gradiente se comporte corretamente */
}

.text-gradiente-red {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
    display: inline-block;
}

footer {
    position: relative;
    z-index: 10;
}
