/* ==========================================================================
   Constructora Braylhesm SRL - Main Style Sheet
   Premium Architecture, Engineering & Construction Theme
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* --- Design Tokens / CSS Variables --- */
:root {
  /* Color Palette */
  --primary: #0F4C81;           /* Corporate Blue */
  --primary-hover: #175d9c;
  --primary-light: rgba(15, 76, 129, 0.08);
  --accent: #84CC16;            /* Lime Green */
  --accent-hover: #65a30d;
  --accent-light: rgba(132, 204, 22, 0.15);
  
  --dark: #0F172A;              /* Slate Black / Main Text */
  --dark-light: #1E293B;
  --muted: #64748B;             /* Slate Grey */
  --border: #E2E8F0;            /* Metallic Grey Borders */
  
  --bg-white: #FFFFFF;          /* Pure White Background */
  --bg-metallic: #F8FAFC;       /* Off-White Secondary Background */
  --bg-card: #FFFFFF;
  
  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.07), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --shadow-premium: 0 30px 60px -15px rgba(15, 76, 129, 0.08), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-white);
  color: var(--dark);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark);
  font-weight: 700;
  line-height: 1.25;
}

p {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 300;
}

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

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

/* --- Layout & Structure --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 6rem 0;
}

.section-alt {
  background-color: var(--bg-metallic);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 4rem auto;
}

.section-subtitle {
  font-family: var(--font-heading);
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 0.75rem;
  position: relative;
}

.section-subtitle::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--accent);
  margin: 6px auto 0 auto;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-top: 0.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  background-color: var(--bg-metallic);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--dark);
  border-color: var(--accent);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(132, 204, 22, 0.4);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
}

/* --- Header / Navigation --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-normal);
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 48px;
  width: auto;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: var(--primary);
  line-height: 1.1;
}

.logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 2px;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dark-light);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-normal);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--primary);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-color: var(--dark);
  color: var(--bg-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: grayscale(20%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.85) 0%, rgba(15, 23, 42, 0.9) 100%);
  z-index: 2;
}

.hero-container {
  position: relative;
  z-index: 3;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.hero-content {
  max-width: 800px;
}

.hero-tagline {
  font-family: var(--font-heading);
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.95rem;
  display: inline-block;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}

.hero h1 {
  color: var(--bg-white);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-buttons .btn-secondary {
  color: var(--bg-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-buttons .btn-secondary:hover {
  background-color: var(--bg-white);
  color: var(--primary);
  border-color: var(--bg-white);
}

/* --- About Us Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-img-container {
  position: relative;
}

.about-img {
  width: 100%;
  border-radius: 4px;
  box-shadow: var(--shadow-xl);
  z-index: 2;
  position: relative;
}

.about-img-deco {
  position: absolute;
  width: 70%;
  height: 70%;
  border: 10px solid var(--primary-light);
  top: -20px;
  left: -20px;
  z-index: 1;
  pointer-events: none;
}

.about-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.about-history {
  margin-bottom: 2rem;
  line-height: 1.7;
}

.about-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.pillar-card {
  background: var(--bg-metallic);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 4px;
  transition: all var(--transition-normal);
}

.pillar-card:hover {
  background: var(--bg-white);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pillar-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pillar-title i {
  color: var(--accent);
  font-size: 1.2rem;
}

.pillar-desc {
  font-size: 0.85rem;
}

/* --- Statistics Dashboard --- */
.stats-banner {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 4rem 0;
  border-bottom: 4px solid var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 0;
  width: 1px;
  height: 60%;
  background-color: rgba(255, 255, 255, 0.15);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3rem 2.25rem;
  border-radius: 4px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(15, 76, 129, 0.2);
  box-shadow: var(--shadow-premium);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  line-height: 1;
  transition: transform var(--transition-normal);
}

.service-icon-img {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-desc {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Projects Portfolio --- */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
}

.portfolio-header .section-header {
  text-align: left;
  margin: 0;
  max-width: 600px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(15, 76, 129, 0.2);
}

.project-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 66.6%; /* 3:2 Aspect Ratio */
  overflow: hidden;
  background-color: var(--dark);
}

.project-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 0.35rem 0.85rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 20px;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.project-badge.status-process {
  background-color: var(--accent);
  color: var(--dark);
}

