/* Variables */
:root {
  --primary-color: #4ABC81;
  --primary-dark: #3A9A68;
  --primary-light: #6DD49E;
  --accent-color: #E16C49;
  --accent-light: #F6E2A3;
  --secondary-color: #468AC4;
  --secondary-dark: #3A7AA8;
  --secondary-light: #6A9FD4;
  --text-color: #171b46;
  --light-text: #5A5D6E;
  --text-muted: #8A8D9A;
  --bg-color: #FFFFFF;
  --bg-alt: #ffffff;
  --bg-soft: #ffffff;
  --border-color: rgba(53, 55, 77, 0.1);
  --border-light: rgba(53, 55, 77, 0.05);
  --shadow-color: rgba(53, 55, 77, 0.06);
  --shadow-md: rgba(53, 55, 77, 0.1);
  --shadow-lg: rgba(53, 55, 77, 0.14);
  --highlight-color: rgba(74, 188, 129, 0.08);
  --highlight-accent: rgba(225, 108, 73, 0.08);
  --highlight-secondary: rgba(70, 138, 196, 0.08);
  /* --gradient-primary: linear-gradient(135deg, #FFFFFF 0%, #FFFDF9 100%);
  --gradient-secondary: linear-gradient(135deg, #FFFDF9 0%, #FFFFFF 100%); */
  --gradient-hero: linear-gradient(135deg, #35374D 0%, #4ABC81 50%, #468AC4 100%);
  --gradient-accent: linear-gradient(135deg, #E16C49 0%, #F6E2A3 100%);
  --gradient-green: linear-gradient(135deg, #4ABC81 0%, #3A9A68 100%);
  --gradient-blue: linear-gradient(135deg, #468AC4 0%, #3A7AA8 100%);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --border-radius-sm: 8px;
  --container-width: 1400px;
  --header-height: 90px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1.25rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --header-text-color: #35374D;
  --footer-text-color: #35374D;
}

/* Dark Mode Variables */
.dark-mode {
  --primary-color: #6DD49E;
  --primary-dark: #4ABC81;
  --primary-light: #8DE4B3;
  --accent-color: #F6E2A3;
  --accent-light: #FFE4B5;
  --secondary-color: #6A9FD4;
  --secondary-dark: #468AC4;
  --secondary-light: #8AB4E8;
  --text-color: #F0F0F5;
  --light-text: #C8C8D0;
  --text-muted: #9A9AA5;
  --bg-color: #35374D;
  --bg-alt: #2D2F3D;
  --bg-soft: #3D3F51;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --shadow-md: rgba(0, 0, 0, 0.25);
  --shadow-lg: rgba(0, 0, 0, 0.35);
  --highlight-color: rgba(74, 188, 129, 0.12);
  --highlight-accent: rgba(225, 108, 73, 0.12);
  --highlight-secondary: rgba(70, 138, 196, 0.12);
  --gradient-primary: linear-gradient(135deg, #35374D 0%, #2D2F3D 100%);
  --gradient-secondary: linear-gradient(135deg, #2D2F3D 0%, #35374D 100%);
  --gradient-hero: linear-gradient(135deg, #2D2F3D 0%, #35374D 50%, #4ABC81 100%);
  --header-text-color: #F0F0F5;
  --footer-text-color: #F0F0F5;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background: var(--bg-color);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
}

a {
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* Typing Animation */
.typing-text {
  display: inline-block;
  overflow: hidden;
  border-right: 0.15em solid #E16C49;
  white-space: nowrap;
  margin: 0 auto;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
  max-width: fit-content;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary-color) }
}

.backend-highlight {
  color: #ffffff;
  font-weight: 700;
}

/* Reading Progress Indicator */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 10000;
  background: transparent;
}

.reading-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 10px rgba(15, 23, 42, 0.15);
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 90px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-color);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 20px var(--shadow-color);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: translateY(-3px) rotate(15deg);
  box-shadow: 0 6px 25px var(--shadow-lg);
  border-color: var(--accent-color);
  background: var(--accent-color);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2;
  transition: var(--transition);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Text utilities */
.text-muted {
  color: var(--light-text);
}

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

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #FFFFFF;
  backdrop-filter: blur(20px) saturate(180%);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(53, 55, 77, 0.06);
  border-bottom: 1px solid rgba(53, 55, 77, 0.06);
  /* height: var(--header-height); */
  display: flex;
  /* align-items: center; */
  transition: var(--transition);
}

.dark-mode .header {
  background: linear-gradient(135deg, rgba(53, 55, 77, 0.95) 0%, rgba(45, 47, 61, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.footer {
  /* background-color: var(--bg-alt); */
  color: var(--text-color);
  border-top: 1px solid var(--border-color);
}

.dark-mode .footer {
  background-color: rgba(30, 32, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Dark Mode Section List */

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #E16C49;
}

/* .logo-img {
  height: 40px;
  width: auto;
} */

.logo-text-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-title {
  color: #2E7D32;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
  border-bottom: 2px solid #E16C49;
  padding-bottom: 2px;
}

.logo-subtitle {
  color: #2E7D32;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.logo-text {
  color: #E16C49;
}

.nav-menu {
  /* display: flex; */
  align-items: center;
}

.menu {
  display: flex;
  gap: var(--spacing-md);
  justify-content: space-evenly;
}

.menu li {
  flex: 1;
}

.menu li a {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  position: relative;
  transition: var(--transition);
  color: var(--header-text-color);
}

.menu li a:hover {
  color: var(--primary-color);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.dark-mode .menu li a:hover {
  color: var(--primary-light);
}

.menu li a.active,
.menu li a.active:hover {
  color: var(--primary-color);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.dark-mode .menu li a.active,
.dark-mode .menu li a.active:hover {
  color: var(--primary-light);
}

.menu li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

.menu li a:hover::after,
.menu li a.active::after {
  width: 80%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--header-height);
  background-image: url('../docs/pruebafoto.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(
      145deg, 
      rgba(53, 55, 77, 0.92) 0%, 
      rgba(53, 55, 77, 0.75) 30%,
      rgba(74, 188, 129, 0.65) 70%,
      rgba(70, 138, 196, 0.6) 100%
    );
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(
      ellipse at 20% 30%, 
      rgba(225, 108, 73, 0.25) 0%, 
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 70%, 
      rgba(70, 138, 196, 0.2) 0%, 
      transparent 50%
    );
  z-index: 2;
  animation: pulse 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(50px, 50px) scale(1.1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: var(--spacing-xl) 0;
  position: relative;
  z-index: 3;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-xs);
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero h2 {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: var(--spacing-md);
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-lg);
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.highlight {
  color: #E16C49;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  margin-top: var(--spacing-lg);
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 3;
}

.arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid #E16C49;
  border-bottom: 2px solid #E16C49;
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(45deg);
  }
  40% {
    transform: translateY(-10px) rotate(45deg);
  }
  60% {
    transform: translateY(-5px) rotate(45deg);
  }
}

/* Section Styles */
.section {
  padding: var(--spacing-2xl) 0;
  scroll-margin-top: 90px;
}

.bg-alt {
  background: var(--bg-alt);
  position: relative;
}

.bg-alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.section-title {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  padding-bottom: var(--spacing-md);
  color: var(--text-color);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.page-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--text-color);
  margin: 5rem 0 3rem 0;
  font-weight: 700;
}

/* En Construcción */
.en-construccion {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl) 0;
  text-align: center;
}

.en-construccion svg {
  color: var(--accent-color);
  margin-bottom: var(--spacing-md);
  animation: wrench 2s ease-in-out infinite;
}

.en-construccion p {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

@keyframes wrench {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-15deg);
  }
  75% {
    transform: rotate(15deg);
  }
}

.section-description {
  /* font-size: 1.1rem;
  color: var(--light-text); */
  /* margin-bottom: var(--spacing-lg); */
  line-height: 1.8;
  max-width: 800px;
  /* margin-left: auto;
  margin-right: auto; */
  text-align: justify;
  /* text-justify: inter-word; */
}

.section-list {
  list-style: none;
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
}

.section-list li {
  padding: var(--spacing-sm) 0;
  padding-left: var(--spacing-lg);
  position: relative;
  color: var(--light-text);
  line-height: 1.3;
}

/* .section-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
  flex-shrink: 0;
} */

/* About Section */
.about-content {
  display: flex;
  gap: var(--spacing-xl);
  align-items: center;
}

.about-image {
  flex: 1;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.image-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--gradient-primary);
  border-radius: 50%;
  box-shadow: 0 15px 40px var(--shadow-lg);
  overflow: hidden;
  border: 4px solid var(--bg-color);
  transition: var(--transition);
}

.image-container:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 50px var(--shadow-lg);
}

.perfil-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none; /* sin borde */
  box-shadow: none; /* sin sombra */
}

.about-text {
  flex: 2;
  max-width: 600px;
}

.about-text p {
  margin-bottom: var(--spacing-md);
  color: var(--light-text);
}

.about-details {
  margin: var(--spacing-lg) 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

.detail-item {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-sm);
}

.detail-title {
  font-weight: 600;
  color: var(--text-color);
}

.detail-info {
  color: var(--light-text);
}

.available {
  color: var(--primary-color);
  font-weight: 600;
}

/* Projects Section */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

.filter-btn {
  padding: 10px 24px;
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  outline: none;
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-lg);
}

