/* DESIGN SYSTEM & VARIABLES */
:root {
  --font-sans: 'Inter', sans-serif;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-light: #f4f4f4;
  --color-dark: #222222;
  --color-text: #555555;
  
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  font-family: var(--font-sans);
  color: var(--color-black);
  background: var(--color-white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
a:hover { text-decoration: underline; text-underline-offset: 4px; opacity: 0.8; }

/* Backgrounds */
.bg-light { background-color: var(--color-light); }
.bg-white { background-color: var(--color-white); }
.bg-dark { background-color: var(--color-dark); color: var(--color-white); }
.text-white { color: var(--color-white); }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-sans); font-weight: 400; line-height: 1.2; letter-spacing: -0.5px; }
.heading-large { font-size: clamp(2rem, 3.5vw, 3rem); margin-bottom: var(--spacing-md); font-weight: 300; letter-spacing: -1px; }
.text-body { font-size: 1.1rem; color: var(--color-text); margin-bottom: var(--spacing-md); max-width: 600px; font-weight: 300; }
.bg-dark .text-body { color: #cccccc; }

/* Layout */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.section-padding { padding: var(--spacing-xl) 0; }
.padding-xl { padding: var(--spacing-lg); }
.grid-50 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); align-items: center; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--spacing-md); }

/* Buttons */
.btn-group { display: flex; flex-wrap: wrap; gap: 2rem; }
.btn-group-vertical { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.btn-outline, .btn-solid, .btn-solid-dark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0; border: none; border-radius: 0; background: transparent;
  font-size: 0.9rem; text-transform: uppercase; font-weight: 400;
  letter-spacing: 1px; transition: all 0.3s; cursor: pointer;
  border-bottom: 1px solid currentColor;
}
.btn-outline { color: var(--color-black); }
.btn-outline:hover { opacity: 0.6; text-decoration: none; }
.btn-outline:active { transform: scale(0.97); }
.btn-solid { color: var(--color-white); }
.btn-solid:hover { opacity: 0.6; text-decoration: none; }
.btn-solid:active { transform: scale(0.97); }
.btn-solid-dark { color: var(--color-black); }
.btn-solid-dark:hover { opacity: 0.6; text-decoration: none; }
.btn-solid-dark:active { transform: scale(0.97); }

/* PREMIUM ANIMATIONS */
.reveal-item { 
  opacity: 0; 
  transform: translateY(40px); 
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1); 
  will-change: opacity, transform;
}
.reveal-item.reveal-active { 
  opacity: 1; 
  transform: translateY(0); 
}

/* Smooth hover on cards */
.img-hover-zoom { overflow: hidden; border-radius: 4px; }
.img-hover-zoom img { transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1); filter: brightness(0.95); }
.img-hover-zoom:hover img { transform: scale(1.08); filter: brightness(1.05); }

  /* RESPONSIVENESS */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .grid-50, .grid-4 { grid-template-columns: 1fr; gap: 2rem; }
  
  /* Mobile Reordering */
  .reverse-mobile { display: flex; flex-direction: column-reverse; gap: 2rem; }

  .section-padding { padding: 4rem 0; }
  .padding-xl { padding: 2rem; }
  .container { padding: 0 1.5rem; }
  
  /* Layout specific overrides */
  .obras-grid { grid-template-columns: 1fr !important; }
  .obras-text { position: relative !important; top: 0 !important; margin-bottom: 2rem; }
  
  /* Elements with inline widths */
  .mobile-full-width { width: 100% !important; max-width: 100% !important; }
  
  /* Fix Grid/Flex Slider Blowout */
  .obras-slider-container, .splide { min-width: 0 !important; max-width: 100vw; }
  .obras-text { padding-right: 0 !important; width: 100% !important; }

  /* Navbar Mobile Layout Fix */
  .nav-container { display: flex !important; justify-content: space-between !important; width: 100%; }
  .nav-center { display: none !important; }

  /* Hero Mobile */
  .hero-slider .splide__track { height: 85vh !important; }
  .hero-slider .splide__slide { height: 85vh !important; align-items: flex-start !important; padding-top: 15vh !important; }
  .slide-content { margin-left: 5% !important; margin-top: 0 !important; text-align: left !important; width: 75% !important; }
  .slide-content h2 { font-size: 1.8rem !important; margin-bottom: 0.8rem !important; line-height: 1.1 !important; font-weight: 400 !important; }
  .slide-content p { font-size: 0.9rem !important; margin-bottom: 1.5rem !important; line-height: 1.4 !important; max-width: 100% !important; }
  .slide-content .btn-link { font-size: 0.8rem !important; }
  
  /* Obras & Blog Mobile Images 1:1 aspect-ratio */
  .obra-card img,
  .card-news img {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
  }

  /* Footer */
  footer .container > div { flex-direction: column !important; align-items: flex-start !important; gap: 2rem !important; }
  footer .container > div > div { text-align: left !important; }
  
  /* Text alignments and sizes on mobile */
  .heading-large { font-size: clamp(2.2rem, 8vw, 2.5rem) !important; margin-bottom: 1.5rem !important; line-height: 1.1 !important; }
  h3 { font-size: 1.6rem !important; line-height: 1.2 !important; margin-bottom: 1rem !important; }
  h4 { font-size: 1.3rem !important; line-height: 1.3 !important; }
  .text-body { font-size: 1rem !important; line-height: 1.6 !important; }
  
  /* Drawers / Popups Mobile */
  .drawer-content { width: 100% !important; padding: 3rem 1.5rem 2rem 1.5rem !important; }
  .modal-content { width: 100% !important; padding: 3rem 1.5rem 2rem 1.5rem !important; max-height: 90vh !important; overflow-y: auto !important; margin-top: 5vh !important; }
  .modal-close { top: 1rem !important; right: 1rem !important; font-size: 1.5rem !important; z-index: 10; }

  /* Navbar Mobile */
  .mobile-menu-btn { display: block !important; }
  .desktop-only { display: none !important; }
}

body { overflow-x: hidden; width: 100%; position: relative; }
