/* ============================================
   AmorPorLasMascotas — Global CSS Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* ── Design Tokens ── */
:root {
  /* Colors */
  --color-primary:     #FF8C69;
  --color-primary-light: #FFB8A0;
  --color-primary-dark:  #E06A48;
  --color-secondary:   #A8D8A8;
  --color-secondary-dark: #78BB78;
  --color-accent:      #FFD580;
  --color-accent-dark: #F0BB50;
  --color-purple:      #C9B8E8;
  --color-blue:        #A8D4E8;

  --color-bg:          #FFF9F5;
  --color-bg-alt:      #FFF3EC;
  --color-card:        #FFFFFF;
  --color-card-hover:  #FFF6F1;

  --color-text:        #3D2B1F;
  --color-text-light:  #5C4033;
  --color-muted:       #9E8979;
  --color-border:      #EDE0D8;

  /* Typography */
  --font-primary:      'Nunito', sans-serif;
  --font-editorial:    'Lora', serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;

  /* Border Radius */
  --radius-sm:   0.375rem;
  --radius-md:   0.75rem;
  --radius-lg:   1.25rem;
  --radius-xl:   2rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(61,43,31,.08), 0 1px 2px rgba(61,43,31,.06);
  --shadow-md:   0 4px 12px rgba(61,43,31,.10), 0 2px 6px rgba(61,43,31,.07);
  --shadow-lg:   0 10px 30px rgba(61,43,31,.12), 0 4px 12px rgba(61,43,31,.09);
  --shadow-card: 0 8px 24px rgba(255,140,105,.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --container-max: 1200px;
  --container-pad: var(--space-6);
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box !important;
  max-width: 100% !important;
  margin: 0;
  padding: 0;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden !important;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

.modal-open { overflow: hidden !important; }


img, video { max-width: 100%; height: auto; display: block; }

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

ul, ol { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 3vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p { margin-bottom: var(--space-4); color: var(--color-text-light); }

.editorial { font-family: var(--font-editorial); font-style: italic; }

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

h1, h2 {
  word-break: break-word;
}

.text-center { text-align: center; }
.text-muted   { color: var(--color-muted); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge--green  { background: var(--color-secondary); color: #2D6A2D; }
.badge--yellow { background: var(--color-accent); color: #7A5C00; }
.badge--purple { background: var(--color-purple); color: #4A3880; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255,140,105,.4);
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,140,105,.5);
}

.btn--secondary {
  background: var(--color-card);
  color: var(--color-primary-dark);
  border: 2px solid var(--color-primary-light);
}
.btn--secondary:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}
.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--text-sm); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--text-lg); }

/* ── Section Helpers ── */
.section { padding-block: var(--space-20); }
.section--alt { background: var(--color-bg-alt); }

.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.section-label::before {
  content: '';
  display: block;
  width: 2rem;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.section-title { margin-bottom: var(--space-4); }
.section-subtitle { color: var(--color-muted); font-size: var(--text-lg); max-width: 60ch; }

/* ── Cards ── */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-base);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.card-body { padding: var(--space-6); }
.card-title { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.card-text  { color: var(--color-muted); font-size: var(--text-sm); margin-bottom: 0; }

/* ── Pet Phrase Slot ── */
.pet-phrase {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center; /* Centering */
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary); /* Solid background for maximum accessibility */
  border-radius: var(--radius-md);
  font-weight: 700;
  color: #FFFFFF; /* High contrast text */
  font-size: var(--text-base);
  margin-block: var(--space-6);
  opacity: 0;
  animation: phraseReveal .5s ease .3s forwards;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.pet-phrase::before { content: '🐾'; font-size: 1.2rem; flex-shrink: 0; }

.phrase-fade {
  transition: opacity 0.5s ease;
}
.phrase-fade.fade-out {
  opacity: 0;
}

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

/* ── AdSense & Banners Blindage ── */
.top-announcement, .header-ad, .ad-zone {
  overflow: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
}

.footer-pets-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-4);
}

/* ── AdSense Zones ── */
.ad-zone {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  overflow: hidden;
}