.project-card.hidden {
  display: none;
}

.project-card {
  background: var(--bg-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow-color);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow-lg);
  border-color: transparent;
}

.project-card:hover::before {
  opacity: 1;
}

.project-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-img img {
  transform: scale(1.05);
}

.project-info {
  padding: var(--spacing-md);
}

.project-info h3 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.2rem;
}

.project-info p {
  color: var(--light-text);
  margin-bottom: var(--spacing-md);
  font-size: 0.9rem;
}

.project-description {
  margin-bottom: 0;
}

.description-short {
  margin-bottom: 0;
}

.description-full {
  margin-top: var(--spacing-xs);
  margin-bottom: 0;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 180px;
  width: 220px;
  flex: 0 0 220px;
}

.project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-description {
  flex: 1;
}

.read-more-btn {
  margin-top: auto;
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: var(--spacing-xs) 0;
  transition: var(--transition);
  position: relative;
  outline: none;
}

.read-more-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.read-more-btn:hover::after {
  width: 100%;
}

.read-more-btn:hover {
  color: var(--primary-dark);
}

.project-card .project-img {
  display: none;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--spacing-md);
}

.project-tags span {
  background-color: var(--highlight-color);
  color: var(--primary-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: var(--transition);
  cursor: default;
}

.project-tags span:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

.project-links {
  display: flex;
  justify-content: space-between;
}

.project-link {
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
}

.project-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.project-link:hover::after {
  width: 100%;
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.skills-category h3 {
  margin-bottom: var(--spacing-md);
  font-size: 1.3rem;
  padding-bottom: var(--spacing-xs);
  border-bottom: 1px solid var(--border-color);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.skill-item {
  margin-bottom: var(--spacing-xs);
}

.skill-name {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.skill-bar {
  width: 100%;
  height: 10px;
  background-color: var(--border-color);
  border-radius: 10px;
  overflow: visible;
  position: relative;
}

.skill-level {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  position: relative;
  animation: skill-bar-fill 1.5s ease-out forwards;
  transform-origin: left;
  transform: scaleX(0);
  box-shadow: 0 0 15px rgba(15, 23, 42, 0.15);
}

.skill-level::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  border-radius: 10px;
  animation: shimmer 2s infinite;
}

@keyframes skill-bar-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.contact-item {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
  transition: var(--transition);
}

.contact-item:hover .contact-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

.contact-text h3 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.1rem;
}

.contact-text p {
  color: var(--light-text);
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.social-link {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--highlight-color);
  color: var(--primary-color);
  transition: var(--transition);
  border: 2px solid transparent;
}

.social-link:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px) rotate(5deg);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
  border-color: rgba(255, 255, 255, 0.2);
}

