/* ==================================================
   DEEPLOOX S.L. - Combined Style Sheet
   Includes: variables, reset, global, header, hero,
   servicios, proyectos, empresa, contacto, footer,
   responsive, animations & modals
   ================================================== */

/* ─── VARIABLES ─────────────────────────────────── */
:root {
  --blue: #1352a2;
  --blue-light: #2a6dd9;
  --blue-dark: #0d3a72;
  --white: #ffffff;
  --black: #111111;
  --gray: #f4f5f7;
  --gray-mid: #8a8f9a;
  --footer-bg: #1c1f26;
  --font-head: "Barlow Condensed", sans-serif;
  --font-body: "Barlow", sans-serif;
  --transition: 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  --radius: 6px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ─── RESET & BASE ─────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ─── GLOBAL UTILITIES ─────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 100px 0;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--black);
  line-height: 1.1;
}

.section-title span {
  color: var(--blue);
}

.rule {
  display: block;
  width: 64px;
  height: 3px;
  background: var(--blue);
  margin: 16px 0 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid var(--blue);
  transition: all var(--transition);
  cursor: pointer;
}

.btn:hover {
  background: transparent;
  color: var(--blue);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
}

.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}

.btn-white:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

/* ─── HEADER ───────────────────────────────────── */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.logo-mark span {
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--black);
  text-transform: uppercase;
  line-height: 1.2;
}

.logo-text em {
  display: block;
  font-style: normal;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--blue);
}
.footer-logo-img {
    height: 50px;
    width: auto;
    margin-bottom: 12px;
}

/* Ajuste responsive */
@media (max-width: 768px) {
    .logo-img {
        height: 35px;
    }
    .footer-logo-img {
        height: 40px;
    }
}
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 14px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid rgba(19, 82, 162, 0.24);
  border-radius: var(--radius);
  color: var(--blue);
  background: var(--white);
  flex: 0 0 auto;
}

.language-switcher i {
  font-size: 0.9rem;
}

.language-select {
  width: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--black);
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: color var(--transition);
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--blue);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 40px 32px;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav a {
  display: block;
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.mobile-language {
  display: none;
}

/* ─── HERO SECTION ─────────────────────────────── */
#hero {
  margin-top: 30px;
  min-height: calc(100vh - 80px);
  background: linear-gradient(
    135deg,
    var(--blue-dark) 0%,
    var(--blue) 50%,
    var(--blue-light) 100%
  );
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  right: -100px;
  top: -100px;
  width: 500px;
  height: 500px;
  border: 80px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  z-index: 1;
}

#hero::after {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -80px;
  width: 400px;
  height: 400px;
  border: 60px solid rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 40px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 4vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}

.hero-title .accent {
  color: rgba(255, 255, 255, 0.3);
}

.hero-subtitle {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  max-width: 520px;
  margin-bottom: 30px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
}

.stats-container {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.stat-item {
  flex: 1;
  padding: 28px 20px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 6px;
}

/* ─── SERVICIOS (HOME) ─────────────────────────── */
#servicios-home {
  background: var(--gray);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 24px 32px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid transparent;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--blue);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  color: var(--white);
  transition: transform 0.2s;
}

.service-card:hover .service-icon {
  transform: scale(1.05);
}

.service-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
}

.services-footer {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.services-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 32px;
}

/* ─── PROYECTOS (HOME & FULL) ──────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 48px;
}

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.project-img {
  height: 240px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
  position: relative;
  overflow: hidden;
}

.project-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-img .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.project-body {
  padding: 24px;
}

.project-body h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.project-location {
  font-size: 0.8rem;
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-location i {
  color: var(--blue);
}

/* Proyectos page full grid */
.proyectos-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 48px;
}

.proyectos-intro {
  max-width: 600px;
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
}

.proyectos-grid-full {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.proy-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
}

.proy-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.proy-img {
  height: 180px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
  position: relative;
  overflow: hidden;
}

.proy-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.proy-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 20px;
}

.proy-body {
  padding: 16px;
}

.proy-body h5 {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.proy-meta {
  display: flex;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--gray-mid);
}

.proy-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Carpintería section */
.carpinteria-section {
  margin-top: 70px;
  padding-top: 50px;
  border-top: 2px solid #eef2f6;
}

.carpinteria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.carp-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
}

.carp-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.carp-img {
  height: 200px;
  background: linear-gradient(135deg, #1c2a3a, var(--blue-dark));
  position: relative;
  overflow: hidden;
}

.carp-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carp-body {
  padding: 20px;
}

.carp-body h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ─── EMPRESA (Tabs & Servicios) ───────────────── */
#empresa {
  background: var(--white);
}

.empresa-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8eaed;
  margin-bottom: 48px;
}

