/* ============================================================
   LIGHT MODE
============================================================ */
:root {
    --emi-primary: #ff7e2d;
    --emi-light: #fdbd80;

    --bonnie-primary: #944fe8;
    --bonnie-light: #b08ed6;

    --fan-gradient: linear-gradient(90deg, #ff7e2d, #944fe8);

    /* Light theme base */
    --bg-color: #f9f4ff;
    --text-color: #333;
    --header-footer-bg: var(--fan-gradient);

    --card-bg: #ffffff;
    --shadow-soft: 0px 4px 15px rgba(0, 0, 0, 0.08);

    --emi-section-bg: var(--emi-light);
    --bonnie-section-bg: var(--bonnie-light);
    --shared-section-bg: var(--fan-gradient);
}

/* ============================================================
   DARK MODE
============================================================ */
:root[data-theme="dark"] {
    --bg-color: #1a1124;
    --text-color: #f4eaff;

    --header-footer-bg: linear-gradient(90deg, #6a3ea1, #ff8c42);

    --card-bg: #180a22;

    --emi-section-bg: #7a4f2b;
    --bonnie-section-bg: #4c2c6b;
    --shared-section-bg: linear-gradient(90deg, #6a3ea1, #ff8c42);

    --shadow-soft: 0px 4px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   GLOBAL STYLES
============================================================ */
* {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Poppins", Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
}

/* ============================================================
   MAIN CONTENT AREA
============================================================ */
main {
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* ============================================================
   HEADER
============================================================ */
header {
    width: 100%;
    padding: 12px 20px;

    background: var(--header-footer-bg);
    color: white;
    box-shadow: var(--shadow-soft);

    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 1.4rem;
    font-weight: 600;
    box-sizing: border-box;
}

.logo {
    white-space: nowrap;
    font-size: 1.3rem;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px; /* Helps hide scrollbar */
}

.top-nav::-webkit-scrollbar {
    height: 4px;
}
.top-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.top-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;

    padding: 6px 10px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: 0.3s ease;

    white-space: nowrap;
}

.top-nav a:hover {
    transform: scale(1.06);
}

.theme-button {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;

    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--text-color);

    transition: 0.3s ease;
    white-space: nowrap;
}

.theme-button:hover {
    opacity: 0.7;
}

.lang-button {
  color: white;
  text-decoration: none;
  font-weight: 500;

  padding: 6px 10px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  transition: 0.3s ease;

  white-space: nowrap;
  border: none;              /* igual link */
  cursor: pointer;
}

/* mesmo hover dos links da nav */
.lang-button:hover {
  transform: scale(1.06);
}


/* ============================================================
   FOOTER
============================================================ */
footer {
    width: 100%;
    text-align: center;
    padding: 15px 0;

    background: var(--header-footer-bg);
    color: white;
    box-shadow: var(--shadow-soft);
}

/* ============================================================
   LINKS SECTION
============================================================ */

/* spacing + layout */
.links-section .link-block {
    margin: 25px 0; /* 25px em cima e embaixo */
}

.links-section h3 {
    margin: 25px 0; /* 25px em cima e embaixo do título */
}


/* link list arranged neatly */
.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* prettier links */
.links-list a {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;

    color: white;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;

    text-decoration: none;
    transition: 0.25s ease-in-out;
    border: 2px solid rgba(255,255,255,0.25);
}

/* hover effect */
.links-list a:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.06);
}

/* ============================================================
   SECTION STYLES (Emi, Bonnie, Shared)
============================================================ */
.emi-section {
    background: var(--emi-section-bg);
    border-left: 7px solid var(--emi-primary);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.bonnie-section {
    background: var(--bonnie-section-bg);
    border-left: 7px solid var(--bonnie-primary);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.shared-section {
    display: inline-block;
    background: var(--shared-section-bg);
    color: white;

    border-radius: 16px;

    padding: 20px;
    padding-top: 10px !important;

    width: max-content;
    max-width: 90%;
    margin: 20px auto;

    text-align: center;
}

.shared-box {
    background: var(--bg-color);
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    border-radius: 16px;
    padding: 20px;
    margin-top: 0 !important;
    padding-top: 20px !important;
    padding-bottom: 50px !important;

    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ============================================================
   EMI PAGE – Wikipedia Style Layout (CORRIGIDO)
============================================================ */

/* Main wrapper for Emi page */
.emi-main {
    display: flex !important;
    flex-direction: row !important;

    justify-content: flex-start !important;
    align-items: flex-start !important;

    width: 100% !important; 
    max-width: none !important;
    margin: 0 !important;      
    padding: 20px !important;

    gap: 30px;
    box-sizing: border-box;

    text-align: center;            
}

/* ============================
   Sidebar (Left Navigation)
============================ */
.emi-sidebar {
    width: 260px;
    flex-shrink: 0;

    padding: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);

    position: sticky;
    top: 20px;

    align-self: flex-start;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;

    margin-left: 0 !important;
}

/* Sidebar title */
.emi-sidebar h3 {
    margin-top: 0;
    color: var(--emi-primary);
    font-size: 1.1rem;
}

/* Sidebar links container */
.emi-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Each link */
.emi-sidebar nav a {
    text-decoration: none;
    color: var(--text-color);
    padding: 6px 8px;
    border-radius: 6px;
    transition: 0.2s ease;
}

.emi-sidebar nav a:hover {
    background: var(--emi-light);
    color: black;
    transform: translateX(3px);
}

/* ============================
   Main Content (Right Side)
============================ */
.emi-content {
    flex: 1;             /* ocupa todo o espaço restante */
    min-width: 0;        /* evita overflow horizontal */
}

.emi-content > *:first-child {
    margin-top: 0 !important;
    padding-top: 10px !important;
}

.emi-title {
    color: var(--emi-primary);
    text-align: center !important;
    margin-bottom: 5px;
}

/* Section block */
.emi-section-block {
    background: var(--emi-section-bg);
    border-left: 7px solid var(--emi-primary);
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: var(--shadow-soft);
}

.emi-section-block h2 {
    color: var(--emi-primary);
    margin-top: 0;
}

.emi-list {
    text-align: left;
    padding-left: 20px;
}

.emi-list li {
    margin: 8px 0;
}

/* prettier links */
.emi-list a {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;

    color: var(--text-color);
    border-radius: 12px;

    text-decoration: none;
    transition: 0.25s ease-in-out;
}

/* hover effect */
.emi-list a:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.06);
}

/* ============================================================
   BONNIE PAGE – Wikipedia Style Layout (CORRIGIDO)
============================================================ */

/* Main wrapper for Bonnie page */
.bonnie-main {
    display: flex !important;
    flex-direction: row !important;

    justify-content: flex-start !important;
    align-items: flex-start !important;

    width: 100% !important; 
    max-width: none !important;
    margin: 0 !important;      
    padding: 20px !important;

    gap: 30px;
    box-sizing: border-box;

    text-align: center;            
}

/* ============================
   Sidebar (Left Navigation)
============================ */
.bonnie-sidebar {
    width: 260px;
    flex-shrink: 0;

    padding: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);

    position: sticky;
    top: 20px;

    align-self: flex-start;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;

    margin-left: 0 !important;
}

