/* Import Cute and Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* Premium Color Variables and Tokens */
:root {
  /* Bright, warm, premium gradient colors */
  --primary-color: #FFB525;
  --primary-gradient: linear-gradient(135deg, #FFC13B 0%, #FF8A00 100%);
  --primary-glow: rgba(255, 138, 0, 0.4);
  
  --secondary-color: #FF5A5F;
  --secondary-gradient: linear-gradient(135deg, #FF5A5F 0%, #E03C41 100%);
  
  --bg-color: #FFF8EB; /* Deixando o fundo ligeiramente mais amarelo/quente */
  --bg-card: rgba(255, 253, 247, 0.92); /* Card com fundo off-white amarelado suave */
  --bg-yellow-light: #FFF2D4; /* Um amarelo pastel lindo para seções de destaque */
  
  --text-dark: #1F2024;
  --text-light: #6E7278;
  
  --white: #FFFFFF;
  
  /* Very rounded, playful borders */
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 40px;
  --radius-pill: 100px;
  
  /* Soft, layered shadows */
  --shadow-sm: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 30px 40px -10px rgba(255, 138, 0, 0.2);
  
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
}

/* Global Reset (Mobile First) */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(255, 181, 37, 0.16) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(255, 90, 95, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
  padding-bottom: 80px; /* Space for mobile nav */
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; }

/* Mobile First Header */
header {
  background: rgba(254, 185, 48, 0.45); /* Amarelo translúcido ajustado */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 0 6px rgba(0, 0, 0, 0.02),
    0 4px 12px rgba(254, 185, 48, 0.12),
    inset 3px 3px 2px -3px rgba(255, 255, 255, 0.8),      /* Luz interna superior esquerda */
    inset -3px -3px 2px -3px rgba(0, 0, 0, 0.15),          /* Sombra de refração inferior direita */
    inset 1px 1px 1px -0.5px rgba(255, 255, 255, 0.6),    /* Brilho de borda interna */
    inset -1px -1px 1px -0.5px rgba(0, 0, 0, 0.1),        /* Sombra de contorno interno */
    inset 0 0 6px 6px rgba(254, 185, 48, 0.15),           /* Glow amarelo interno */
    inset 0 0 2px 2px rgba(254, 185, 48, 0.08);           /* Suavização do amarelo */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo-img-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--white); /* Borda branca para contrastar com o cabeçalho amarelo */
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  transition: var(--transition);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.35); /* Zoom ajustado para não cortar a parte principal do logo */
  transition: var(--transition);
}

.logo-img-wrapper:hover .logo-img {
  transform: scale(1.5);
}

.logo-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hide desktop menu on mobile */
.nav-menu { display: none; }

/* Mobile Bottom Navigation (App-like, super premium) */
.mobile-nav {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-pill);
  display: flex;
  justify-content: space-around;
  padding: 0.8rem 1rem;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  z-index: 2000;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  transition: var(--transition);
}

.mobile-nav-item.active {
  color: var(--primary-color);
  transform: translateY(-5px);
}

.mobile-nav-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: 0 10px 20px var(--primary-glow);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 25px var(--primary-glow);
}

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

.btn-secondary {
  background: var(--secondary-gradient);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(255, 90, 95, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 25px rgba(255, 90, 95, 0.4);
}

.btn-outline {
  background: var(--white);
  color: var(--text-dark);
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.btn-outline:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Layout */
.section-container {
  padding: 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

section { padding: 4rem 0; margin-top: 80px; /* offset for fixed header */ }

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

.section-title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

/* Hero Section */
.hero {
  position: relative;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 85vh;
  justify-content: flex-start;
  overflow: hidden;
}

/* Semi-transparent warm overlay for mobile readability */
.hero::before {
  display: none; /* Removido conforme solicitado */
}

.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 102%;
  min-height: 102%;
  width: 102%;
  height: 102%;
  z-index: 0;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2; /* above video and overlay */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
}

.hero-content h1 {
  order: 1;
  font-size: 1.2rem; /* Bem menor conforme solicitado */
  line-height: 1.2;
  margin-bottom: 0.8rem;
  padding: 0 1rem;
}

.hero-content h1 span {
  display: block;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.4rem; /* Bem menor conforme solicitado */
  margin-top: 0.2rem;
}

.hero-buttons {
  order: 3;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0 1.5rem;
  margin-top: 2rem; /* Move os botões mais para baixo */
  margin-bottom: 0;
}

.hero-buttons .btn {
  padding: 0.6rem 0.3rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  flex: 1;
  text-align: center;
  line-height: 1.2;
}

.hero-content .hero-description {
  display: block;
  order: 2;
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
  margin-top: 0.5rem;
  margin-bottom: 0;
  padding: 0 1.5rem;
  line-height: 1.4;
}

.hero-image-container {
  display: none; /* Ocultar no mobile para ir direto para o catálogo */
}

/* Cute organic blob background behind image */
.hero-blob {
  position: absolute;
  top: -10%; left: 0%; right: 0%; bottom: -10%;
  background: var(--primary-gradient);
  opacity: 0.15;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: blob-morph 8s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes blob-morph {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  100% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

.hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  border: 6px solid var(--white);
  transform: rotate(3deg);
  transition: var(--transition);
}

.hero-img:hover {
  transform: rotate(0deg) scale(1.05);
}

/* Grids */
.pets-grid, .blog-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile: 1 column */
  gap: 2rem;
}

/* Cards (Glassmorphism + Modern) */
.pet-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pet-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 1);
}