.contact-form {
  background-color: var(--bg-color);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px var(--shadow-color);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.contact-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
  font-family: inherit;
  background-color: var(--bg-color);
  color: var(--text-color);
}

.form-group textarea {
  height: 150px;
  resize: vertical;
  min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--highlight-color);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.success,
.form-group textarea.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-error {
  display: block;
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 6px;
  min-height: 20px;
  font-weight: 500;
}

.form-success {
  margin-top: var(--spacing-md);
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 2px solid #10b981;
  border-radius: var(--border-radius-sm);
  color: #059669;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.4s ease-out;
}

.form-success svg {
  flex-shrink: 0;
  stroke: #10b981;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spinner {
  animation: rotate 1s linear infinite;
}

.spinner-circle {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dashoffset: 60;
  }
  50% {
    stroke-dashoffset: 15;
  }
  100% {
    stroke-dashoffset: 60;
  }
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

  .center {
    text-align: center;
  }

 p {
  text-align: justify;
  text-justify: inter-word;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #156951;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 0 rgba(15, 23, 42, 0);
}

.btn-outline:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
}

.btn-full {
  width: 100%;
}

/* Custom Consulta Buttons */
.btn-carpeta {
  background: #c64402;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(74, 188, 129, 0.4);
}

.btn-carpeta:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(74, 188, 129, 0.5);
  background: linear-gradient(135deg, #3A9A68 0%, #2E7D56 100%);
}

