/**
 * Estilos Principales - Cátedra Educación Ambiental
 * Este CSS replica el diseño del tema original usando las mismas variables y estilos
 */

/* ===================================
   VARIABLES CSS (Color Palette)
   =================================== */
:root {
  /* Fondos y bordes */
  --background: hsl(0, 0%, 98%);
  --foreground: hsl(220, 15%, 20%);
  --border: hsl(220, 10%, 88%);
  
  /* Cards */
  --card: hsl(0, 0%, 96%);
  --card-foreground: hsl(220, 15%, 22%);
  --card-border: hsl(220, 10%, 90%);
  
  /* Popover */
  --popover: hsl(0, 0%, 94%);
  --popover-foreground: hsl(220, 15%, 18%);
  --popover-border: hsl(220, 10%, 86%);
  
  /* Colores principales */
  --primary: hsl(140, 45%, 35%);
  --primary-foreground: hsl(140, 10%, 98%);
  --primary-border: hsl(140, 45%, 27%);
  
  --secondary: hsl(140, 8%, 90%);
  --secondary-foreground: hsl(220, 15%, 20%);
  
  --muted: hsl(140, 6%, 92%);
  --muted-foreground: hsl(220, 10%, 40%);
  
  --accent: hsl(205, 15%, 90%);
  --accent-foreground: hsl(220, 15%, 20%);
  
  /* Tipografía */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  
  /* Espaciado */
  --radius: 0.5rem;
  
  /* Sombras */
  --shadow-sm: 0px 1px 3px 0px hsl(220 15% 20% / 0.08);
  --shadow-md: 0px 4px 6px -1px hsl(220 15% 20% / 0.08);
  --shadow-lg: 0px 10px 15px -3px hsl(220 15% 20% / 0.08);
  
  /* Elevation system */
  --elevate-1: rgba(0,0,0, .03);
  --elevate-2: rgba(0,0,0, .08);
}

/* ===================================
   RESET & BASE
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

.text-h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

.text-h2 {
  font-size: 2rem;
  font-weight: 600;
}

.text-h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

.text-h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

.font-heading {
  font-family: var(--font-heading);
}

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

.text-primary {
  color: var(--primary);
}

/* ===================================
   LAYOUT
   =================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.site-content {
  min-height: 60vh;
}

/* ===================================
   HEADER
   =================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.site-logo a,
.site-branding a {
  display: block;
}

.site-logo img {
  height: 3.5rem;
  width: auto;
  object-fit: contain;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-navigation .primary-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.main-navigation .primary-menu > li {
  position: relative;
}

.main-navigation .primary-menu > li > a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.main-navigation .primary-menu > li > a:hover {
  background-color: var(--elevate-1);
}

.main-navigation .primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--popover);
  border: 1px solid var(--popover-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.main-navigation .primary-menu > li:hover .sub-menu {
  opacity: 1;
  visibility: visible;
}

.main-navigation .sub-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.main-navigation .sub-menu li a:hover {
  background-color: var(--elevate-1);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-icon span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--foreground);
  transition: all 0.3s;
}

.mobile-menu {
  border-top: 1px solid var(--border);
  padding-bottom: 1rem;
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-list li {
  padding: 0.5rem 0;
}

.mobile-menu-list li a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
}

.mobile-menu-list li a:hover {
  background-color: var(--elevate-1);
}

.mobile-menu-list .sub-menu {
  list-style: none;
  padding-left: 1.5rem;
}

.mobile-menu.hidden {
  display: none;
}

@media (max-width: 1023px) {
  .main-navigation {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
}

/* ===================================
   FOOTER
   =================================== */
.site-footer {
  background-color: var(--muted);
  margin-top: 4rem;
}

.site-footer .container {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.site-footer .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .site-footer .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.site-footer h3 {
  margin-bottom: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer ul li {
  margin-bottom: 0.5rem;
}

.site-footer a {
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--primary);
}

/* ===================================
   GRID SYSTEM
   =================================== */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
  .grid.md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid.md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid.md\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .grid.md\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid.lg\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid.lg\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid.lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===================================
   CARDS
   =================================== */
.card {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}

.card-content {
  padding: 1.5rem;
}

.card.hover-elevate {
  position: relative;
}

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

/* ===================================
   BUTTONS
   =================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary-border);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border);
}

.btn-outline:hover {
  background-color: var(--accent);
}

/* ===================================
   HERO SLIDER
   =================================== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background-color: var(--muted);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.hero-content .container {
  padding-bottom: 4rem;
}

.hero-title {
  color: white;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  max-width: 48rem;
}

.slider-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
}

.slider-controls button {
  pointer-events: all;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.slider-controls button:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.slider-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.slider-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.slider-indicator.active {
  width: 2rem;
  background-color: white;
}

/* ===================================
   CIRCULAR FEATURES
   =================================== */
.circular-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}

