/* Green & Blue Industries — styles.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --green: #1D9E75; --green-light: #E1F5EE; --green-dark: #0F6E56;
  --blue: #378ADD; --blue-light: #E6F1FB; --blue-dark: #185FA5;
  --amber: #F59E0B; --amber-light: #FFF7E6;
  --dark: #12100E; --gray: #6B6B6B; --gray-light: #F5F5F3;
  --border: rgba(0,0,0,0.08); --white: #FFFFFF;
}
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; color: var(--dark); background: var(--white); line-height: 1.6; overflow-x: hidden; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(255,255,255,0.93); backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  gap: 1rem;
}
.logo { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--dark); white-space: nowrap; }
.logo-mark { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, var(--green), var(--blue)); flex-shrink: 0; }
.nav-center { display: flex; gap: 0.25rem; list-style: none; }
.nav-center a { text-decoration: none; color: var(--gray); font-size: 0.85rem; padding: 0.4rem 0.85rem; border-radius: 6px; transition: all 0.2s; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-center a:hover { background: var(--gray-light); color: var(--dark); }
.dot-nav { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-web { background: var(--green); }
.dot-media { background: var(--blue); }
.dot-security { background: var(--amber); }
.nav-right { display: flex; align-items: center; gap: 1.25rem; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--gray); font-size: 0.85rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--dark); }
.nav-cta { background: var(--dark); color: var(--white); padding: 0.45rem 1.1rem; border-radius: 6px; font-size: 0.85rem; text-decoration: none; white-space: nowrap; font-family: 'DM Sans', sans-serif; }

/* HERO */
#hero {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 100vh; align-items: center;
  padding: 7rem 2.5rem 4rem; gap: 4rem;
  background: var(--white); position: relative;
  overflow: hidden;
  max-width: 100vw;
}
.hero-bg { position: absolute; top: -100px; right: -100px; width: 550px; height: 550px; border-radius: 50%; background: radial-gradient(circle, rgba(29,158,117,0.05) 0%, rgba(55,138,221,0.05) 50%, transparent 70%); pointer-events: none; }
.hero-left { position: relative; z-index: 1; animation: fadeUp 0.7s ease both; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--green-light); color: var(--green-dark); padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; margin-bottom: 1.4rem; }
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
h1 { font-family: 'Sora', sans-serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; line-height: 1.15; margin-bottom: 1.1rem; color: var(--dark); }
h1 span { color: var(--green); }
.hero-sub { font-size: 1rem; color: var(--gray); max-width: 440px; margin-bottom: 2rem; font-weight: 300; line-height: 1.7; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn-primary { background: var(--green); color: var(--white); border: none; padding: 0.7rem 1.5rem; border-radius: 8px; font-size: 0.9rem; font-family: 'DM Sans', sans-serif; font-weight: 500; cursor: pointer; text-decoration: none; transition: background 0.2s; display: inline-block; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: transparent; color: var(--dark); border: 1px solid var(--border); padding: 0.7rem 1.5rem; border-radius: 8px; font-size: 0.9rem; font-family: 'DM Sans', sans-serif; font-weight: 500; text-decoration: none; transition: border-color 0.2s; display: inline-block; }
.btn-outline:hover { border-color: var(--dark); }
.hero-stats { display: flex; gap: 2rem; padding-top: 1.75rem; border-top: 0.5px solid var(--border); }
.stat-num { font-family: 'Sora', sans-serif; font-size: 1.4rem; font-weight: 600; color: var(--dark); }
.stat-label { font-size: 0.75rem; color: var(--gray); margin-top: 2px; }

/* CAROUSEL */
.hero-right { position: relative; z-index: 1; animation: fadeUp 0.7s 0.2s ease both; }
.carousel-wrap { border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 4/3; background: var(--gray-light); }
.carousel-track { display: flex; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); height: 100%; }
.carousel-slide { min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0; position: relative; }
.slide-green  { background: linear-gradient(135deg, #E1F5EE 0%, #9FE1CB 100%); }
.slide-blue   { background: linear-gradient(135deg, #E6F1FB 0%, #B5D4F4 100%); }
.slide-purple { background: linear-gradient(135deg, #EDE9FE 0%, #C4B5FD 100%); }
.slide-amber  { background: linear-gradient(135deg, #FFF7E6 0%, #FDE68A 100%); }
.carousel-badge { position: absolute; top: 1rem; left: 1rem; background: rgba(255,255,255,0.88); backdrop-filter: blur(4px); border-radius: 20px; padding: 4px 12px; font-size: 0.72rem; font-weight: 500; color: var(--dark); border: 0.5px solid var(--border); }
.slide-icon { font-size: 3.5rem; margin-bottom: 0.75rem; }
.slide-label { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 1rem; color: var(--dark); text-align: center; padding: 0 1.5rem; }
.slide-sub { font-size: 0.8rem; color: var(--gray); text-align: center; padding: 0.3rem 2rem 0; line-height: 1.5; }
.carousel-arrows { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; padding: 0 0.75rem; pointer-events: none; }
.c-arrow { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.9); border: 0.5px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; pointer-events: all; font-size: 0.9rem; color: var(--dark); transition: background 0.2s; }
.c-arrow:hover { background: var(--white); }
.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 1rem; }
.cdot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background 0.2s, transform 0.2s; border: none; padding: 0; }
.cdot.active { background: var(--green); transform: scale(1.3); }

/* SECTIONS */
section:not(#hero) { padding: 5rem 2.5rem; }
#servicios, #nosotros { background: var(--gray-light); }
.section-label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-bottom: 0.75rem; }
.section-title { font-family: 'Sora', sans-serif; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; color: var(--dark); margin-bottom: 0.75rem; }
.section-sub { font-size: 1rem; color: var(--gray); max-width: 520px; font-weight: 300; }
.container { max-width: 1100px; margin: 0 auto; }

/* SERVICES */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.service-card { background: var(--white); border-radius: 12px; padding: 2rem; border: 0.5px solid var(--border); transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
.service-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; font-size: 1.25rem; }
.icon-green { background: var(--green-light); }
.icon-blue  { background: var(--blue-light); }
.icon-amber { background: var(--amber-light); }
.service-title { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 1.05rem; margin-bottom: 0.5rem; }
.service-desc { font-size: 0.9rem; color: var(--gray); line-height: 1.7; margin-bottom: 1rem; flex: 1; }
.tags-wrap { margin-bottom: 1.25rem; }
.service-tag { display: inline-block; background: var(--gray-light); color: var(--gray); font-size: 0.75rem; padding: 3px 10px; border-radius: 20px; margin: 2px; }
.card-link { font-size: 0.85rem; color: var(--green); text-decoration: none; font-weight: 500; margin-top: auto; }
.card-link:hover { text-decoration: underline; }

/* PORTFOLIO */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.portfolio-card { border-radius: 12px; overflow: hidden; border: 0.5px solid var(--border); background: var(--white); transition: transform 0.2s; }
.portfolio-card:hover { transform: translateY(-3px); }
.portfolio-img { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.portfolio-info { padding: 1.25rem; }
.portfolio-cat { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin-bottom: 0.4rem; }
.portfolio-name { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 1rem; margin-bottom: 0.35rem; }
.portfolio-desc { font-size: 0.85rem; color: var(--gray); }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-top: 3rem; }
.about-visual { border-radius: 16px; height: 360px; background: linear-gradient(135deg, var(--green-light) 0%, var(--blue-light) 100%); display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.values-list { list-style: none; margin-top: 1.5rem; }
.values-list li { display: flex; align-items: flex-start; gap: 12px; padding: 0.75rem 0; border-bottom: 0.5px solid var(--border); font-size: 0.9rem; color: var(--gray); }
.values-list li:last-child { border-bottom: none; }
.check { width: 20px; height: 20px; border-radius: 50%; background: var(--green-light); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; margin-top: 1px; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 3rem; align-items: start; }
.contact-info h3 { font-family: 'Sora', sans-serif; font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.contact-item { display: flex; align-items: center; gap: 12px; padding: 0.9rem 1.1rem; background: var(--gray-light); border-radius: 8px; margin-bottom: 0.75rem; font-size: 0.9rem; text-decoration: none; color: var(--dark); transition: background 0.2s; }
.contact-item:hover { background: var(--green-light); }
.contact-icon { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.contact-label { font-weight: 500; }
.contact-sublabel { font-size: 0.8rem; color: var(--gray); }
.contact-form-area { background: var(--white); border: 0.5px solid var(--border); border-radius: 12px; padding: 2rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; margin-bottom: 0.4rem; color: var(--gray); }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.65rem 0.9rem; border: 0.5px solid var(--border); border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: var(--dark); background: var(--gray-light); outline: none; transition: border-color 0.2s, background 0.2s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--green); background: var(--white); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* DIVISION PAGES */
.division-hero { min-height: 60vh; display: flex; align-items: center; padding: 8rem 2.5rem 4rem; }
.division-back { display: inline-flex; align-items: center; gap: 6px; color: var(--gray); text-decoration: none; font-size: 0.85rem; margin-bottom: 2rem; }
.division-back:hover { color: var(--dark); }

/* FOOTER */
footer { background: var(--dark); color: rgba(255,255,255,0.5); padding: 2.5rem; font-size: 0.85rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: 'Sora', sans-serif; font-weight: 600; color: var(--white); font-size: 1rem; }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a { text-decoration: none; color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================
   RESPONSIVE — TABLET Y MÓVIL
   ============================================ */

/* Evitar desborde horizontal en toda la página */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

@media (max-width: 900px) {

  /* NAV */
  nav {
    padding: 0.875rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }
  .nav-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .nav-right {
    gap: 0.75rem;
  }

  /* HERO — columna única, todo centrado, sin desborde */
  #hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 7rem 1.25rem 3rem;
    gap: 2rem;
    text-align: center;
    justify-items: center;
    width: 100%;
    overflow: hidden;
  }
  .hero-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .hero-sub {
    text-align: center;
    max-width: 100%;
  }
  .hero-actions {
    justify-content: center;
    width: 100%;
  }
  .hero-stats {
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
  }

  /* CAROUSEL — pegado al borde, sin salirse */
  .hero-right {
    order: -1;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .carousel-wrap {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
  }
  .carousel-track {
    width: 100%;
  }
  .carousel-slide {
    min-width: 100%;
    max-width: 100%;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
  }
  .slide-icon {
    font-size: 2.5rem;
  }
  .slide-label {
    font-size: 0.95rem;
    padding: 0 1rem;
  }
  .slide-sub {
    font-size: 0.75rem;
    padding: 0.3rem 1rem 0;
  }
  .carousel-dots {
    margin-top: 0.75rem;
  }

  /* SECTIONS */
  section:not(#hero) {
    padding: 3.5rem 1.25rem;
    overflow: hidden;
  }
  .section-title {
    text-align: center;
  }
  .section-sub {
    text-align: center;
    max-width: 100%;
  }
  .section-label {
    text-align: center;
    display: block;
  }
  .container {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  /* GRIDS */
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  /* DIVISION HERO */
  .division-hero {
    padding: 6rem 1.25rem 3rem;
    text-align: center;
    justify-content: center;
    min-height: auto;
  }
  .division-hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .division-hero .hero-actions {
    justify-content: center;
  }

  /* FOOTER */
  footer {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.25rem;
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Pantallas muy pequeñas */
@media (max-width: 420px) {
  h1 {
    font-size: 1.8rem;
  }
  .hero-stats {
    gap: 1rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn-primary,
  .btn-outline {
    width: 100%;
    text-align: center;
  }
  .nav-center a {
    padding: 0.35rem 0.55rem;
    font-size: 0.78rem;
  }
  .slide-icon {
    font-size: 2rem;
  }
}
