/**
 * Estilos principales - Hormigones Decorativos
 * Framework: Bootstrap 5.3
 * Colores: Primario #265C9E, Secundario #7F004A
 */

/* ========================================
   VARIABLES PERSONALIZADAS
======================================== */
:root {
  /* Colores principales */
  --primary-color: #265C9E;
  --primary-dark: #1a4270;
  --primary-light: #3d7bc4;
  --secondary-color: #7F004A;
  --secondary-dark: #5a0034;
  --secondary-light: #a01060;
  
  /* Grises */
  --gray-dark: #2d2d2d;
  --gray-medium: #6c757d;
  --gray-light: #f8f9fa;
  
  /* Espaciados */
  --header-height: 76px;
  
  /* Transiciones */
  --transition-base: all 0.3s ease;
  
  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

/* Override de colores Bootstrap */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Color info más suave y opaco */
.bg-info {
  background-color: rgb(23, 162, 184) !important;
}

/* ========================================
   GENERALES
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--gray-dark);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 1.1rem; /* Aumentar tamaño de fuente general */
}

/* Skip link para accesibilidad */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ========================================
   HEADER Y NAVBAR
======================================== */
.site-header {
  position: relative;
  z-index: 1030;
}

.navbar {
  min-height: var(--header-height);
  transition: var(--transition-base);
  border-bottom: 1px solid transparent;
}

/* Sombra al hacer scroll */
.navbar.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: rgba(0,0,0,0.05);
}

/* Marca/Logo */
.navbar-brand {
  font-size: 1.1rem;
  font-weight: 600;
  transition: var(--transition-base);
  padding: 0.5rem 0;
}

.navbar-brand:hover {
  opacity: 0.85;
}

.navbar-brand .brand-text strong {
  font-size: 1.2rem;
  color: var(--gray-dark);
}

.navbar-brand .brand-text small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Items de navegación */
.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--gray-dark);
  padding: 0.75rem 1rem;
  transition: var(--transition-base);
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--primary-color);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Subrayado animado en desktop */
@media (min-width: 992px) {
  .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
  }
  
  .navbar-nav .nav-link:hover::after,
  .navbar-nav .nav-link.active::after {
    width: 60%;
  }
}

/* Dropdown */
.navbar-nav .dropdown-menu {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  box-shadow: var(--shadow-md);
  min-width: 260px;
}

.navbar-nav .dropdown-item {
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
  background-color: var(--gray-light);
  color: var(--primary-color);
  padding-left: 1.5rem;
}

/* Botón hamburguesa */
.navbar-toggler {
  padding: 0.5rem;
  font-size: 1.25rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(38, 92, 158, 0.25);
}

/* ========================================
   OFFCANVAS MÓVIL
======================================== */
.offcanvas {
  max-width: 320px;
}

.offcanvas-header {
  padding: 1.5rem;
}

.offcanvas-title {
  font-weight: 600;
  color: var(--gray-dark);
}

.offcanvas-body {
  padding: 1rem 1.5rem;
}

.offcanvas .nav-link {
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 1rem;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link:focus {
  background-color: var(--gray-light);
  border-radius: 6px;
}

.offcanvas .nav-link.active {
  background-color: rgba(38, 92, 158, 0.1);
  border-radius: 6px;
}

/* Collapse de servicios en móvil */
#serviciosCollapse {
  background-color: var(--gray-light);
  border-radius: 6px;
  margin-top: 0.5rem;
}

#serviciosCollapse .dropdown-item {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* ========================================
   BOTONES CTA
======================================== */
.btn {
  font-weight: 600;
  border-radius: 6px;
  transition: var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
}

.btn-primary {
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ========================================
   WHATSAPP FLOTANTE
======================================== */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 32px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
  background-color: #1ebe57;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4);
}

@keyframes pulse-whatsapp {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
  }
  50% {
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
  }
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
  margin-top: 5rem;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a,
.footer-contact a {
  transition: var(--transition-base);
  font-size: 0.9rem;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--primary-light) !important;
  padding-left: 0.25rem;
}

.social-links .btn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-base);
}

.social-links .btn:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

/* ========================================
   MAIN CONTENT
======================================== */
.main-content {
  padding-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ========================================
   HERO SECTION
======================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: white;
}

.hero-section .hero-bg {
  top: 0;
  left: 0;
}

.hero-section .text-white-75 {
  color: rgba(255, 255, 255, 0.85);
}

.hero-section .badge {
  animation: fadeInDown 0.8s ease-out;
}

.hero-section h1 {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-section .lead {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-section ul {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-section .btn {
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.hero-section .stat-card {
  backdrop-filter: blur(10px);
  transition: var(--transition-base);
}

.hero-section .stat-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.2) !important;
}

.hero-wave{
  position:absolute;
  left:0; right:0;
  bottom:-1px;          /* empuja 1px para tapar el gap */
  height:120px;
  line-height:0;
  pointer-events:none;
}
.hero-wave svg{
  display:block;
  width:100%;
  height:100%;          /* llena el contenedor */
}
.hero-wave path{ stroke:none; }

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   WHY CHOOSE US
======================================== */
.feature-card {
  transition: var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color) !important;
  box-shadow: var(--shadow-md);
}

.feature-card .icon-wrapper {
  transition: var(--transition-base);
}

.feature-card:hover .icon-wrapper {
  transform: scale(1.1);
}

/* ========================================
   SERVICES SECTION
======================================== */
.service-card {
  transition: var(--transition-base);
}

.service-card:hover,
.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg) !important;
}

