/*
Theme Name: Encierro - Running of the Bulls
Theme URI: https://encierro.com
Author: Encierro Team
Description: Custom WordPress theme for Encierro.com - Optimized for Elementor with consistent 1200px max-width.
Version: 1.6.0
License: GNU General Public License v2 or later
Text Domain: encierro
*/

:root {
  --max-content-width: 1200px;
  --color-red-primary: #b91c1c;
  --color-red-hover: #991b1b;
  --color-gray-900: #111827;
  --color-gray-700: #374151;
  --color-gray-600: #4b5563;
  --color-gray-500: #6b7280;
  --color-gray-400: #9ca3af;
  --color-gray-300: #d1d5db;
  --color-gray-200: #e5e7eb;
  --color-gray-100: #f3f4f6;
  --color-gray-50: #f9fafb;
  --color-white: #ffffff;
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-primary); line-height: 1.5; color: var(--color-gray-900); background: var(--color-white); }

h1 { font-size: 2rem; font-weight: var(--font-weight-bold); line-height: 1.2; margin-bottom: 1.5rem; }
h2 { font-size: 1.75rem; font-weight: var(--font-weight-bold); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; font-weight: var(--font-weight-semibold); margin-bottom: 1rem; }
h4 { font-size: 1.25rem; font-weight: var(--font-weight-semibold); margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; line-height: 1.6; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
}

.container { width: 100%; max-width: var(--max-content-width); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Buttons */
.btn { 
  display: inline-block; 
  padding: 0.75rem 1.5rem; 
  font-size: 1rem; 
  font-weight: var(--font-weight-medium); 
  text-align: center; 
  text-decoration: none; 
  border-radius: var(--radius-lg); 
  transition: all 0.2s; 
  cursor: pointer; 
  border: none; 
  white-space: nowrap;
}
.btn-primary { background: var(--color-red-primary); color: var(--color-white) !important; }
.btn-primary:hover { background: var(--color-red-hover); color: var(--color-white) !important; }
.btn-primary strong { color: var(--color-white) !important; font-weight: var(--font-weight-bold); }
.btn-secondary { background: var(--color-white); color: var(--color-gray-900); border: 2px solid var(--color-gray-300); }

.nav-cta { 
  padding: 0.5rem 1rem; 
  font-size: 0.875rem; 
  white-space: nowrap;
}

.section { padding: 3rem 0; }
@media (min-width: 1024px) { .section { padding: 5rem 0; } }

.text-center { text-align: center; }
.text-gray-600 { color: var(--color-gray-600); }
.bg-gray-50 { background: var(--color-gray-50); }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-6 { margin-bottom: 3rem; }

.card { background: var(--color-white); border: 1px solid var(--color-gray-200); border-radius: var(--radius-lg); padding: 2rem; transition: box-shadow 0.3s; }
.card:hover { box-shadow: var(--shadow-lg); }

/* ============================================
   HEADER - Mobile First, Fluid Logo
   ============================================ */

.site-header { 
  background: var(--color-white); 
  border-bottom: 1px solid var(--color-gray-200); 
  position: sticky; 
  top: 0; 
  z-index: 1000; 
  box-shadow: var(--shadow-sm); 
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.nav-container { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 0.75rem 1rem; 
  max-width: var(--max-content-width); 
  margin: 0 auto; 
  gap: 1rem; /* Ensure gap between logo and hamburger/nav */
}

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

/* Logo - FLUID: shrinks on small screens */
.site-branding { 
  flex: 1 1 auto;    /* Can grow and SHRINK */
  min-width: 0;      /* Allow shrinking below content size */
  max-width: 460px;  /* Don't grow beyond this on desktop */
}

.logo-link { 
  display: block; 
  text-decoration: none; 
}

.site-logo { 
  height: auto;
  width: 100%;          /* Fill container width */
  max-height: 30px;     /* Mobile default height cap */
  object-fit: contain;  /* Maintain aspect ratio */
  object-position: left center; /* Align left */
}

@media (min-width: 768px) { 
  .site-logo { 
    max-height: 36px; 
  } 
}

@media (min-width: 1024px) { 
  .site-logo { 
    max-height: 40px; 
  } 
}

/* ============================================
   FOOTER - 1200px aligned with padding
   ============================================ */

.site-footer { 
  background: var(--color-gray-900); 
  color: var(--color-gray-300); 
  padding: 3rem 0 2rem; 
}
@media (min-width: 768px) { 
  .site-footer { padding: 4rem 0 2rem; } 
}

.footer-grid { 
  display: grid; 
  gap: 2rem; 
  max-width: var(--max-content-width); 
  margin: 0 auto 3rem; 
  padding: 0 1rem;
}
@media (min-width: 640px) { 
  .footer-grid { grid-template-columns: repeat(2, 1fr); } 
}
@media (min-width: 1024px) { 
  .footer-grid { 
    grid-template-columns: repeat(4, 1fr); 
    padding: 0 2rem;
  } 
}

.footer-column h4 { color: var(--color-white); font-size: 1.125rem; margin-bottom: 1rem; }
.footer-column a { display: block; color: var(--color-gray-400); text-decoration: none; margin-bottom: 0.5rem; transition: color 0.2s; }
.footer-column a:hover { color: var(--color-red-primary); }

.footer-bottom { 
  border-top: 1px solid #374151; 
  padding: 2rem 1rem 0;
  text-align: center; 
  max-width: var(--max-content-width); 
  margin: 0 auto; 
}
@media (min-width: 1024px) { 
  .footer-bottom { padding: 2rem 2rem 0; } 
}

.footer-bottom p { color: var(--color-gray-500); font-size: 0.875rem; margin: 0; }
.footer-bottom .disclaimer { color: var(--color-gray-600); font-size: 0.75rem; margin-top: 0.5rem; }

/* Elementor support */
.entry-content, article { margin: 0; padding: 0; }
.page .entry-content { width: 100%; max-width: 100%; }
.elementor-section.elementor-section-boxed > .elementor-container { max-width: var(--max-content-width); }

img { max-width: 100%; height: auto; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
a:focus, button:focus { outline: 2px solid var(--color-red-primary); outline-offset: 2px; }