.btn-visor {
  background: #0092FF;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(70, 138, 196, 0.4);
}

.btn-pat {
  background: #ffae00;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(70, 138, 196, 0.4);
}

.btn-publica {
  background:#37cf18;
  color:#ffffff;
  box-shadow: 0 4px 15px rgba(70, 138, 196, 0.4);
}

.btn-publica-pat {
  background:#1398cc;
  color:#ffffff;
  box-shadow: 0 4px 15px rgba(70, 138, 196, 0.4);
}

.btn-publica-download {
  background:#acbe07;
  color:#ffffff;
  box-shadow: 0 4px 15px rgba(70, 138, 196, 0.4);
}


.btn-visor:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(70, 138, 196, 0.5);
  background: linear-gradient(135deg, #3A7AA8 0%, #2E6689 100%);
}

/* Smart Buttons */
.smart-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.smart-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  overflow: visible;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.smart-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.smart-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  cursor: pointer;
}

.smart-card-link {
  display: block;
  padding: 14px 16px;
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
  border-top: 1px solid var(--border-light);
  background: var(--bg-color);
  transition: color 0.2s ease, background 0.2s ease;
}

.smart-card-link:hover {
  color: var(--secondary-color);
  background: var(--highlight-color);
}

.smart-btn {
  position: relative;
  width: 250px;
  height: 250px;
  border: none;
  background: var(--gradient-green);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  clip-path: circle(50%);
}

.smart-btn span {
  z-index: 1;
}

.smart-btn.shape-circle {
  clip-path: circle(50%);
}

.smart-btn.shape-circle:hover {
  clip-path: circle(60%);
  transform: scale(1.1);
}

.smart-btn.shape-triangle {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.smart-btn.shape-triangle:hover {
  clip-path: polygon(50% 10%, 10% 90%, 90% 90%);
  transform: scale(1.1);
}

.smart-btn.shape-square {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.smart-btn.shape-square:hover {
  clip-path: polygon(10% 10%, 90% 10%, 90% 90%, 10% 90%);
  transform: scale(1.1);
}

.smart-btn.shape-hexagon {
  clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
}

.smart-btn.shape-hexagon:hover {
  clip-path: polygon(50% 5%, 88.3% 30%, 88.3% 70%, 50% 95%, 11.7% 70%, 11.7% 30%);
  transform: scale(1.1);
}

/* Section Description */
.section-description {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--spacing-xl);
  color: var(--light-text);
  font-size: 1.1rem;
}

/* Section List */
.section-list {
  max-width: 700px;
  margin: 0 auto var(--spacing-xl);
  padding-left: 1.5rem;
}

.section-list li {
  position: relative;
  padding: var(--spacing-sm) 0;
  padding-left: var(--spacing-lg);
  color: var(--light-text);
  font-size: 1.1rem;
  line-height: 1.6;
}

.section-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.1em;
}

/* Planes Territoriales Section */
.planes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.plan-card {
  background: var(--bg-color);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: var(--transition);
}

.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px var(--shadow-lg);
  border-color: transparent;
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 8px 20px rgba(74, 188, 129, 0.3);
  transition: var(--transition);
}

.plan-card:hover .plan-icon {
  transform: scale(1.08) rotate(3deg);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  box-shadow: 0 12px 30px rgba(70, 138, 196, 0.35);
}

.plan-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
  font-weight: 600;
}