.tab-btn {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  background: none;
  cursor: pointer;
  color: var(--gray-mid);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.historia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.historia-img {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(255, 255, 255, 0.2);
}

.historia-text p {
  font-size: 1rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 24px;
}

.stats-row {
  display: flex;
  gap: 24px;
  margin-top: 36px;
}

.stat-box {
  flex: 1;
  text-align: center;
  padding: 20px;
  border: 2px solid rgba(19, 82, 162, 0.2);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.stat-box:hover {
  border-color: var(--blue);
  background: rgba(19, 82, 162, 0.02);
}

.stat-box .n {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue);
}

.servicios-grid-empresa {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.serv-card {
  border: 1px solid #eef2f6;
  border-radius: var(--radius);
  padding: 30px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.serv-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.serv-card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 18px;
}

.serv-card h4 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.serv-card ul li {
  font-size: 0.85rem;
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.serv-card ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--blue);
}

.serv-card ul {
  margin-bottom: 20px;
}

.serv-more-btn {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 20px;
  font-size: 0.78rem;
}

/* ─── CONTACTO ─────────────────────────────────── */
#comunicaciones {
  background: linear-gradient(to bottom, var(--white), var(--gray));
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-intro {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 40px;
  color: #555;
}

.contact-item {
  display: flex;
  gap: 18px;
  margin-bottom: 28px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--white);
  flex-shrink: 0;
}

.contact-info h5 {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 6px;
}

.contact-info p,
.contact-info a {
  font-size: 0.95rem;
  color: var(--black);
  transition: color var(--transition);
}

.contact-info a:hover {
  color: var(--blue);
}

.social-row {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 40px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.social-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.social-btn.fb {
  background: #1877f2;
  color: var(--white);
}

.social-btn.wa {
  background: #25d366;
  color: var(--white);
}

.map-placeholder {
  width: 100%;
  height: 380px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
}

.map-placeholder i {
  font-size: 3rem;
  color: var(--blue);
  opacity: 0.6;
}

/* ─── FOOTER ───────────────────────────────────── */
#footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .logo-mark {
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--white);
  text-transform: uppercase;
}

.footer-brand-tagline {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5b9bd4;
  margin-top: 4px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  max-width: 280px;
}

.footer-col h5 {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--white);
}

.footer-contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.footer-contact-item i {
  color: #5b9bd4;
  margin-top: 3px;
}

.footer-bottom {
  text-align: center;
  padding: 24px 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ─── RESPONSIVE STYLES ────────────────────────── */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .proyectos-grid-full {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .carpinteria-grid,
  .servicios-grid-empresa {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .logo-text {
    display: none;
  }
  .nav {
    display: none;
  }
  .header-actions {
    gap: 0;
  }
  .header-actions .language-switcher {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .mobile-nav {
    display: block;
    overflow-y: auto;
  }
  .mobile-language {
    display: block;
    padding-top: 28px;
  }
  .mobile-language .language-switcher {
    width: 100%;
    min-height: 52px;
    justify-content: space-between;
    padding: 0 14px;
    border-color: rgba(19, 82, 162, 0.28);
  }
  .mobile-language .language-switcher span {
    flex: 1 1 auto;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--black);
  }
  .mobile-language .language-select {
    width: 48px;
    font-size: 0.82rem;
  }

  .section {
    padding: 70px 0;
  }

  .hero-stats .stats-container {
    flex-wrap: wrap;
  }
  .stat-item {
    flex: 0 0 50%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .stat-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
  .historia-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .proyectos-grid-full {
    grid-template-columns: repeat(2, 1fr);
  }
  .empresa-tabs {
    overflow-x: auto;
  }
  .stats-row {
    flex-wrap: wrap;
  }
  .stat-box {
    min-width: calc(50% - 12px);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }
  .language-switcher {
    gap: 6px;
  }
  .mobile-language .language-select {
    width: 44px;
  }
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
  .proyectos-grid-full,
  .carpinteria-grid,
  .servicios-grid-empresa {
    grid-template-columns: 1fr;
  }
  .hero-btns {
    flex-direction: column;
  }
  .hero-btns .btn {
    text-align: center;
  }
  .stat-box {
    min-width: 100%;
  }
}

/* ─── ANIMATIONS & MICROINTERACTIONS ───────────── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.9, 0.4, 1),
    transform 0.7s cubic-bezier(0.2, 0.9, 0.4, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scroll to top button */
#scrolltop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 46px;
  height: 46px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 500;
  box-shadow: var(--shadow-md);
}

#scrolltop.show {
  opacity: 1;
  visibility: visible;
}

#scrolltop:hover {
  background: var(--blue-dark);
  transform: translateY(-3px);
}

/* Cookies banner */
#cookies-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(28, 31, 38, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.85);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  z-index: 8000;
  font-size: 0.85rem;
}

