/* ==========================================================================
   ROOF & IMPACT CONTRACTORS LLC - GENERAL CUSTOM STYLES
   ========================================================================== */

:root {
  --primary: #8b0000;       /* Rojo corporativo principal */
  --primary-hover: #a30000;
  --secondary: #0d1b2a;     /* Azul oscuro/Prusia complementario */
  --text-main: #1f2937;
  --text-light: #4b5563;
  --light-gray: #f9fafb;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: var(--white);
  line-height: 1.6;
  padding-top: 130px; /* Evita que el contenido se pise con el nuevo header amplio */
}

/* ==========================================================================
   HEADER & NAVIGATION (AMPLIADO Y OPTIMIZADO PARA LOGO SVG)
   ========================================================================== */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0; /* Más aire vertical en todo el encabezado */
  transition: all 0.3s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Contenedor del Logo de la Marca */
.logo {
  display: flex;
  align-items: center;
  gap: 1.25rem; /* Separación perfecta entre isotipo y texto */
  text-decoration: none;
}

/* Control maestro estricto para el logo SVG */
.logo img, 
.header .logo img,
.header-inner .logo img {
  width: 90px !important;
  height: 90px !important;
  max-width: 90px !important;
  max-height: 90px !important;
  min-width: 90px !important;
  min-height: 90px !important;
  object-fit: contain !important;
  display: block !important;
}

/* Estilo del texto del nombre comercial */
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text span:first-child {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem; /* Nombre más grande y corporativo */
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1rem; /* Subtítulo con peso visual equilibrado */
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.2rem;
}

