:root {
  --primary: #0a4d3c;
  --primary-light: #1b6b55;
  --secondary: #81c784;
  --accent: #c8e6c9;
  --bg-main: #fdfcf8;
  --bg-card: #ffffff;
  --text-main: #1a2421;
  --text-muted: #546e7a;
  --white: #ffffff;
  --shadow-sm: 0 4px 15px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 30px rgba(10, 77, 60, 0.08);
  --glass: rgba(255, 255, 255, 0.85);
  --radius: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  overflow-x: hidden; /* Prevent horizontal movement */
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary);
  position: relative;
  display: inline-block;
}

/* --- UTILITIES --- */
.badge {
  background: var(--accent);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 20px;
}

/* --- HEADER --- */
#progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--secondary);
  width: 0%;
  transition: width 0.1s ease-out;
  z-index: 2000;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  padding: 25px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: none;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 1100;
}

.header.scrolled {
  padding: 8px 5%;
  min-height: 60px; /* Slimmer header as requested */
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(131, 199, 132, 0.2);
}

.header.scrolled .logo {
  transform: scale(0.85); /* Slightly smaller logo in slim header */
  transform-origin: left center;
}

.logo {
  max-width: 200px;
  max-height: 80px;
  object-fit: contain;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.menu {
  display: flex;
  gap: 1.5rem;
}

.menu-btn {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 30px;
  transition: var(--transition);
}

.menu-btn:hover {
  background: rgba(10, 77, 60, 0.05);
  transform: translateY(-2px);
}

/* --- HERO --- */
.hero {
  min-height: 110vh;
  background: radial-gradient(circle at top right, var(--primary-light), var(--primary));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  padding: 140px 20px 180px; /* Space for slanted clip-path */
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); /* Elegant slant */
  margin-bottom: -5vh; /* Overlap effect */
  z-index: 5;
}

.hero-card {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  max-width: 1000px;
  width: 95%;
  margin-bottom: 2rem;
}

.hero h2 {
  color: var(--white);
  font-size: clamp(2.5rem, 12vw, 5.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero p {
  color: var(--white);
  font-size: clamp(1rem, 4vw, 1.5rem);
  opacity: 0.9;
  margin-bottom: 3rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: url("https://www.transparenttextures.com/patterns/cubes.png");
  opacity: 0.1;
  pointer-events: none;
}

.hero h2 {
  color: var(--white);
  font-size: 4rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero h2::after { display: none; }

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  opacity: 0.95;
}

.cta-btn {
  background: var(--white);
  color: var(--primary);
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  transition: var(--transition);
}

.cta-btn:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  background: var(--secondary);
  color: var(--white);
}

/* --- SCROLL DOWN MOUSE --- */
.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.8;
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--white);
  border-radius: 12px;
  position: relative;
}

.mouse::after {
  content: '';
  width: 4px;
  height: 8px;
  background: var(--white);
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: scrollMouse 1.5s infinite;
}

@keyframes scrollMouse {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* --- SECTIONS --- */
.section {
  padding: 120px 8%;
  text-align: center;
}

/* --- SERVICES ROW --- */
.services-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.service-item {
  padding: 2rem;
  transition: var(--transition);
}

.service-item i {
  font-size: 2.5rem;
  color: var(--primary);
  background: var(--accent);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  transition: var(--transition);
}

.service-item:hover i {
  transform: scale(1.1) rotate(5deg);
  background: var(--secondary);
  color: var(--white);
}

.service-item h4 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

.service-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --- CARDS --- */
.horario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.horario-card {
  background: var(--bg-card);
  padding: 3rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid rgba(131, 199, 132, 0.2);
}

.horario-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(10, 77, 60, 0.12);
}

.horario-card h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.horario-card p {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

/* --- OBRAS SOCIALES (PREMIUM CLEAN) --- */
.obras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
  padding: 0 10px;
}

.obra-card {
  background: var(--white);
  height: 140px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.obra-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(10, 77, 60, 0.08);
}

.obra-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: none;
  opacity: 1;
  /* Aggressive crop for dirty original JPGs */
  clip-path: inset(4%); 
  transform: scale(1.08); /* Re-scale slightly to fill the space after crop */
}

/* --- MAP & CONTACT --- */
.mapa {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  filter: grayscale(0.2) contrast(1.1) hue-rotate(90deg); /* Subtle Emerald Filter */
  transition: var(--transition);
}

.mapa:hover {
  filter: none;
}