/* Collapse empty or placeholder ad zones */
.ad-zone:empty, 
.ad-zone:not(:has(*)),
.header-ad:has(.ad-zone:empty),
.header-ad:has(.ad-zone:not(:has(*))),
.image-placeholder,
.img-placeholder,
.pet-phrase:empty {
  display: none !important;
}

/* Hide broken or missing images */
img:not([src]), 
img[src=""], 
img[src=" "],
img[alt*="placeholder"],
img[alt=""] {
  opacity: 0; /* Or display: none if they are not placeholders */
}

/* Ad Slots for In-Article Ads */
.ad-slot {
  display: block;
  width: 100%;
  margin-block: 20px;
  background: transparent;
  min-height: 100px; /* Base height for ads */
  text-align: center;
}

/* Ensure empty containers don't take space */
div:empty:not([class*="pet-phrase"]),
section:empty {
  display: none !important;
}

.ad-zone--leaderboard { height: 90px; }
.ad-zone--rectangle   { height: 250px; max-width: 300px; }
.ad-zone--skyscraper  { height: 600px; max-width: 160px; }
.ad-zone--sidebar     { height: 600px; max-width: 300px; }

/* ── Animations ── */
@keyframes hero-presence {
  0%   { 
    transform: scale(1); 
    filter: drop-shadow(0 4px 10px rgba(255, 140, 105, 0.1));
  }
  100% { 
    transform: scale(1.03); 
    filter: drop-shadow(0 10px 25px rgba(255, 140, 105, 0.25));
  }
}

.animate-presence {
  animation: hero-presence 4.5s ease-in-out infinite alternate;
}

@keyframes pulse-soft {
  0%   { transform: scale(1); box-shadow: 0 4px 15px rgba(255,140,105,0.4); }
  50%  { transform: scale(1.05); box-shadow: 0 8px 25px rgba(255,140,105,0.6); }
  100% { transform: scale(1); box-shadow: 0 4px 15px rgba(255,140,105,0.4); }
}

.animate-pulse-soft {
  animation: pulse-soft 2.5s infinite ease-in-out;
}

/* ── Specific Button Variants ── */
.btn--vibrant {
  background: linear-gradient(135deg, #FFD580, #FF8C69) !important;
  color: var(--color-text) !important;
  border: 2px solid var(--color-text) !important;
  box-shadow: 0 4px 15px rgba(255,213,128,0.5) !important;
}

.btn--vibrant:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(255,213,128,0.7) !important;
}

/* ── Light Nav Links ── */
.nav-link-light {
  font-size: var(--text-sm) !important;
  color: var(--color-muted) !important;
  font-weight: 500 !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --container-pad: var(--space-4); }
  .section { padding-block: var(--space-12); }
}
/* ── Site Footer (New structure) ── */
.site-footer {
  background: #FDF8F5;
  border-top: 1px solid var(--color-border);
  padding-block: 4rem 2rem;
  color: var(--color-text);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: 4rem;
}

.footer-col h4 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
}

.footer-col ul li + li { margin-top: 0.75rem; }
.footer-col ul a {
  color: var(--color-text-light);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-col ul a:hover { color: var(--color-primary); }

.footer-pets-grid a {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-pets-grid a:hover { color: var(--color-primary); }

.footer-bottom {
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 2rem;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.footer-bottom a { color: var(--color-muted); }
.footer-bottom a:hover { color: var(--color-primary); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* ── Top Announcement Bar ── */
#top-announcement {
  background-color: var(--color-primary-dark);
  color: #FFFFFF;
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: center;
  padding: 8px var(--container-pad);
  position: relative;
  z-index: 1001;
}

#top-announcement a {
  color: #FFFFFF;
  text-decoration: underline;
  font-weight: 800;
  margin-left: 5px;
}

/* ── Toast Notification ── */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: #FFFFFF;
  border-left: 5px solid var(--color-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  transform: translateX(-120%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 320px;
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-content {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--color-text);
}

.toast-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--color-primary-dark);
}
/* ── Global Reset Safety Net ── */
* {
  max-width: 100%;
  box-sizing: border-box;
}
