/* General Styles for DAEZ Consulting Website */

:root {
  --primary-color: #0F75BC; /* Updated to match logo's blue */
  --secondary-color: #375988; /* Darker blue from logo */
  --accent-color: #29ABE2; /* Light blue from logo */
  --dark-color: #333333;
  --light-color: #f8f9fa;
  --text-color: #4A4A4A;
  --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  
  /* Animation variables */
  --animation-slow: 1.2s;
  --animation-medium: 0.8s;
  --animation-fast: 0.5s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.header {
  background-color: transparent;
  box-shadow: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: transform 0.4s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  margin-right: 10px;
}

.logo:hover {
  color: var(--secondary-color);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.nav-links a:hover, 
.nav-links a.active {
  color: white;
  opacity: 0.9;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: white;
  transition: var(--transition);
}

.nav-links a:hover::after, 
.nav-links a.active::after {
  width: 100%;
}

.header.scrolled .nav-links a {
  color: var(--dark-color);
  text-shadow: none;
}

.header.scrolled .nav-links a:hover,
.header.scrolled .nav-links a.active {
  color: var(--primary-color);
}

.header.scrolled .nav-links a::after {
  background: var(--gradient);
}

.header.on-white-bg .nav-links a {
  color: var(--dark-color);
  text-shadow: none;
}

.header.on-white-bg .nav-links a::after {
  background: var(--dark-color);
}

.header.header-hidden {
  transform: translateY(-100%);
}

/* Hero Section - Generic styles */
.hero {
  background: var(--gradient);
  padding: 8rem 0 5rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 117, 188, 0.7), rgba(55, 89, 136, 0.8));
  z-index: -1;
  animation: pulse 8s infinite alternate;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  animation: fadeInDown 1s both;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 1.3rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  animation: fadeInUp 1s both 0.3s;
}

.hero .btn {
  animation: bounceIn 1s both 0.6s;
  font-size: 1.1rem;
  padding: 0.9rem 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  background: var(--gradient);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(15, 117, 188, 0.4);
}

.btn-secondary {
  background: var(--secondary-color);
  color: #fff;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--dark-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(55, 89, 136, 0.4);
}

.btn-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--secondary-color);
}

.btn-link i {
  transition: transform 0.3s ease;
}

.btn-link:hover i {
  transform: translateX(5px);
}

.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* Footer Styles */
.footer {
  background-color: var(--dark-color);
  color: #fff;
  padding: 2rem 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  margin-bottom: 1.5rem;
  text-align: left;
  padding: 0 1rem;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  position: relative;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--gradient);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: var(--transition);
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--gradient);
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.footer-legal a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--primary-color);
}

/* Animation classes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation utility classes */
.animate-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Animation delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Utility classes */
.text-center { text-align: center; }
.mt-4 { margin-top: 4rem; }

/* Mobile menu styles */
.mobile-menu-btn {
  display: none;
}

/* Media Queries */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 150;
    position: relative;
  }
  
  .mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s ease;
  }
  
  .header.scrolled .mobile-menu-btn span {
    background: var(--dark-color);
  }
  
  .header.on-white-bg .mobile-menu-btn span {
    background: var(--dark-color);
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 50vh;
    background: transparent;
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 100;
    display: flex;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    margin: 0.8rem 0;
    margin-left: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0.1s;
    width: 100%;
    text-align: center;
  }
  
  .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }
  
  .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
  .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }
  
  .nav-links a {
    color: white !important; /* Force white color on mobile */
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    font-size: 1.4rem;
    position: relative;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
    padding: 0.5rem 2rem;
  }
  
  /* Override any color changes for nav links on mobile */
  .header.scrolled .nav-links a,
  .header.on-white-bg .nav-links a {
    color: white !important;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  }
  
  .nav-links.custom-text-color a {
    color: white !important;
  }
  
  .nav-links a:hover {
    transform: translateX(5px);
    color: rgba(255, 255, 255, 0.9) !important;
  }
  
  .nav-links a::after {
    background: white !important;
  }
  
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .overlay.active {
    display: block;
    opacity: 1;
  }
  
  .footer-content {
    flex-direction: column;
  }
  
  .footer-section {
    margin-bottom: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (min-width: 992px) {
  .contact-page {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }
}

.btn-center {
  display: flex;
  justify-content: center;
  align-items: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  max-width: max-content;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

/* Asegurar que todos los elementos se ajusten dentro de su contenedor */
img, video, iframe, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* Asegurar que contenedores tengan box-sizing adecuado */
* {
  box-sizing: border-box;
}

/* Ajustar elementos flexibles para que no se desborden */
.services-carousel, .features-grid, .clients-grid, .footer-content {
  width: 100%;
  max-width: 100%;
}