/* ============================================
   Epigrafes - Custom Styles & Design System
   ============================================ */

/* CSS Variables - Design System */
:root {
  /* Primary Color Palette */
  --primary: #0c4da2;
  --primary-light: #1a6dd4;
  --primary-dark: #093a7a;
  --primary-50: #e8f0fc;
  --primary-100: #c5d9f7;
  --primary-200: #9ebef0;
  --primary-300: #76a3e9;
  --primary-400: #4e88e2;
  --primary-500: #266ddb;
  --primary-600: #0c4da2;
  --primary-700: #093a7a;
  --primary-800: #072c5c;
  --primary-900: #051e3e;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

/* ============================================
   Base Styles
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--gray-900);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

/* ============================================
   Custom Scrollbar
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-white {
  background-color: #ffffff;
  color: var(--primary);
  border-color: #ffffff;
}

.btn-white:hover {
  background-color: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   Form Elements
   ============================================ */

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-900);
  background-color: #ffffff;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 77, 162, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-400);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

.form-error {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--error);
}

.form-group {
  margin-bottom: 1.5rem;
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-in-out;
}

.fade-in-down {
  animation: fadeInDown 0.6s ease-in-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-in-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-in-out;
}

.scale-in {
  animation: scaleIn 0.4s ease-in-out;
}

/* Scroll Animation (triggered by JS) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-in-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Navbar
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all var(--transition-base);
}

.navbar-transparent {
  background-color: transparent;
}

/* Light text when navbar is transparent (at top) */
.navbar-transparent .text-gray-700,
.navbar-transparent [class*="text-gray-"] {
  color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-transparent .text-gray-700:hover,
.navbar-transparent [class*="text-gray-"]:hover {
  color: rgba(255, 255, 255, 1) !important;
}

.navbar-transparent .border-gray-300 {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.navbar-transparent .text-gray-400 {
  color: rgba(255, 255, 255, 0.6) !important;
}

.navbar-transparent .text-primary {
  color: #ffffff !important;
}

.navbar-transparent svg {
  color: #ffffff !important;
}

.navbar-solid {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

/* Dark text when navbar is solid (scrolled) - default colors */
.navbar-solid .text-gray-700,
.navbar-solid [class*="text-gray-"] {
  color: var(--gray-700) !important;
}

.navbar-solid .text-gray-400 {
  color: var(--gray-400) !important;
}

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

.navbar-solid svg {
  color: var(--primary) !important;
}

/* Logo Switching */
.navbar-transparent .logo-light {
  display: block;
}

.navbar-transparent .logo-dark {
  display: none;
}

.navbar-solid .logo-light {
  display: none;
}

.navbar-solid .logo-dark {
  display: block;
}

/* ============================================
   Scroll to Top Button
   ============================================ */

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 40;
  box-shadow: var(--shadow-lg);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* ============================================
   Utility Classes
   ============================================ */

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

.bg-primary {
  background-color: var(--primary) !important;
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ============================================
   Loading Spinner
   ============================================ */

.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   Responsive Typography
   ============================================ */

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .navbar,
  .scroll-to-top,
  .cookie-banner {
    display: none !important;
  }
}