/* Sidebar title */
.bonnie-sidebar h3 {
    margin-top: 0;
    color: var(--bonnie-primary);
    font-size: 1.1rem;
}

/* Sidebar links container */
.bonnie-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Each link */
.bonnie-sidebar nav a {
    text-decoration: none;
    color: var(--text-color);
    padding: 6px 8px;
    border-radius: 6px;
    transition: 0.2s ease;
}

.bonnie-sidebar nav a:hover {
    background: var(--bonnie-light);
    color: black;
    transform: translateX(3px);
}

/* ============================
   Main Content (Right Side)
============================ */
.bonnie-content {
    flex: 1;             /* ocupa todo o espaço restante */
    min-width: 0;        /* evita overflow horizontal */
}

.bonnie-content > *:first-child {
    margin-top: 0 !important;
    padding-top: 10px !important;
}

.bonnie-title {
    color: var(--bonnie-primary);
    text-align: center !important;
    margin-bottom: 5px;
}

/* Section block */
.bonnie-section-block {
    background: var(--bonnie-section-bg);
    border-left: 7px solid var(--bonnie-primary);
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: var(--shadow-soft);
}

.bonnie-section-block h2 {
    color: var(--bonnie-primary);
    margin-top: 0;
}

.bonnie-list {
    text-align: left;
    padding-left: 20px;
}

.bonnie-list li {
    margin: 8px 0;
}

/* prettier links */
.bonnie-list a {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;

    color: var(--text-color);
    border-radius: 12px;

    text-decoration: none;
    transition: 0.25s ease-in-out;
}

/* hover effect */
.bonnie-list a:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.06);
}

/* ============================================================
   HOME HERO UPGRADE
============================================================ */