#cookies-banner.hidden {
  display: none;
}

.cookies-btns {
  display: flex;
  gap: 12px;
}

.btn-accept {
  background: var(--blue);
  color: white;
  padding: 8px 24px;
  border-radius: 40px;
}

.btn-reject {
  background: #333;
  color: #ccc;
  padding: 8px 24px;
  border-radius: 40px;
}

/* Gallery Overlay */
.gallery-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.gallery-overlay.open {
  display: flex;
}

.gallery-modal {
  background: var(--white);
  border-radius: 16px;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
}

.gallery-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--gray-mid);
}

.gallery-title {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--black);
}

.gallery-location {
  margin: 12px 0 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray-mid);
}

.gallery-location i {
  color: var(--blue);
}

/* ─── VIDEO CARROUSEL (REPORTES) ───────────────── */
.video-carousel-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.carousel-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    padding: 0 10px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    text-align: center;
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--blue-dark);
}

.carousel-btn {
    background: var(--blue);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.carousel-btn:hover {
    background: var(--blue-dark);
    transform: translateY(-50%) scale(1.05);
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 30px;
}

.dot {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background: var(--blue);
    transform: scale(1.2);
}

.reportes-paragraph {
    text-align: center;
    font-size: 1rem;
    color: #555;
    max-width: 700px;
    margin: 20px auto 0;
    line-height: 1.6;
}

/* Fallback para imágenes no encontradas */
.image-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    color: #bbb;
    font-size: 0.8rem;
}
.image-fallback i {
    font-size: 2rem;
    margin-bottom: 8px;
}
.gallery-main img,
.gallery-evolution img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-main {
    min-height: 300px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-btn {
      width: 36px;
      height: 36px;
    }
    .prev-btn {
      left: -12px;
    }
    .next-btn {
      right: -12px;
    }
    .video-caption {
      font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .carousel-btn {
      display: none; /* Hide buttons on very small, use swipe? We keep dots */
    }
}

/* ==================================================
   GALERÍA MODAL - CARRUSEL UNIFORME
   ================================================== */

/* Contenedor principal del carrusel */
.gallery-modal .carousel-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    background: #f8f8f8;
    border-radius: 12px;
    padding: 12px;
}

/* Botones de navegación */
.gallery-modal .carousel-prev,
.gallery-modal .carousel-next {
    background: var(--blue);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal .carousel-prev:hover,
.gallery-modal .carousel-next:hover {
    background: var(--blue-dark);
    transform: scale(1.05);
}

/* Wrapper con scroll horizontal */
.gallery-modal .carousel-track-wrapper {
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    border-radius: 8px;
}

/* Track que contiene las miniaturas */
.gallery-modal .carousel-track {
    display: flex;
    gap: 12px;
    padding: 8px 4px;
    width: max-content;
    min-width: 100%;
    margin: 0 auto;
    justify-content: center;
}

/* Cada miniatura */
.gallery-modal .carousel-item {
    flex: 0 0 auto;
    width: 100px;
    height: 80px;
    background: #e9e9e9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border 0.2s;
    border: 2px solid transparent;
}

.gallery-modal .carousel-item:hover {
    transform: scale(1.02);
}

.gallery-modal .carousel-item.active {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(19, 82, 162, 0.3);
}

/* Imagen dentro de la miniatura */
.gallery-modal .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Imagen principal */
#gal-main {
    margin-bottom: 20px;
    border-radius: 12px;
    display: block;
    min-height: 300px;
    height: clamp(300px, 60vh, 620px);
    overflow: hidden;
    background: #f9f9f9;
}

#gal-main .gallery-main {
  width: 100%;
  height: 100%;
}

#gal-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

/* Dots (indicadores) */
.gallery-modal .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.gallery-modal .carousel-dots .dot {
    width: 10px;
    height: 10px;
    background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.gallery-modal .carousel-dots .dot.active {
    background: var(--blue);
    transform: scale(1.2);
}

/* Fallback para imágenes no disponibles */
.image-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #eee;
  color: #999;
  width: 100%;
  height: 100%;
  font-size: 0.8rem;
}

.gallery-empty-state {
  min-height: 300px;
  gap: 10px;
  text-align: center;
}

.gallery-empty-state span,
.gallery-empty-message {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Responsive para el carrusel */
@media (max-width: 768px) {
    .gallery-modal .carousel-item {
        width: 80px;
        height: 60px;
    }
    .gallery-modal .carousel-prev,
    .gallery-modal .carousel-next {
        width: 30px;
        height: 30px;
        font-size: 1rem;
  }
  #gal-main {
    height: 45vh;
    min-height: 260px;
  }
}

@media (max-width: 480px) {
    .gallery-modal .carousel-item {
        width: 70px;
        height: 55px;
    }
}
