/* ==========================================
   GLOBAL STYLES & LAYOUT - COOPERATIVA JEP
   ========================================== */

@import url('variables.css');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* CSS Reset & Core Standards */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Accessibility Focus States */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--emerald-800);
  color: #fff;
  padding: 12px 24px;
  z-index: 10000;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition-fast);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}

.skip-link:focus {
  top: 20px;
}

/* Container & Grid Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-sm {
  padding: 48px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 992px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 56px 0;
  }
}

/* Typography Standards */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.text-lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 720px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-500) 50%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gold {
  color: var(--gold-500);
}

.text-emerald {
  color: var(--emerald-600);
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600));
  color: var(--gold-400);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(0, 103, 84, 0.25);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.brand-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--gold-500);
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 6px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  position: relative;
  padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--emerald-600);
}

[data-theme="dark"] .nav-link:hover, [data-theme="dark"] .nav-link.active {
  color: var(--emerald-500);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--emerald-600), var(--gold-500));
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--emerald-100);
  color: var(--emerald-800);
  border-color: var(--emerald-500);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 992px) {
  .mobile-nav-toggle {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 32px 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
    z-index: 999;
  }
  .nav-menu.open {
    transform: translateY(0);
  }
}

/* Footer Section */
.footer {
  background: var(--emerald-900);
  color: #ffffff;
  padding: 72px 0 28px;
  margin-top: auto;
  border-top: 4px solid var(--gold-500);
}

.footer h4 {
  color: #ffffff;
  margin-bottom: 20px;
  font-size: 1.15rem;
}

.footer p, .footer li, .footer a {
  color: #cbd5e1;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: var(--gold-400);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.disclaimer-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 24px;
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.5;
}

/* Animations & Reveal Effects */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.2); }
  50% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.5); }
}

.pulse-card {
  animation: pulseGlow 4s infinite ease-in-out;
}
