/* THEME COLORS (CSS VARIABLES) */
:root {
    --bg-main: #0b1220;
    --bg-elevated: #111a2e;
    --bg-card: #101622;
    --border-subtle: #1f2a48;
    --text-main: #e6ecf5;
    --text-muted: #a3b1cf;
    --accent: #4f7dff;
    --accent-soft: #7ab4ff;
    --accent-hover: #a2c9ff;
  }
  
  :root[data-theme="light"] {
    --bg-main: #f4f7ff;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --border-subtle: #d3ddf5;
    --text-main: #101827;
    --text-muted: #4b5563;
    --accent: #2563eb;
    --accent-soft: #3b82f6;
    --accent-hover: #60a5fa;
  }

  :root[data-theme="light"] .site-header {
    background: #ffffff;
    border-bottom: 1px solid #d6e0f2;
  }
  
  :root[data-theme="light"] .site-nav a {
    color: #475569;
  }
  
  :root[data-theme="light"] .site-nav a:hover {
    color: #1e40af;
  }
  
  :root[data-theme="light"] .theme-toggle {
    border-color: #cbd5e1;
    color: #475569;
  }
  
  :root[data-theme="light"] .site-title a {
    color: #1e293b;
  }
  
  
  /* GLOBAL */
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
  }
  
  a {
    color: var(--accent-soft);
    text-decoration: none;
    transition: color 0.2s ease;
  }
  
  a:hover {
    color: var(--accent-hover);
  }
  
  /* LAYOUT BASE */
  
  .main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  main {
    flex: 1;
  }
  
  /* HEADER */
  
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(17, 26, 46, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .site-title a {
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-main);
  }
  
  .site-nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
  }
  
  .site-nav a {
    font-size: 0.98rem;
    color: var(--text-muted);
  }
  
  .site-nav a:hover {
    color: var(--accent-soft);
  }
  
  .theme-toggle {
    margin-left: 18px;
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
  }
  
  /* FOOTER */
  
  .site-footer {
    text-align: center;
    padding: 30px 0 40px;
    font-size: 0.9rem;
    opacity: 0.75;
    border-top: 1px solid var(--border-subtle);
  }
  
  /* HERO (HOME) */
  
  .hero {
    background: radial-gradient(circle at top, #1b2450 0%, var(--bg-main) 55%);
    padding: 120px 20px 80px;
    text-align: center;
  }
  
  .hero-inner {
    max-width: 780px;
    margin: 0 auto;
  }
  
  .hero-title {
    font-size: clamp(2.4rem, 3vw + 1.5rem, 3.2rem);
    margin-bottom: 10px;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
  }
  
  .hero-actions {
    margin-top: 35px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .btn-primary,
  .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 0.98rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    color: white;
  }
  
  .btn-secondary {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
  }
  
  .btn-primary:hover,
  .btn-secondary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }
  
  /* SECTIONS GENERICAS */
  
  .section {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 20px 60px;
  }
  
  .section-title {
    font-size: 1.6rem;
    margin-bottom: 28px;
    text-align: center;
  }
  
  /* CARDS */
  
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
  }
  
  .card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 20px 18px;
    border: 1px solid rgba(255, 255, 255, 0.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  }
  
  .card-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }
  
  .card-text {
    font-size: 0.96rem;
    color: var(--text-muted);
  }
  
  /* POSTS NA HOME */
  
  .posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .post-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.03);
  }
  
  .post-card-title {
    font-size: 1.1rem;
    margin-bottom: 6px;
  }
  
  .post-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
  }
  
  /* SINGLE PAGE (ABOUT, CONTACT, POSTS) */
  
  .page-content {
    max-width: 850px;
    margin: 60px auto;
    padding: 0 20px 40px;
  }
  
  .page-title {
    font-size: 2.2rem;
    margin-bottom: 25px;
  }
  
  .page-body p {
    line-height: 1.7;
    margin-bottom: 18px;
    color: var(--text-main);
  }
  
  .page-body h2 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 6px;
  }
  
  .page-body ul {
    padding-left: 20px;
    margin-bottom: 18px;
  }
  
  /* FORMULÁRIO (CONTACT) */
  
  form {
    max-width: 600px;
    margin: 30px 0;
  }
  
  form label {
    display: block !important;
    font-size: 0.95rem !important;
    margin-bottom: 6px !important;
    color: var(--text-main) !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  form input[type="text"],
  form input[type="email"],
  form input[type="hidden"],
  form textarea {
    width: 100% !important;
    padding: 12px 14px !important;
    margin-bottom: 20px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border-subtle) !important;
    background: var(--bg-elevated) !important;
    color: var(--text-main) !important;
    font-size: 0.97rem !important;
    font-family: inherit !important;
    display: block !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  form input[type="hidden"] {
    display: none !important;
  }
  
  form input:focus,
  form textarea:focus {
    outline: none;
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 2px rgba(79, 125, 255, 0.2);
  }
  
  form textarea {
    resize: vertical;
    min-height: 120px;
  }
  
  form .btn-submit,
  form button[type="submit"] {
    display: inline-block !important;
    padding: 12px 28px !important;
    background: linear-gradient(135deg, var(--accent), var(--accent-soft)) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease, transform 0.1s ease !important;
    margin-top: 10px !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  form .btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }
  
  form .btn-submit:active {
    transform: translateY(0);
  }
  
  form .g-recaptcha {
    margin: 20px 0;
    display: flex;
    justify-content: flex-start;
  }
  
  form .g-recaptcha iframe {
    border-radius: 4px;
  }
  
  /* LIST PAGES (seções) */
  
  .list-page {
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px 40px;
  }
  
  .list-page h1 {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  
  /* RESPONSIVO */
  
  @media (max-width: 640px) {
    .site-header-inner {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }
  
    .site-nav ul {
      gap: 12px;
      font-size: 0.9rem;
    }
  
    .hero {
      padding-top: 90px;
    }
  }
  
  /* ================================
   GLOBAL IMAGE STYLING
   ================================ */

.content img,
.page-content img,
article img {
    display: block;
    max-width: 100%;
    height: auto;

    /* visual */
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);

    /* layout */
    margin: 30px auto; /* centraliza e dá espaçamento */
    transition: all 0.3s ease; /* transição suave */
}

/* Hover sutil (não exagerado) */
.content img:hover,
.page-content img:hover,
article img:hover {
    transform: scale(1.015);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* ================================
   DARK MODE IMAGE OPTIMIZATION
   ================================ */

body.dark img {
    /* deixa imagens menos escuras no dark mode */
    filter: brightness(1.15);
}

/* Hover no modo escuro */
body.dark img:hover {
    filter: brightness(1.25);
}

/* ================================
   FIGURE CAPTIONS
   ================================ */

figure {
    margin: 30px auto;
    text-align: center;
}

figcaption {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    margin-top: 10px;
    font-style: italic;
}