.contact-card {
  background: var(--white);
  padding: 4rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 600px;
  margin: 0 auto;
}

.contact-card a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.25rem;
}

/* --- CAMPAIGN SPOTLIGHT --- */
.campaign-container {
  display: flex;
  align-items: center;
  gap: 4rem;
  text-align: left;
  max-width: 1100px;
  margin: 0 auto;
}

.campaign-text { flex: 1.2; }
.campaign-image { flex: 1; text-align: right; }

.campaign-image img {
  width: 100%;
  max-width: 450px;
  border-radius: 30px;
  box-shadow: 0 40px 80px rgba(10, 77, 60, 0.2);
  border: 8px solid rgba(255, 255, 255, 0.5); /* Glassy frame */
  transition: var(--transition);
  animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
}

.campaign-text .cta-btn.secondary {
  background: var(--primary);
  color: var(--white);
  margin-top: 2rem;
}

/* --- FOOTER --- */
footer {
  background: var(--primary);
  color: var(--white);
  padding: 60px 5%;
  text-align: center;
}

@media (max-width: 768px) {
  .campaign-container {
    flex-direction: column-reverse; /* Put text first on mobile */
    text-align: center;
    gap: 3rem;
  }
  .campaign-image { text-align: center; }
  .campaign-image img {
    max-width: 320px;
    transform: none;
  }
}

/* --- SOCIAL BUTTONS --- */
.social-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 3000; /* Always on top */
}

.social-float a {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  font-size: 45px; /* Maximum icon zoom as requested */
  transition: var(--transition);
}

.social-float a:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 20px 45px rgba(10, 77, 60, 0.4);
}

.whatsapp { background: #25D366; }
.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); }

/* --- RESPONSIVE & MOBILE REFINEMENTS --- */
@media (max-width: 992px) {
  :root {
    --section-padding: 80px 5%;
  }
  .hero h2 { font-size: clamp(2.5rem, 8vw, 3.5rem); }
  .header { padding: 12px 5%; }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 100px 6%;
  }
  
  .header {
    justify-content: space-between;
    padding: 30px 6%;
    min-height: 160px; /* Stronger header for prominent logo */
  }
  
  .header.scrolled {
    min-height: 55px; /* Thinner mobile scrolled header */
    padding: 5px 6%;
  }
  
  .header.scrolled .logo {
    transform: scale(1.4); /* Reduced but still clear scale for thinner header */
  }

  .logo { 
    max-width: 180px; 
    max-height: 70px;
    transform: scale(2.2); /* TRULY MASSIVE SCALE when at top */
    transform-origin: left center;
    margin-left: 10px;
  }
  
  .menu-toggle { 
    display: block; 
    font-size: 1.4rem; 
    color: var(--white);
    background: rgba(0,0,0,0.1); /* Subtle circle for the menu */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header.scrolled .menu-toggle {
    color: var(--primary);
  }

  .menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transition: 0.4s cubic-bezier(0.85, 0, 0.15, 1); 
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1050;
  }

  .menu.active {
    right: 0;
  }

  .menu-btn {
    font-size: 1.4rem;
    width: 100%;
    text-align: center;
    padding: 15px;
  }

  .section { 
    padding: 160px 8% 120px;
    max-width: 100vw;
    position: relative;
    margin-top: -100px; /* Deep overlap flow */
    box-shadow: 0 -20px 50px rgba(0,0,0,0.03); /* Subtle Layered Shadow */
  }

  #quienes {
    background: #fdfaf5; /* Sand/Cream tint */
    z-index: 5;
    clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
  }

  .green {
    background-color: #ebf5f1; /* Sage tint */
    z-index: 4;
    clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
    padding: 180px 8%;
  }

  #horario {
    z-index: 4;
  }

  #obras {
    background: var(--white);
    z-index: 5;
    clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
    box-shadow: 0 -15px 40px rgba(0,0,0,0.05); /* Elevation for Logos Section */
  }
  
  #ubicacion {
    background: #f2f7f5; /* Light Emerald Gray tint */
    z-index: 4;
    clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%);
    padding-bottom: 80px;
  }
  
  .social-float a {
    width: 60px;
    height: 60px;
    font-size: 38px; /* Ultra-Zoom icons for mobile accessibility */
    bottom: 25px;
    right: 25px;
  }
}

@media (max-width: 480px) {
  .logo { max-width: 270px; }
  .hero h2 { font-size: 2.2rem; }
}

/* --- ANIMATIONS --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-reveal].active {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