.circular-feature-icon {
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.3s;
}

.circular-feature:hover .circular-feature-icon {
  transform: scale(1.05);
}

.circular-feature-icon svg,
.circular-feature-icon img {
  width: 4rem;
  height: 4rem;
  color: var(--primary-foreground);
}

.circular-feature-title {
  transition: color 0.3s;
}

.circular-feature:hover .circular-feature-title {
  color: var(--primary);
}

/* ===================================
   NEWS/ARTICLE CARDS
   =================================== */
.news-card {
  height: 100%;
}

.news-card-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.news-card-content {
  padding: 1.5rem;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.news-title {
  margin-bottom: 0.5rem;
}

/* ===================================
   TEAM MEMBERS
   =================================== */
.team-member {
  text-align: center;
}

.team-member-photo {
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  overflow: hidden;
  margin: 0 auto 1rem;
  background-color: var(--muted);
}

.team-member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member-name {
  margin-bottom: 0.25rem;
}

.team-member-role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.team-member-department {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.team-member-contact {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.team-member-contact a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.team-member-contact a:hover {
  color: var(--primary);
}

/* ===================================
   UTILITY CLASSES (Tailwind-Compatible)
   =================================== */

/* Background Colors */
.bg-background { background-color: var(--background); }
.bg-foreground { background-color: var(--foreground); }
.bg-card { background-color: var(--card); }
.bg-muted { background-color: var(--muted); }
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-accent { background-color: var(--accent); }

/* Text Colors */
.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-card-foreground { color: var(--card-foreground); }

/* Display */
.flex { display: flex; }
.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }

/* Flex Direction */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }

/* Flex Wrap */
.flex-wrap { flex-wrap: wrap; }

/* Align Items */
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }

/* Justify Content */
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

/* Gap */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Spacing - Margin */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Spacing - Padding */
.p-0 { padding: 0; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

.pt-2 { padding-top: 0.5rem; }
.pt-8 { padding-top: 2rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-16 { padding-bottom: 4rem; }

/* Space Between */
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-10 { width: 2.5rem; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }

/* Height */
.h-full { height: 100%; }
.h-auto { height: auto; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-10 { height: 2.5rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
.h-48 { height: 12rem; }

/* Max Width */
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-none { max-width: none; }

/* Text Size */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }

/* Text Align */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Font Weight */
.font-normal { font-weight: 400; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Border */
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }

/* Border Radius */
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: var(--radius); }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Object Fit */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }

/* Z-Index */
.z-50 { z-index: 50; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Transitions */
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* Hover Effects */
.hover-elevate {
  transition: all 0.3s;
}

.hover-elevate:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Line Clamp */
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Flex Shrink */
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 0%; }

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Responsive Utilities */
@media (max-width: 767px) {
  .hidden\:md { display: none; }
}

@media (min-width: 768px) {
  .md\:text-h1 { font-size: 2.5rem; }
  .md\:text-xl { font-size: 1.25rem; }
  
  /* Grid for medium screens */
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .md\:grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1024px) {
  /* Display utilities for large screens */
  .lg\:flex {
    display: flex;
  }
  
  .lg\:hidden {
    display: none;
  }
  
  /* Grid for large screens */
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Hover Utilities */
.hover\:text-primary:hover {
  color: var(--primary);
}

.hover\:underline:hover {
  text-decoration: underline;
}

.hover\:bg-muted:hover {
  background-color: var(--muted);
}

.hover\:bg-accent:hover {
  background-color: var(--accent);
}

/* Grid */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

/* Prose (for content) */
.prose {
  color: var(--foreground);
  max-width: 65ch;
}

.prose-lg {
  font-size: 1.125rem;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 1em;
}

.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.prose ul, .prose ol {
  padding-left: 1.625em;
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
}

.prose strong {
  font-weight: 600;
}