.pet-card-img-container {
  height: 250px;
  width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.pet-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.pet-card:hover .pet-card-img {
  transform: scale(1.1) rotate(2deg);
}

.pet-card-status {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.pet-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pet-card-name {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.pet-card-desc {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.pet-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-color);
  margin: -1.5rem;
  margin-top: auto;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.03);
  font-weight: 600;
  color: #FF8A00;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* How to adopt steps */
.steps-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.step-card {
  background: var(--white);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.step-number {
  position: absolute;
  top: -20px; left: 50%; transform: translateX(-50%);
  background: var(--primary-gradient);
  color: var(--white);
  width: 45px; height: 45px;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  font-family: 'Fredoka', sans-serif; font-size: 1.5rem; font-weight: 700;
  box-shadow: 0 5px 15px var(--primary-glow);
}

/* Success Counter */
.success {
  background: var(--primary-gradient);
  color: var(--white);
  border-radius: var(--radius-lg);
  margin: 2rem 1.5rem;
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-hover);
}

.counter-number {
  font-size: 6rem;
  font-family: 'Fredoka', sans-serif;
  line-height: 1;
  text-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.counter-title { color: var(--white); font-size: 1.5rem; margin-bottom: 2rem; }

.adopted-thumbnails {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0;
}

.adopted-thumb {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 3px solid var(--white);
  object-fit: cover;
  margin-left: -15px; /* Overlap effect */
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.adopted-thumb:first-child { margin-left: 0; }
.adopted-thumb:hover { transform: translateY(-10px) scale(1.2); z-index: 10; }

/* Modal Premium */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(31, 32, 36, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex; align-items: flex-end; /* Align bottom for mobile */
  justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-card {
  background: var(--white);
  width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; /* Rounded top only */
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  padding-bottom: 2rem;
}

.modal-overlay.active .modal-card { transform: translateY(0); }

.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(4px);
  border: none; width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); z-index: 10; cursor: pointer;
}

.modal-img {
  width: 100%; height: 350px; object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-content { padding: 2rem 1.5rem; }

.modal-title { font-size: 2.2rem; margin-bottom: 0.5rem; }

/* Admin Grid */
.admin-layout { padding: 1rem; }
.admin-sidebar { margin-bottom: 2rem; }

.form-control {
  width: 100%; padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border: 2px solid rgba(0,0,0,0.05);
  background: var(--bg-color);
  font-family: inherit; font-size: 1rem;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--primary-color);
  background: var(--white);
  outline: none;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ---------------------------------------------------
   Infinite Slider (Marcas Amigas) - Estilo Shadcn
--------------------------------------------------- */
.infinite-slider-wrapper {
  position: relative;
  height: 100px;
  width: 100%;
  overflow: hidden;
  margin-top: 2rem;
  /* Progressive Blur (Fade) usando máscara - Melhor e mais fiel ao original! */
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.infinite-slider {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  animation: slide-infinite 20s linear infinite;
  gap: 48px;
}

.infinite-slider:hover {
  animation-play-state: paused;
}

@keyframes slide-infinite {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.partner-logo-box {
  display: flex;
  width: 128px;
  height: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.partner-logo-img {
  max-height: 50px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.partner-logo-box:hover .partner-logo-img {
  transform: scale(1.1);
}

.partner-delete-btn {
  position: absolute;
  top: 15px;
  right: 0;
  background: #ff4b4b;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.partner-logo-box.admin-active .partner-delete-btn {
  display: flex;
}

/* Footer (Mobile First) */
footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 4rem 1.5rem 8rem; /* Extra padding bottom for mobile nav */
  text-align: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ---------------------------------------------------
   DESKTOP OVERRIDES (min-width: 768px)
--------------------------------------------------- */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  section { padding: 6rem 0; }
  .section-title { font-size: 3rem; }
  
  /* Show desktop nav, hide mobile nav */
  .nav-menu { display: flex; list-style: none; gap: 2rem; align-items: center; }
  .nav-link { 
    font-weight: 600; 
    font-size: 1.1rem; 
    position: relative; 
    color: var(--text-dark);
    transition: var(--transition);
  }
  .nav-link:hover, .nav-link.active { 
    color: var(--white); 
  }
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--white);
    border-radius: var(--radius-pill);
    transition: var(--transition);
  }
  .nav-link:hover::after, .nav-link.active::after {
    width: 100%;
  }
  .mobile-nav { display: none; }
  
  .hero {
    flex-direction: row;
    text-align: left;
    padding-top: 4rem;
    padding-bottom: 4rem;
    min-height: auto;
  }
  .hero::before {
    display: none;
  }
  .hero-video-bg {
    display: none;
  }
  .hero-content {
    flex: 1;
    display: block;
  }
  .hero-content h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    padding: 0;
    order: initial;
  }
  .hero-content h1 span {
    display: inline-block;
    font-size: 4rem;
  }
  .hero-content .hero-description {
    padding: 0;
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    text-shadow: none;
    order: initial;
  }
  .hero-buttons {
    flex-direction: row;
    padding: 0;
    margin-bottom: 0;
    margin-top: 0;
    order: initial;
  }
  .hero-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
  .hero-image-container {
    display: block;
    flex: 1;
    margin-top: 0;
  }
  
  .pets-grid, .blog-grid, .steps-container { grid-template-columns: repeat(3, 1fr); }
  
  .success { margin: 4rem auto; max-width: 1200px; }
  
  /* Desktop Modal */
  .modal-overlay { align-items: center; }
  .modal-card { max-width: 600px; border-radius: var(--radius-lg); transform: scale(0.9); }
  .modal-overlay.active .modal-card { transform: scale(1); }
  .modal-img { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  
  footer { text-align: left; padding-bottom: 4rem; }
  .footer-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1200px; margin: 0 auto; }
  
  .admin-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; max-width: 1200px; margin: 0 auto; }
  .admin-sidebar { margin-bottom: 0; position: sticky; top: 100px; height: calc(100vh - 120px); }
}