.plan-card p {
  color: var(--light-text);
  line-height: 1.75;
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.plan-link {
  color: var(--secondary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.plan-link:hover {
  color: var(--primary-color);
  gap: 0.75rem;
}

/* Timeline Section */
.timeline {
  position: relative;
  max-width: 800px;
  margin: var(--spacing-xl) auto;
  padding-left: var(--spacing-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color), var(--accent-light));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-xl);
  padding-left: var(--spacing-xl);
}

.timeline-marker {
  position: absolute;
  left: -9px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 3px solid var(--bg-color);
  box-shadow: 0 0 0 3px var(--primary-color);
  transition: var(--transition);
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.3);
  background: var(--secondary-color);
  box-shadow: 0 0 0 3px var(--secondary-color);
}

.timeline-content {
  background: var(--bg-color);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.timeline-item:hover .timeline-content {
  box-shadow: 0 10px 30px var(--shadow-lg);
  transform: translateX(8px);
  border-color: var(--secondary-color);
}

.timeline-date {
  display: inline-block;
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  letter-spacing: 0.02em;
}

.timeline-content h3 {
  font-size: 1.15rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-color);
  font-weight: 600;
}

.timeline-content p {
  color: var(--light-text);
  line-height: 1.75;
  font-size: 0.95rem;
}

/* Aliados Section */
.aliados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.aliado-card {
  background: var(--bg-color);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  /* border: 1px solid var(--border-color); */
  text-align: center;
  transition: var(--transition-slow);
}

.aliado-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px var(--shadow-lg);
  border-color: var(--secondary-color);
}

.aliado-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-md);
  border-radius: 50%;
  background: var(--highlight-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  transition: var(--transition);
  border: 2px solid transparent;
}

.aliado-card:hover .aliado-logo {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  transform: scale(1.08);
  border-color: var(--secondary-color);
}

.aliado-card h3 {
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-color);
  font-weight: 500;
}

.aliado-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Noticias Section */
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.noticia-card {
  background: var(--bg-color);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.noticia-imagen {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
}

.noticia-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.noticia-card:hover .noticia-imagen img {
  transform: scale(1.05);
}

.noticia-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
  opacity: 0;
  transition: var(--transition);
}

.noticia-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow-lg);
  border-color: transparent;
}

.noticia-card:hover::before {
  opacity: 1;
}

.noticia-fecha {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 6px 14px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.noticia-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.noticia-card p {
  color: var(--light-text);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

.noticia-link {
  color: var(--accent-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.noticia-link:hover {
  transform: translateX(5px);
  color: var(--accent-light);
}

.publicaciones-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: var(--spacing-lg);
  align-items: start;
}

.publicaciones-sidebar {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  position: sticky;
  top: 80px;
  height: fit-content;
}

.publicaciones-sidebar .form-group {
  margin-bottom: var(--spacing-lg);
}

.publicaciones-sidebar label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.publicaciones-sidebar input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-alt);
  color: var(--text-color);
}

.filters-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.filters-list button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.85rem 1rem;
  background: transparent;
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
}

.filters-list button:hover,
.result-list {
  list-style: none;
  padding: 0;
  margin: var(--spacing-sm) 0 0 0;
  max-height: 300px;
  overflow-y: auto;
}

.result-list li {
  margin-bottom: var(--spacing-xs);
}

.result-list a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.ver-mas-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin: var(--spacing-lg) auto;
  display: block;
}

.ver-mas-btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.publicaciones-main {
  display: grid;
  gap: var(--spacing-lg);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-color);
  border-radius: var(--border-radius);
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--spacing-lg);
  position: relative;
  margin: var(--spacing-lg);
}

.close-modal-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-color);
}

.modal-header {
  margin-bottom: var(--spacing-md);
}

.modal-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin: var(--spacing-md) 0;
}

.modal-body p {
  color: var(--light-text);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

@media (max-width: 1024px) {
  .publicaciones-layout {
    grid-template-columns: 1fr;
  }

  .publicaciones-sidebar {
    position: relative;
    top: 0;
  }
}

/* Close button for toggle section */
.close-noticia-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: inherit;
  z-index: 10;
  transition: transform 0.2s ease, color 0.2s ease;
}

.close-noticia-btn:hover {
  transform: scale(1.2);
  color: var(--accent-color);
}

/* Consulta Pública Section */
.consulta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-xl);
}