/* Menú de Navegación */
.nav-main {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links {
  display: flex;
  gap: 1.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

/* Selector de Idioma */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
  padding: 0.25rem;
  border-radius: 6px;
}

.lang-btn {
  background: transparent;
  border: 1px solid silver;
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 50px;
  color: #111;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.lang-btn.active {
  background-color: #8b0000;
  color: #fff;
  border-color: #8b0000;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
}

.mobile-toggle span {
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  transition: all 0.3s ease;
}

/* ==========================================================================
   HERO DYNAMIC SECTION
   ========================================================================== */
.hero {
  min-height: 75vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  background-color: var(--primary);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero h1 span {
  color: #e53935;
  display: block;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-license {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
}

/* ==========================================================================
   BUTTONS SYSTEM
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.95rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
}

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

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--secondary);
  transform: translateY(-2px);
}

/* ==========================================================================
   LAYOUTS & SECTIONS COMMON
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.text-center {
  text-align: center;
}

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

.section-label {
  background-color: var(--primary);
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 2px;
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.45rem 1.25rem;
  border-radius: 50px;
}

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

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--secondary);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ==========================================================================
   PRODUCTS & SERVICES GRID
   ========================================================================== */
.products-grid, .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.product-card, .service-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0f0f0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.product-card:hover, .service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-info, .service-content {
  padding: 2rem;
}

.product-info h4, .service-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--secondary);
}

.product-info p, .service-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Muestras de marcos de ventanas/puertas */
.frame-options {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.frame-option {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.frame-option.active {
  border-color: var(--primary);
  transform: scale(1.15);
}

/* ==========================================================================
   BENEFITS SECTIONS
   ========================================================================== */
.benefits-section {
  background-color: var(--light-gray);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.benefit-card {
  background: #f3f3f3;
  padding: 2.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.benefit-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.benefit-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--secondary);
}

/* ==========================================================================
   ADVANTAGE & FEATURES
   ========================================================================== */
.features-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 4rem;
  align-items: center;
}

.features-list {
  list-style: none;
  margin-top: 2rem;
}

.features-list li {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.icon-check {
  color: green;
  font-weight: bold;
  font-size: 1.2rem;
  margin-top: 0.2rem;
}

.features-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   CTA STRIP
   ========================================================================== */
.cta-section {
  background: linear-gradient(rgba(139,0,0,0.95), rgba(139,0,0,0.95)), url('assets/advantage-home.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
}

/* ==========================================================================
   FOOTER STRUCTURE
   ========================================================================== */
.footer {
  background-color: #0b1320;
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
  font-size: 0.95rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
  grid-column: span 1;
}

.footer-brand .logo img {
  width: 80px !important;
  height: 80px !important;
  margin-bottom: 1rem;
}

.footer-brand p {
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.footer-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  background-color: rgba(255,255,255,0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--white);
}

.footer-column h4 {
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-column ul li a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-column ul li a:hover {
  color: var(--white);
}

.manufacturer-logos {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mfg-logo {
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 0;
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Service images */
.service-image-container {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-img {
  transform: scale(1.05);
}

@media (max-width: 992px) {
  body { padding-top: 110px; }
  .hero h1 { font-size: 2.75rem; }
  .logo-text span:first-child { font-size: 1.4rem; }
  .logo-subtitle { font-size: 0.85rem; }
  .logo img { width: 70px !important; height: 70px !important; }
}

@media (max-width: 768px) {
  .nav-links { display: none; } /* El menú mobile se gestiona con script.js */
  .mobile-toggle { display: flex; }
  .hero h1 { font-size: 2.25rem; }
}


/* ==========================================================================
   RESPONSIVE DESIGN - MOBILE ONLY (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
  /* HEADER */
  body { padding-top: 80px; }

  .header-inner {
    padding: 0 1rem !important;
    transform: none !important;
  }

  .logo {
    transform: none !important;
    margin-left: 0 !important;
  }

  .logo img {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
  }

  .logo-text {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.1rem !important;
  }

  .logo-text span:first-child {
    font-size: 1rem !important;
  }

  .logo-subtitle {
    font-size: 0.65rem !important;
    letter-spacing: 1px !important;
  }

  .nav-main {
    transform: none !important;
    gap: 0.5rem !important;
  }

  .nav-links {
    font-size: 1rem !important;
    margin-left: 0 !important;
    gap: 0.6rem !important;
  }

  .lang-switcher {
    margin-left: 0.5rem !important;
  }

  .lang-btn {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.6rem !important;
  }

  /* HERO */
  .hero {
    min-height: auto !important;
    padding: 3rem 1rem !important;
  }

  .hero-content {
    max-width: 100% !important;
    padding: 0 0.5rem !important;
  }

  .hero-badge {
    font-size: 0.75rem !important;
    padding: 0.4rem 1rem !important;
  }

  .hero h1 {
    font-size: 2rem !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
  }

  .hero-cta {
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .hero-cta .btn {
    width: 100% !important;
    text-align: center !important;
    font-size: 0.9rem !important;
    padding: 0.85rem 1.5rem !important;
  }

  .hero-license {
    font-size: 0.85rem !important;
  }

  /* SERVICES */
  .services-section .container {
    padding: 3rem 1rem !important;
  }

  .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    margin-bottom: 2rem !important;
  }

  .section-title {
    font-size: 1.8rem !important;
  }

  .section-subtitle {
    font-size: 1rem !important;
  }

  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .service-card {
    margin: 0 !important;
  }

  /* FEATURES */
  .features-section .container {
    padding: 3rem 1rem !important;
  }

  .features-inner {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .features-text {
    order: 1 !important;
  }

  .features-image {
    order: 2 !important;
  }

  .features-image img {
    transform: none !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
  }

  .title-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .title-row .section-title {
    font-size: 1.6rem !important;
    white-space: normal !important;
  }

  .features-list li {
    gap: 0.75rem !important;
  }

  /* CTA */
  .cta-section .container {
    padding: 3rem 1rem !important;
  }

  .cta-section h2 {
    font-size: 1.8rem !important;
  }

  .cta-section p {
    font-size: 1rem !important;
  }

  /* FOOTER */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 0 1rem 2rem !important;
  }

  .footer-brand {
    margin-left: 0 !important;
    transform: none !important;
  }

  .footer-brand .logo img {
    width: 60px !important;
    height: 60px !important;
  }

  .footer-column {
    margin-left: 0 !important;
    transform: none !important;
  }

  .footer-column h4 {
    font-size: 1.1rem !important;
  }

  .footer-column ul li a {
    font-size: 0.95rem !important;
  }

  .manufacturer-logos p {
    font-size: 0.95rem !important;
  }

  .footer-bottom {
    padding: 1.5rem 1rem 0 !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN - TABLET (max-width: 992px)
   ========================================================================== */

@media (max-width: 992px) and (min-width: 769px) {
  .header-inner {
    padding: 0 1.5rem !important;
  }

  .logo {
    transform: translateX(-3rem) !important;
  }

  .nav-main {
    transform: translateX(-1.5rem) !important;
  }

  .nav-links {
    font-size: 1.8rem !important;
  }

  .hero h1 {
    font-size: 2.8rem !important;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .features-inner {
    grid-template-columns: 1fr !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .footer-column {
    transform: translateX(20mm) !important;
  }
}
