/**
 * ============================================
 * ESTILOS GLOBAIS
 * Estilos compartilhados por todas as páginas
 * ============================================
 */

/* ============================================
   RESET E CONFIGURAÇÕES BÁSICAS
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Fundo combinando textura e cor */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../images/texture/id_visual.png");
  background-repeat: repeat, repeat;
  z-index: -9999;
  pointer-events: none;
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
}

/* ============================================
   CORES PRINCIPAIS
   ============================================ */
:root {
  /* Verde */
  --color-primary: #8b9d7c;
  --color-primary-dark: #6b7c5d;
  --color-primary-light: #a5b594;

  /* Bege */
  --color-secondary: #f5f1e8;
  --color-secondary-dark: #e8dcc8;

  /* Neutros */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-light: #f8f9fa;
  --color-gray: #6c757d;
  --color-gray-dark: #343a40;

  /* Feedback */
  --color-success: #28a745;
  --color-error: #dc3545;
  --color-warning: #ffc107;
  --color-info: #17a2b8;

  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);

  /* Transições */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================
   BOTÕES GLOBAIS
   ============================================ */
.btn {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 30px;
  border-radius: 30px;
  transition: all var(--transition-normal);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-primary-dark);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-dark);
}

.btn-outline-primary {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-primary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* ============================================
   CARDS GLOBAIS
   ============================================ */
.card {
  border-radius: 15px;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

/* ============================================
   FORMULÁRIOS GLOBAIS
   ============================================ */
.form-control,
.form-select {
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 12px 15px;
  font-family: "Montserrat", sans-serif;
  transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.2rem rgba(139, 157, 124, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--color-gray-dark);
  margin-bottom: 8px;
}

/* ============================================
   MODAIS GLOBAIS
   ============================================ */
.modal-content {
  border-radius: 20px;
  border: none;
}

.modal-header {
  border-bottom: 1px solid var(--color-secondary);
  padding: 1.5rem;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  border-top: 1px solid var(--color-secondary);
  padding: 1.5rem;
}

/* ============================================
   LOADING E ESTADOS
   ============================================ */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
  border-radius: 10px;
  border: none;
  padding: 15px 20px;
  margin-bottom: 20px;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-error,
.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.text-primary {
  color: var(--color-primary) !important;
}

.text-secondary {
  color: var(--color-gray) !important;
}

.bg-primary {
  background-color: var(--color-primary) !important;
}

.bg-secondary {
  background-color: var(--color-secondary) !important;
}

/* ============================================
   NOTIFICAÇÃO TOAST
   ============================================ */
.custom-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 25px 30px;
  border-radius: 16px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.1),
    0 8px 25px rgba(0, 0, 0, 0.08);
  z-index: 10000;
  opacity: 0;
  transform: translateY(-30px) translateX(400px) scale(0.9);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 420px;
  min-width: 320px;
  border: 1px solid rgba(139, 157, 124, 0.1);
}

.custom-toast.show {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

.custom-toast.success {
  border-left: 5px solid var(--color-primary);
  background: linear-gradient(135deg, #f8fdf6 0%, #ffffff 100%);
}

.custom-toast.error {
  border-left: 5px solid #e57373;
  background: linear-gradient(135deg, #fef5f5 0%, #ffffff 100%);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.toast-icon {
  font-size: 28px;
  flex-shrink: 0;
  animation: toastIconPulse 2s ease-in-out infinite;
}

.toast-message {
  color: #2c3e50;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 500;
  font-family: "Montserrat", sans-serif;
}

@keyframes toastIconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@media (max-width: 576px) {
  .custom-toast {
    left: 15px;
    right: 15px;
    top: 15px;
    max-width: calc(100% - 30px);
    min-width: auto;
    transform: translateY(-30px) scale(0.9);
    padding: 20px 25px;
  }

  .custom-toast.show {
    transform: translateY(0) scale(1);
  }

  .toast-message {
    font-size: 15px;
  }

  .toast-icon {
    font-size: 24px;
  }
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .card-img-top {
    height: 180px;
  }

  .modal-body {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .card-img-top {
    height: 150px;
  }
}