.project-content {
  padding: 1.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-category {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.project-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-excerpt {
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.6;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: auto;
}

.project-meta-item {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-link {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-link:hover {
  color: var(--accent-hover);
}

/* Filters UI */
.filters-container {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: var(--bg-metallic);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.5rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--bg-white);
  box-shadow: var(--shadow-md);
}

/* --- Project Detail View --- */
.project-detail-layout {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 3.5rem;
}

/* Image gallery custom slider */
.gallery-showcase {
  margin-bottom: 2rem;
}

.main-image-viewport {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--dark);
  box-shadow: var(--shadow-lg);
}

.main-image-viewport img, .main-image-viewport video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnails-strip {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.thumbnail-item {
  width: 80px;
  height: 55px;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-item:hover, .thumbnail-item.active {
  opacity: 1;
  border-color: var(--primary);
}

.project-specs {
  background-color: var(--bg-metallic);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2.25rem;
  position: sticky;
  top: 100px;
}

.specs-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
}

.spec-value {
  font-weight: 500;
  font-size: 0.9rem;
  text-align: right;
}

.detail-desc {
  margin-top: 2rem;
}

.detail-desc h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.detail-desc p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.gallery-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.gallery-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.gallery-media-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 ratio */
  overflow: hidden;
  background-color: var(--dark);
}

.gallery-media-wrapper img, .gallery-media-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-info {
  padding: 1rem;
}

.gallery-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-category {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gallery-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(15, 76, 129, 0.85);
  color: var(--bg-white);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 2;
  box-shadow: var(--shadow-md);
  transition: background var(--transition-fast);
}

.gallery-card:hover .gallery-play-icon {
  background-color: var(--accent);
  color: var(--dark);
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 80vh;
}

.lightbox-media {
  max-width: 100%;
  max-height: 80vh;
  box-shadow: var(--shadow-xl);
  border-radius: 4px;
}

.lightbox-caption {
  color: var(--bg-white);
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: var(--bg-white);
  font-size: 2rem;
  cursor: pointer;
  background: transparent;
  border: none;
}

.lightbox-close:hover {
  color: var(--accent);
}

/* --- Testimonials Section --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonial-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.testimonial-quote {
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--dark-light);
  margin-bottom: 2rem;
  position: relative;
  flex-grow: 1;
}

.testimonial-quote::before {
  content: '“';
  font-size: 4rem;
  font-family: var(--font-heading);
  color: var(--primary-light);
  position: absolute;
  top: -1.5rem;
  left: -0.75rem;
  line-height: 1;
  z-index: 1;
}

.testimonial-quote p {
  position: relative;
  z-index: 2;
  color: var(--dark-light);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-initial {
  background-color: var(--primary-light);
  color: var(--primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  border: 1px solid var(--border);
}

.author-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.author-company {
  font-size: 0.75rem;
  color: var(--muted);
}

.testimonial-rating {
  display: flex;
  gap: 2px;
  color: #fbbf24; /* Amber star color */
  margin-bottom: 0.75rem;
}

/* --- Contact Section --- */
.contact-layout {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-card {
  display: flex;
  gap: 1.25rem;
}

.contact-icon-wrapper {
  background-color: var(--primary-light);
  color: var(--primary);
  width: 48px;
  height: 48px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.contact-card-content h4 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.contact-card-content p {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Form Styles */
.contact-form {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3rem;
  border-radius: 4px;
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group-full {
  grid-column: span 2;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg-metallic);
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 140px;
}

/* Honeypot hidden input */
.hp-field {
  display: none !important;
}

/* Form responses */
.form-feedback {
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.form-feedback.error {
  display: block;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* --- Floating WhatsApp Button --- */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25d366;
  color: var(--bg-white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 99;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.whatsapp-float:hover {
  background-color: #20ba5a;
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.whatsapp-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #25d366;
  opacity: 0.4;
  z-index: -1;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* --- Footer --- */
footer {
  background-color: var(--dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 5rem 0 2rem 0;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 4fr 2fr 2fr 4fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.footer-logo-img {
  height: 48px;
  width: auto;
}

.footer-logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
  color: var(--bg-white);
}

.footer-logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bg-white);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 6px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent);
}

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

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-contact-item {
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1rem;
}

.footer-contact-item i {
  color: var(--accent);
  margin-top: 3px;
  font-size: 1rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-btn {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--bg-white);
  width: 38px;
  height: 38px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
  background-color: var(--accent);
  color: var(--dark);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom span {
  color: var(--bg-white);
}

/* --- Media Queries --- */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-detail-layout {
    grid-template-columns: 1fr;
  }
  .project-specs {
    position: static;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .about-grid, .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .stat-item:nth-child(2)::after {
    display: none;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group-full {
    grid-column: span 1;
  }
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  /* Mobile Header Layout Fix */
  .header-container {
    gap: 8px;
  }

  .logo-link {
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }

  .logo-img {
    height: 38px;
    flex-shrink: 0;
  }

  .logo-text {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo-text span {
    font-size: 0.65rem;
  }

  /* Mobile Navigation */
  .menu-toggle {
    display: flex;
    flex-shrink: 0;
  }

  .btn-cotizar {
    padding: 0.3rem 0.65rem !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto !important;
    border-width: 1px !important;
  }
  
  nav {
    position: absolute;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--bg-white);
    flex-direction: column;
    padding: 3rem 1.5rem;
    gap: 2rem;
    transition: left var(--transition-normal);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    z-index: 99;
  }
  
  nav.active {
    left: 0;
  }
  
  .nav-link {
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
  }
  
  .portfolio-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .services-grid, .projects-grid, .gallery-grid, .testimonials-grid, .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-item::after {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Smooth Animations & Transitions (Premium Styling Additions)
   ========================================================================== */

/* Keyframe definitions */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Staggered Hero elements load */
.hero-tagline {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero h1 {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero-desc {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero-buttons {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

/* Scroll-Reveal structure */
/* Fallback: if JS doesn't fire, CSS animation reveals content after 1.5s */
@keyframes revealFallback {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
  animation: revealFallback 0.8s ease-out 0.3s forwards;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  animation: none; /* JS took over, cancel the fallback */
}

