/* ================================
   🎯 THEOS DESIGN SYSTEM - THEOLOGY & EDUCATION
================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Cores Base */
  --primary: #B71C1C;         /* Vermelho Vinho / Profundo */
  --primary-light: #E53935;   /* Vermelho Vibrante */
  --primary-dark: #7F0000;    /* Vermelho Muito Escuro */
  --accent: #FF5252;          /* Vermelho Destaque */
  --accent-hover: #FF1744;
  
  /* Escala de Cinzas / Backgrounds */
  --bg-deep: #050505;         /* Preto Absoluto */
  --bg-dark: #121212;         /* Grafite */
  --bg-light: #1A1A1A;        /* Cinza Escuro */
  --bg-white: #222222;        /* Cards em background escuro */
  
  /* Textos */
  --text-main: #E0E0E0;
  --text-muted: #9E9E9E;
  --text-light: #FFFFFF;
  --text-dim: #BDBDBD;

  /* Efeitos */
  --glass-dark: rgba(5, 5, 5, 0.85);
  --glass-light: rgba(30, 30, 30, 0.9);
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-md: 0 12px 30px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.7);
  --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  /* Responsive Spacing */
  --section-padding: clamp(60px, 10vw, 120px);
}

/* ================================
   BASE
================================ */

body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display-font {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-light);
}

section {
  padding: var(--section-padding) 0;
  position: relative;
}

/* ================================
   BOOTSTRAP OVERRIDES (DARK THEME)
================================ */
.bg-white { background-color: var(--bg-white) !important; color: var(--text-main) !important; }
.text-dark { color: var(--text-light) !important; }
.text-muted { color: var(--text-muted) !important; }

/* ================================
   NAVBAR (FIXED)
================================ */

.navbar {
  padding: clamp(0.6rem, 1.5vw, 1rem) 0;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: var(--glass-dark) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow-md);
}

.navbar-logo {
  height: clamp(28px, 4vw, 38px);
  width: auto;
  transition: var(--transition);
}

.navbar-brand {
  padding: 0;
  display: flex;
  align-items: center;
  color: var(--text-light);
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
  font-size: 1.5rem;
}

.navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  font-size: clamp(0.9rem, 1vw, 0.95rem);
  margin: 0 12px;
  transition: 0.3s;
}

.navbar .nav-link:hover, .navbar .nav-link.active {
  color: var(--primary-light) !important;
}

/* Custom Hamburger */
.navbar-toggler {
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2) !important;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: 2px solid var(--primary-light);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--bg-dark);
    margin-top: 1rem;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: var(--shadow-lg);
  }
  
  .navbar .nav-link {
    padding: 0.8rem 0;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  
  .navbar .nav-link:last-child {
    border-bottom: none;
  }
}

/* ================================
   HERO (DARK MODE)
================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.95)), url('../assets/images/backgrounds/header-dark.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-light);
  padding-top: clamp(80px, 12vh, 140px);
  padding-bottom: clamp(40px, 8vh, 100px);
}

.hero h1 {
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero .highlight {
  color: var(--primary-light);
  background: linear-gradient(120deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lead {
  color: var(--text-dim);
  max-width: 600px;
  font-size: clamp(1rem, 2vw, 1.25rem) !important;
  line-height: 1.5;
}

/* ================================
   BOTÕES
================================ */

.btn {
  padding: clamp(12px, 2vw, 14px) clamp(24px, 4vw, 36px);
  border-radius: 12px;
  font-weight: 600;
  transition: var(--transition);
  font-size: clamp(0.9rem, 1vw, 1rem);
  min-height: 44px; /* Touch target */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  border: none;
  color: white !important;
  box-shadow: 0 10px 20px rgba(183, 28, 28, 0.3);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 10px 20px rgba(229, 57, 53, 0.4);
}