/* Full page layout */
.home {
    min-height: calc(100vh - 160px); /* full screen minus header/footer */
    display: flex;
    flex-direction: column;
    justify-content: center; /* center vertically */
    align-items: center; /* center horizontally */
    text-align: center;
    padding: 20px; /* small padding so centering is not pushed */
    box-sizing: border-box;
}

/* -------------------------------
   HERO TITLE ANIMATION
-------------------------------- */
.home-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;

    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;

    background: var(--fan-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlide 0.8s forwards;
}

@keyframes fadeSlide {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* -------------------------------
   SUBTITLE
-------------------------------- */
.home-subtitle {
    max-width: 750px;
    margin-top: 12px;
    font-size: 1.15rem;
    line-height: 1.6;

    opacity: 0;
    animation: fadeIn 1.2s forwards 0.2s;
}

.home-subtitle a {
    color: inherit;              
    text-decoration: none;       
    font-weight: 600;         
}

.home-subtitle a:hover {
    text-decoration: underline; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.home-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* ensures text is centered */
    text-align: center; /* ensures text itself is centered */
}

/* -------------------------------
   BUTTONS
-------------------------------- */
.home-buttons {
    margin-top: 28px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.home-btn {
    padding: 12px 22px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;

    transition: 0.25s ease;

    /* Dynamic color depending on theme */
    color: white; 
    background: var(--fan-gradient); /* gradient background keeps contraste */
}

.home-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.15);
}


/* -------------------------------
   SPOTLIGHT IMAGE
-------------------------------- */
.home-image {
    margin-top: 40px;
    animation: fadeIn 1.5s forwards;
}

.home-image img {
    width: 260px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 0 25px rgba(0,0,0,0.25);

    border: 4px solid rgba(255,255,255,0.15);
}

/* -------------------------------
   STAT CARDS
-------------------------------- */
.home-stats {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--card-bg);
    padding: 18px 25px;
    border-radius: 14px;
    text-align: center;
    box-shadow: var(--shadow-soft);

    min-width: 140px;
}

.stat-card h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
}

.stat-card p {
    margin: 5px 0 0;
    opacity: 0.8;
    font-size: 0.95rem;
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.stat-card-link:hover {
    cursor: pointer;
}

.home-image-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: relative;
    margin-top: 40px;
}

.image-card {
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 0 25px rgba(0,0,0,0.25);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-card.center {
    transform: scale(1.2);
    opacity: 1;
}

.image-card.side {
    opacity: 0.5;
}

.carousel-btn {
    background: rgba(0,0,0,0.4);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.6);
}

.shared-home {
    background: var(--bg-color);
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    border-radius: 16px;
    padding: 20px;
    margin-top: 0 !important;
    padding-top: 20px !important;
    padding-bottom: 50px !important;
}

/* ============================================================
   PROJECTS PAGE – EmiBonnie Brasil
============================================================ */

/* Wrapper principal */
.projects-main {
    display: flex;
    flex-direction: row;

    justify-content: flex-start;
    align-items: flex-start;

    width: 100%;
    gap: 30px;

    box-sizing: border-box;
}

/* ============================
   SIDEBAR
============================ */
.projects-sidebar {
    width: 260px;
    flex-shrink: 0;

    padding: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);

    position: sticky;
    top: 20px;

    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.projects-sidebar h3 {
    margin-top: 0;
    color: var(--fan-gradient);
    font-size: 1.1rem;
}

.projects-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.projects-sidebar nav a {
    text-decoration: none;
    color: var(--text-color);
    padding: 6px 8px;
    border-radius: 6px;
    transition: 0.2s ease;
}

.projects-sidebar nav a:hover {
    background: var(--fan-gradient);
    color: black;
    transform: translateX(3px);
}

/* ============================
   CONTEÚDO
============================ */
.projects-content {
    flex: 1;
    min-width: 0;
}

/* Header */
.projects-header {
    text-align: center;
    margin-bottom: 20px;
}

.projects-title {
    color: var(--fan-gradient);
    margin-bottom: 10px;
}

/* ============================
   SECTIONS
============================ */
.project-section-block {
    background: var(--fan-gradient);
    border-left: 7px solid var(--fan-gradient);
    border-radius: 16px;

    padding: 25px;
    margin: 25px 0;

    box-shadow: var(--shadow-soft);
}

.project-section-block h2 {
    margin-top: 0;
    color: var(--fan-gradient);
}

/* ============================
   PROJECT CARD
============================ */
.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;

    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

/* Header */
.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--bonnie-primary);
}

.project-card-header h3 {
    margin: 0;
    color: var(--text-color);
}