.consulta-imagen img {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mapa-imagen img {
  /* max-width: 400px; */
  width: 150%;
  height: 150%;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.consulta-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
  margin-top: var(--spacing-xl);
}

.consulta-left {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.consulta-right {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.consulta-info {
  margin-bottom: 0;
}

.consulta-detalles {
  margin: 0;
}

.consulta-doble {
  margin-bottom: 0;
}

.consulta-doble + .consulta-doble {
  margin-top: 0;
}

.mapa-imagen {
  width: 100%;
}

.consulta-info h3 {
  font-size: 1.8rem;
  margin-bottom: var(--spacing-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.consulta-info > p {
  color: var(--light-text);
  line-height: 1.8;
  margin-bottom: var(--spacing-lg);
  font-size: 1.05rem;
}

.detalle-item {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg-color);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.detalle-item:hover {
  box-shadow: 0 5px 15px var(--shadow-color);
  transform: translateX(5px);
}

.detalle-item svg {
  flex-shrink: 0;
  color: var(--primary-color);
  margin-top: 2px;
}

.detalle-item strong {
  display: block;
  color: var(--text-color);
  margin-bottom: 4px;
}

.detalle-item p {
  color: var(--light-text);
  margin: 0;
}

.consulta-buttons {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.consulta-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.consulta-imagen {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.consulta-imagen img {
  width: 100%;
  height: auto;
  transition: var(--transition);
}

.consulta-imagen:hover img {
  transform: scale(1.05);
}

/* Galería Virtual Section */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.galeria-item {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--shadow-color);
  transition: var(--transition);
}

.galeria-item:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 40px var(--shadow-lg);
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  display: block;
}

.galeria-item:hover img {
  transform: scale(1.1);
}

.galeria-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: var(--spacing-md);
  transform: translateY(100%);
  transition: var(--transition);
  color: white;
}

.galeria-item:hover .galeria-overlay {
  transform: translateY(0);
}

.galeria-overlay h4 {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
  color: white;
}

.galeria-overlay p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Footer */
.footer {
  background-color: #EC643B;
  color: white;
  padding: var(--spacing-lg) 0;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

/* Visitor Counter */
.visitor-counter {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.visitor-counter svg {
  flex-shrink: 0;
  color: white;
}

.visitor-counter a:hover {
  opacity: 0.8;
}

.visitor-counter img {
  border-radius: 4px;
  transition: var(--transition);
}

.visitor-counter img:hover {
  transform: scale(1.05);
}

/* Videos Section */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.video-item {
  background: var(--bg-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: var(--transition);
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-lg);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.video-info {
  padding: var(--spacing-md);
}

.video-info h3 {
  margin-bottom: var(--spacing-xs);
  font-size: 1.2rem;
  color: var(--primary-color);
}

.video-info p {
  color: var(--light-text);
  font-size: 0.9rem;
  margin: 0;
}

/* Dark mode videos */
.dark-mode .video-item {
  background: rgba(255, 255, 255, 0.05);
}

.dark-mode .video-info h3 {
  color: var(--primary-light);
}

.dark-mode .video-info p {
  color: var(--light-text);
}

/* Animations */
.animate-fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in 0.8s forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

@keyframes fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */

/* Tablets (768px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .about-content {
    gap: var(--spacing-lg);
  }

  .about-image {
    flex: 0.8;
  }

  .about-text {
    flex: 1.5;
  }

  .skills-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .filter-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}

/* Mobile Devices (max-width: 768px) */
@media screen and (max-width: 768px) {
  .hero {
    background-attachment: scroll;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .project-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .reading-progress {
    height: 3px;
  }

  .theme-toggle {
    top: 85px;
    right: 15px;
    width: 50px;
    height: 50px;
  }
  
  .menu {
    /* position: fixed; */
    top: var(--header-height);
    left: 0;
    width: 100%;
    /* background-color: var(--bg-color); */
    flex-direction: column;
    gap: 0;
    height: 0;
    overflow: hidden;
    /* transition: var(--transition); */
    /* box-shadow: 0 5px 10px var(--shadow-color); */
  }
  
  .menu.open {
    height: auto;
    padding: var(--spacing-md) 0;
  }
  
  .menu li {
    width: 100%;
    text-align: center;
  }
  
  .menu li a {
    display: block;
    padding: var(--spacing-sm) 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .logo-text-wrapper {
    display: none;
  }
  
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  
  .about-image {
    max-width: 250px;
    margin: 0 auto var(--spacing-lg);
  }
  
  .about-text {
    max-width: 100%;
  }
  
  .about-details {
    grid-template-columns: 1fr;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .planes-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline {
    padding-left: var(--spacing-md);
  }
  
  .timeline-item {
    padding-left: var(--spacing-md);
  }
  
  /* .aliados-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, fr));
  } */
  
  .noticias-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .consulta-content {
    grid-template-columns: 1fr;
  }
  
  .consulta-header {
    flex-direction: column;
    text-align: center;
  }
  
  .consulta-imagen img {
    max-width: 100%;
  }
  
  .galeria-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media screen and (max-width: 480px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-lg: 1.5rem;
    --spacing-md: 1rem;
    --spacing-sm: 0.8rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero h2 {
    font-size: 1.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .project-card {
    width: 100%;
    flex: 0 0 100%;
  }

  .skills-container {
    grid-template-columns: 1fr;
  }
}

/* Slider Styles */
.slider-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: var(--spacing-xl) auto 0;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px var(--shadow-lg);
}

.slider-wrapper {
  width: 100%;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.slide {
  min-width: 100%;
  flex-shrink: 0;
  cursor: pointer;
}

.slide img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  background: #f5f5f0;
  display: block;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
  z-index: 10;
  color: var(--primary-color);
}

.slider-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.slider-btn-prev {
  left: 20px;
}

.slider-btn-next {
  right: 20px;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--primary-color);
  cursor: pointer;
  transition: var(--transition);
}

.slider-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.slider-dot:hover {
  background: var(--primary-light);
}

@media screen and (max-width: 768px) {
  .slide img {
    height: auto;
    max-height: 300px;
  }
  
  .slider-btn {
    width: 40px;
    height: 40px;
  }
  
  .slider-btn-prev {
    left: 10px;
  }
  
  .slider-btn-next {
    right: 10px;
  }
}

@media screen and (max-width: 480px) {
  .slide img {
    height: auto;
    max-height: 200px;
  }
  
  .slider-btn {
    width: 35px;
    height: 35px;
  }
  
  .slider-dots {
    bottom: 10px;
  }
  
  .slider-dot {
    width: 10px;
    height: 10px;
  }
}

  .tooltip {
    position: relative;
  }

  .tooltip::after {
    content: "Descargar documento PDF";
    position: absolute;
    bottom: 120%;
    left: 0;
    background: #333;
    color: #fff;
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }

  .tooltip:hover::after {
    opacity: 1;
  }

/* Proyecto Destacado */
/* .proyecto-destacado moved to planes-territoriales.css */

/* Hitos del Proyecto */
/* Styles unchanged - same in both modes */

/* Planes Territoriales */
/* .planes-territoriales moved to planes-territoriales.css */

.equipo-div {
  background: #EC643B;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  /* border: 2px solid #0092FF; */
  box-shadow: 0 10px 30px var(--shadow-lg);
  margin-bottom: var(--spacing-xl);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  border-left: none;
  border-right: none;
  border-radius: 0;
}

.dark-mode .participamos-div {
  background: #3a6499;
}

.dark-mode .participamos-div p,
.dark-mode .participamos-div h3 {
  color: white !important;
}

.dark-mode .page-title {
  color: white !important;
}

.dark-mode .consulta-detalles {
  background: var(--bg-alt);
}

.dark-mode .detalle-item {
  background: var(--bg-soft);
  border-color: var(--border-color);
}

.dark-mode .detalle-item strong {
  color: white !important;
}

.dark-mode .detalle-item p {
  color: var(--light-text) !important;
}

.dark-mode .consulta-info h2 {
  color: white !important;
}

.dark-mode .consulta-info {
  color: var(--light-text) !important;
}

.dark-mode #aliados p,
.dark-mode #aliados strong,
.dark-mode #aliados li,
.dark-mode #recursos p,
.dark-mode #recursos strong,
.dark-mode #recursos li {
  color: white !important;
}

.dark-mode #recursos a[target="_blank"] {
  color: white !important;
  text-decoration: underline;
}

.dark-mode .ver-publicacion {
  color: white !important;
  font-weight: bold;
  text-decoration: underline;
  background: var(--bg-color) !important;
}

.dark-mode #consulta-pat {
  background: #ffffff;
}

.dark-mode .consulta-header {
  background: #ffffff;
  border-radius: var(--border-radius);
}

.dark-mode .consulta-header .section-title {
  color: #171b46 !important;
}

.dark-mode .consulta-info {
  color: #5A5D6E !important;
}

.dark-mode .consulta-info h2 {
  color: #171b46 !important;
}

.dark-mode .consulta-detalles {
  background: #ffffff;
  border-radius: var(--border-radius);
}

.dark-mode .detalle-item {
  background: #f5f5f5;
  border-color: rgba(53, 55, 77, 0.1);
}

.dark-mode .detalle-item strong {
  color: #171b46 !important;
}

.dark-mode .detalle-item p {
  color: #5A5D6E !important;
}

.dark-mode .mapa-imagen img {
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px var(--shadow-color);
}

.aliados-container {
  background: #ffffff;
  /* background: linear-gradient(135deg, #E5D3c1 0%, rgba(0, 146, 255, 0.1) 100%); */
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  /* border: 2px solid #0092FF; */
  box-shadow: 0 10px 30px var(--shadow-lg);
  margin-bottom: var(--spacing-xl);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  border-left: none;
  border-right: none;
  border-radius: 0;
}

.recursos-div {
  background: #EC643B;
  /* background: linear-gradient(135deg, #E5D3c1 0%, rgba(0, 146, 255, 0.1) 100%); */
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  /* border: 2px solid #0092FF; */
  box-shadow: 0 10px 30px var(--shadow-lg);
  margin-bottom: var(--spacing-xl);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  border-left: none;
  border-right: none;
  border-radius: 0;
}

.consulta-pdm {
  background: #E5D3c1;
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}

.redes-sociales {
  background: #EC643B;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  /* border: 2px solid #0092FF; */
  box-shadow: 0 10px 30px var(--shadow-lg);
  margin-bottom: var(--spacing-xl);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  border-left: none;
  border-right: none;
  border-radius: 0;
}




/* Modal de imagen */
.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.social-link {
  color: #1877f2; /* Facebook */
  transition: transform 0.2s ease, color 0.2s ease;
}

.social-link:hover {
  transform: scale(1.1);
  color: #0d5bd7;
}

.social-link {
  color: #0a66c2; /* LinkedIn */
  transition: transform 0.2s ease, color 0.2s ease;
}

.social-link:hover {
  transform: scale(1.1);
}

/* First Visit Popup */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.popup-image {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.popup-link {
  display: block;
}

.popup-link:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

.popup-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: background 0.2s ease, transform 0.2s ease;
}

.popup-close:hover {
  background: #E16C49;
  color: #ffffff;
  transform: scale(1.1);
}

.popup-action {
  display: block;
  margin: 15px auto 0;
  padding: 12px 30px;
  background: #E16C49;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  text-align: center;
}

.popup-action:hover {
  background: #c55a3b;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .popup-content {
    max-width: 95%;
  }
  
  .popup-close {
    top: -35px;
    right: 50%;
    transform: translateX(50%);
  }
}

/* PDF Grid */
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.pdf-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pdf-item a {
  text-decoration: none;
  color: #171b46;
  display: block;
}

.pdf-item h3 {
  margin-bottom: 10px;
}

.pdf-item p {
  font-size: 14px;
  color: #666;
}

/* Dropdown Content */
.dropdown-content {
  position: relative;
  background-color: var(--bg-color, #fff);
  width: 100%;
  border-top: 1px solid var(--border-light);
  padding: 8px 0;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.dropdown-content a {
  color: var(--primary-color, #171b46);
  padding: 9px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a::before {
  content: "⬇";
  font-size: 11px;
  opacity: 0.6;
  flex-shrink: 0;
}

.dropdown-content a:hover {
  background-color: var(--highlight-color, #f1f1f1);
  color: var(--secondary-color, #0070f3);
}

/* Chevron indicator on button */
.smart-card-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.smart-card-link .chevron {
  display: inline-block;
  transition: transform 0.25s ease;
  font-style: normal;
  font-size: 11px;
}

.smart-card-link.open .chevron {
  transform: rotate(180deg);
}