.btn-accent {
  background: var(--text-light);
  color: var(--bg-deep) !important;
  border: none;
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-accent:hover {
  background: #f0f0f0;
}

/* ================================
   SEÇÕES TEMÁTICAS
================================ */

.bg-light-agro { background-color: var(--bg-light); color: var(--text-light); }
.bg-dark-agro { background-color: var(--bg-dark); color: var(--text-light); }
.bg-deep-agro { background-color: var(--bg-deep); color: var(--text-light); }

.section-title { margin-bottom: clamp(40px, 8vw, 60px); }
.section-title span { letter-spacing: 0.1em; font-size: clamp(0.75rem, 1vw, 0.85rem); }
.section-title h2 { font-size: clamp(2rem, 5vw, 2.8rem); color: var(--text-light); }

/* ================================
   CARDS
================================ */

.card {
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: clamp(16px, 3vw, 24px);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  color: var(--text-main);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,255,255,0.1);
}

.course-card .card-body { padding: clamp(1.5rem, 3vw, 2rem); }

.course-tag {
  background: rgba(229, 57, 53, 0.15);
  color: var(--primary-light);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 1rem;
}

/* ================================
   FAQ
================================ */

.accordion-item {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  border-radius: 16px !important;
}

.accordion-button {
  padding: clamp(1rem, 2vw, 1.5rem);
  font-weight: 600;
  color: var(--text-light);
  background: var(--bg-light);
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

.accordion-button:not(.collapsed) {
  color: var(--primary-light);
  background: var(--bg-white);
  box-shadow: none;
}

.accordion-body {
  color: var(--text-muted);
}

/* ================================
   FOOTER
================================ */

footer {
  background: var(--bg-deep);
  color: var(--text-dim);
  padding: clamp(60px, 10vw, 100px) 0 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ================================
   RESPONSIVIDADE ADICIONAL
================================ */

@media (max-width: 767.98px) {
  .hero {
    text-align: center;
    background-attachment: scroll; /* Better performance on mobile */
  }
  
  .hero .lead {
    margin-inline: auto;
  }
  
  .btn {
    width: 100%; /* Full width buttons on small mobile */
  }
  
  .section-title {
    text-align: center;
  }
  
  .newsletter-form {
    flex-direction: column;
    gap: 10px;
  }
  
  .newsletter-form .form-control {
    border-radius: 12px !important;
    width: 100%;
  }
  
  .newsletter-form .btn {
    border-radius: 12px !important;
    width: 100%;
  }
}

/* Ensure images don't stretch */
.instructor-img, 
.rounded-circle {
  max-width: 100%;
  height: auto;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .hero {
    text-align: center;
  }
  
  .hero .lead {
    margin-inline: auto;
  }
}

/* Fix for horizontal scroll potential */
img {
  max-width: 100%;
  height: auto;
}

.container {
  overflow-x: hidden;
}

/* Better touch targets for small elements */
.social-icons a, 
.footer-links a {
  display: inline-block;
  padding: 8px 0;
  min-height: 44px;
  color: var(--text-muted);
  transition: 0.3s;
}

.social-icons a:hover, 
.footer-links a:hover {
  color: var(--primary-light);
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-deep); /* Fundo escuro da marca */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    height: 150px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    animation: pulse-glow 2s infinite;
}

.spinner-agro {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(229, 57, 53, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-light); /* Vermelho Claro */
    border-right-color: var(--primary); /* Vermelho Escuro */
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0% { filter: drop-shadow(0 0 5px rgba(229, 57, 53, 0.2)); opacity: 0.8; }
    50% { filter: drop-shadow(0 0 20px rgba(229, 57, 53, 0.6)); opacity: 1; }
    100% { filter: drop-shadow(0 0 5px rgba(229, 57, 53, 0.2)); opacity: 0.8; }
}

/* Esconde o preloader quando a classe .loaded for adicionada */
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.text-justify{
  text-align: justify;
}
/* Global Override for text-primary to use dark red */
.text-primary {
    color: var(--primary-dark) !important;
}
.bg-primary {
    background-color: var(--primary-dark) !important;
}