/* Status */
.project-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.project-status.active {
    background: #d9c7ff;
    color: #3c1f6f;
}

.project-status.completed {
    background: #c8f0da;
    color: #1f6f4a;
}

/* ============================
   GALERIA
============================ */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.project-gallery img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

.project-gallery img:hover {
    transform: scale(1.05);
}

/* ============================
   TEXTO
============================ */
.project-text p {
    margin-top: 0;
}

/* Lista de itens */
.project-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.project-list li {
    margin: 6px 0;
}

/* ============================
   DOAÇÕES
============================ */
.donation-box {
    display: flex;
    align-items: center;
    gap: 20px;

    background: var(--bonnie-primary);
    padding: 15px;
    border-radius: 14px;
    margin-top: 20px;
}

.donation-box img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    background: white;
    padding: 8px;
}

.donation-box p {
  margin: 0;
  flex: 1;
}

/* ============================
   EMPTY STATE
============================ */
.projects-empty {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.8;
}


/* -------------------------------
   MOBILE FIX
-------------------------------- */

@media (max-width: 768px) {
  /* layout de duas colunas vira uma coluna */
  .emi-main,
  .bonnie-main,
  .shared-box,
  .shared-home {
    flex-direction: column !important;
    padding: 10px !important;
    gap: 15px;
  }

  .emi-sidebar,
  .bonnie-sidebar {
    width: 100%;
    position: static;   /* evita comportamento estranho no mobile */
    max-height: none;
  }

  .home-title {
    font-size: 2.1rem;
  }

  .home-subtitle {
    font-size: 1rem;
    padding: 0 8px;
  }

  .home-image img {
    width: 200px;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  /* layout da página de projetos em coluna no mobile */
  .projects-main {
    flex-direction: column;
    gap: 15px;
  }

  .projects-sidebar {
    width: 100%;
    position: static;     /* tira o sticky no mobile */
    max-height: none;
  }

  .projects-content {
    width: 100%;
  }

  /* garante que cards ocupem bem a largura no celular */
  .project-section-block {
    padding: 16px;
    margin: 16px 0;
  }

  .project-card {
    margin-top: 12px;
    padding: 16px;
  }
}

/* no mobile, coloca em coluna para não “jogar” o texto para longe */
@media (max-width: 1010px) {
  .donation-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .donation-box img {
    width: 140px;
    height: auto;
  }

  .donation-box p {
    flex: 0;
  }
}

/* ============================================================
   PROJECT MEDIA STACK
============================================================ */

.project-media-stack {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
}

/* IMAGEM — mesmo comportamento da project-gallery */
.project-media-stack img {
    width: auto;
    max-width: 100%;
    max-height: 420px;
    border-radius: 14px;
    object-fit: unset;
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

/* VÍDEO — menor e controlado */
.project-media-stack video {
    width: 100%;
    max-width: 65%;   /* menor que a imagem */
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.project-media-stack img:hover {
    transform: scale(1.05);
}

/* ============================================================
   PROJECT MEDIA STACK RESULTADO
============================================================ */

.project-media-stack-resultado {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
}

/* IMAGEM — mesmo comportamento da project-gallery */
.project-media-stack-resultado img {
    width: auto;
    max-width: 100%;
    max-height: 420px;
    border-radius: 14px;
    object-fit: unset;
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

/* VÍDEO — menor e controlado */
.project-media-stack-resultado video {
    width: 100%;
    max-width: 75%;   /* menor que a imagem */
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.project-media-stack-resultado img:hover {
    transform: scale(1.05);
}

/* ============================================================
   PROJECT MEDIA STACK BUQUE
============================================================ */

.project-gallery-buque {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
}

/* IMAGEM — mesmo comportamento da project-gallery */
.project-gallery-buque img {
    width: auto;
    max-width: 100%;
    max-height: 365px;
    border-radius: 14px;
    object-fit: unset;
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

.project-gallery-buque img:hover {
    transform: scale(1.05);
}

@media (max-width: 1510px) {

    .project-gallery-buque {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
        margin: 20px 0;
    }

    .project-gallery-buque img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
    }

    .project-media-stack,
    .project-media-stack-resultado {
        flex-direction: column;   /* empilha */
        align-items: center;
    }

    .project-media-stack img,
    .project-media-stack-resultado img {
        width: 100%;
        height: auto;        /* mantém proporção */
        max-height: none;    /* remove limite */
    }

    .project-media-stack video,
    .project-media-stack-resultado video {
        width: 100%;
        max-width: 100%;     /* ocupa tudo */
        height: auto;
    }

}

/* ============================================================
   SERIES – EmiBonnie Brasil
============================================================ */

/* Wrapper principal */
.series-main {
    display: flex;
    flex-direction: row;

    justify-content: flex-start;
    align-items: flex-start;

    width: 100%;
    gap: 30px;

    box-sizing: border-box;
}

/* ============================
   SIDEBAR
============================ */
.series-sidebar {
    width: 260px;
    flex-shrink: 0;

    padding: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);

    position: sticky;
    top: 20px;

    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.series-sidebar h3 {
    margin-top: 0;
    color: var(--fan-gradient);
    font-size: 1.1rem;
}

.series-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.series-sidebar nav a {
    text-decoration: none;
    color: var(--text-color);
    padding: 6px 8px;
    border-radius: 6px;
    transition: 0.2s ease;
}

.series-sidebar nav a:hover {
    background: var(--fan-gradient);
    color: black;
    transform: translateX(3px);
}

/* ============================
   CONTEÚDO
============================ */
.series-content {
    flex: 1;
    min-width: 0;
}

/* Header */
.series-header {
    text-align: center;
    margin-bottom: 20px;
}

.series-title {
    color: var(--fan-gradient);
    margin-bottom: 10px;
}

/* ============================
   SECTIONS
============================ */
.serie-section-block {
    background: var(--fan-gradient);
    border-left: 7px solid var(--fan-gradient);
    border-radius: 16px;

    padding: 25px;
    margin: 25px 0;

    box-shadow: var(--shadow-soft);
}

.serie-section-block h2 {
    margin-top: 0;
    color: var(--fan-gradient);
}

/* ============================
   CARD
============================ */
.serie-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;

    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

.serie-card:hover {
    transform: translateY(-4px);
}

/* Header */
.serie-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--bonnie-primary);
}

.serie-card-header h3 {
    margin: 0;
    color: var(--text-color);
}

/* Status */
.serie-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.serie-status.active {
    background: #d9c7ff;
    color: #3c1f6f;
}

.serie-status.completed {
    background: #c8f0da;
    color: #1f6f4a;
}

/* ============================
   GALERIA
============================ */
.serie-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.serie-gallery img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
    height: 400px;
    box-shadow: var(--shadow-soft);
    transition: 0.25s ease;
}

.serie-gallery img:hover {
    transform: scale(1.05);
}

@media (max-width: 1510px) {

    .serie-gallery {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 10px;
    }

    .serie-gallery img {
        height: 220px;
    }

}

/* ============================
   TEXTO
============================ */
.serie-text p {
    margin-top: 0;
}

/* Lista de itens */
.serie-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.serie-list li {
    margin: 6px 0;
}

/* ============================
   EMPTY STATE
============================ */
.series-empty {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.8;
}

/* ============================
   EPISÓDIOS
============================ */

.serie-episodes {
    margin: 25px 0;
}

.episode {
    margin-bottom: 35px;
}

/* Container responsivo 16:9 */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.episode-player {
    display: flex;
    align-items: center;
    gap: 15px;
}

.episode-btn {
    background: var(--fan-gradient);
    border: none;
    color: black;
    font-size: 1.3rem;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s ease;
}

.episode-btn:hover {
    transform: scale(1.1);
}

.episode-indicator {
    margin-top: 12px;
    text-align: center;
    font-weight: 500;
}

.series-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-main {
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color);
    padding: 6px 8px;
    border-radius: 8px;
    transition: 0.2s ease;
}

.nav-main:hover {
    background: var(--fan-gradient);
    color: black;
}

.nav-sub {
    margin-left: 12px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-sub a {
    font-size: 0.9rem;
    opacity: 0.8;
    text-decoration: none;
    color: var(--text-color);
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.2s ease;
}

.nav-sub a:hover {
    opacity: 1;
    background: rgba(255,255,255,0.08);
}

/* ============================
   EMOJI GUITARRA
============================ */

.emoji-icon {
  width: 1.3em;
  height: 1.3em;
  vertical-align: -0.27em;
}

/* ============================
   BOTÃO VOLTAR AO INICIO
============================ */

.scroll-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;

    background: var(--fan-gradient);
    box-shadow: var(--shadow-soft);
    font-size: 18px;

    display: none;
    align-items: center;
    justify-content: center;

    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.show {
    display: flex;
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
}

.project-message a,
.project-message a:visited,
.project-message a:active {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.project-message a:hover {
    text-decoration: underline;
}