.service-card .card-img-top {
  transition: var(--transition-base);
}

.service-card:hover .card-img-top {
  background-color: rgba(38, 92, 158, 0.2) !important;
}

/* ========================================
   CTA INTERMEDIATE
======================================== */
.cta-intermediate {
  position: relative;
  overflow: hidden;
}

.cta-intermediate::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
  opacity: 0.3;
  z-index: 0;
}

/* ========================================
   CONTACT SECTION
======================================== */
.contact-info-card .icon-box {
  flex-shrink: 0;
}

.contact-info-card .hover-primary:hover {
  color: var(--primary-color) !important;
  padding-left: 2px;
}

/* ========================================
   SERVICE PAGES
======================================== */
.service-hero {
  position: relative;
  color: white;
}

.service-hero .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

.benefit-card,
.process-step {
  transition: var(--transition-base);
}

.benefit-card:hover,
.process-step:hover {
  transform: translateY(-5px);
}

.icon-circle {
  transition: var(--transition-base);
}

.benefit-card:hover .icon-circle,
.process-step:hover .step-number {
  transform: scale(1.1);
}

.step-number {
  transition: var(--transition-base);
  box-shadow: 0 4px 12px rgba(38, 92, 158, 0.3);
}

/* Galería de servicios */
.gallery-item {
  transition: var(--transition-base);
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item .gallery-overlay {
  transition: var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1 !important;
}

/* FAQ Accordion */
.accordion-button {
  background-color: white;
  color: var(--gray-dark);
}

.accordion-button:not(.collapsed) {
  background-color: var(--primary-color);
  color: white;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--primary-color);
}

.accordion-button::after {
  transition: var(--transition-base);
}

.accordion-item {
  transition: var(--transition-base);
}

.accordion-item:hover {
  transform: translateX(5px);
}

/* CTA final */
.cta-final {
  position: relative;
  overflow: hidden;
}

/* Modal de galería */
#galleryModal .modal-content {
  border: none;
}

#galleryModal .carousel-control-prev-icon,
#galleryModal .carousel-control-next-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  backdrop-filter: blur(10px);
}

/* ========================================
   GALLERY PAGE
======================================== */
.page-hero {
  position: relative;
}

.page-hero.projects-hero {
  background: linear-gradient(135deg, #265C9E 0%, #7F004A 100%) !important;
}

.page-hero .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
}

.stat-badge {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1rem 2rem;
}

.gallery-filters {
  background: white !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-filters .btn {
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition-base);
}

.gallery-filters .btn:hover {
  transform: translateY(-2px);
}

.gallery-card {
  cursor: pointer;
  transition: var(--transition-base);
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg) !important;
}

.gallery-card .gallery-overlay {
  transition: var(--transition-base);
}

.gallery-card:hover .gallery-overlay {
  opacity: 1 !important;
}

#no-results {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ========================================
   PROJECTS PAGE
======================================== */
.project-card {
  transition: var(--transition-base);
}

.project-card:hover .project-image {
  transform: scale(1.02);
}

.project-image {
  transition: var(--transition-base);
}

.project-badge {
  z-index: 10;
}

.project-specs {
  background: var(--gray-light);
  border-radius: 8px;
  padding: 1rem;
}

.project-specs i {
  font-size: 1.5rem;
}

/* ========================================
   UTILIDADES
======================================== */
.section-padding {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 1rem;
  position: relative;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-medium);
  margin-bottom: 3rem;
}

.hover-shadow {
  transition: var(--transition-base);
}

.hover-shadow:hover {
  box-shadow: var(--shadow-md) !important;
}

.transition-all {
  transition: all 0.3s ease;
}

.bg-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Backdrop blur utility */
.backdrop-blur {
  backdrop-filter: blur(10px);
}

/* ========================================
   ANIMACIONES ADICIONALES
======================================== */
@keyframes pulse-scale {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 991.98px) {
  :root {
    --header-height: 66px;
  }
  
  .section-padding {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 26px;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-wave {
    height: 60px;
  }
  
  .hero-wave svg {
    margin-bottom: -1px;
  }
  
  /* Ajustar padding del contenedor del hero en tablets */
  .hero-section .container {
    padding-top: 60px !important;
    padding-bottom: 80px !important;
  }
}

@media (max-width: 575.98px) {
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1.1rem;
  }

  .display-2 {
    font-size: 2.5rem;
  }

  .stat-card h3 {
    font-size: 2rem !important;
  }
}

/* ========================================
   ACCESIBILIDAD
======================================== */
/* Focus visible mejorado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reducir movimiento para usuarios con preferencias */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Alto contraste */
@media (prefers-contrast: high) {
  .navbar-nav .nav-link {
    font-weight: 600;
  }
  
  .btn {
    border-width: 2px;
  }
}
