/* =========================================
   VARIABLES Y COLORES CORPORATIVOS
   ========================================= */
:root {
  --primary-color: #00a99d;
  --secondary-color: #2e3192;
  --accent-color: #f15a24;
  --dark-bg: #1b2430;
  --light-bg: #f8f9fa;
  --text-dark: #333;
  --text-light: #666;
  --white: #ffffff;
  --transition: all 0.3s ease;
}

/* =========================================
   ESTILOS GENERALES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  overflow-x: hidden;
}

/* =========================================
   NAVEGACIÓN
   ========================================= */
.navbar {
  background-color: transparent;
  padding: 1rem 0;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.navbar.scrolled {
  background-color: rgba(46, 49, 146, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  transition: var(--transition);
}

.navbar-nav .nav-link {
  color: var(--white) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  position: relative;
  transition: var(--transition);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background-color: var(--primary-color);
  transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* =========================================
   HERO SECTION CON THREE.JS
   ========================================= */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

#three-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 2rem;
  max-width: 1000px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin-bottom: 2rem;
  font-weight: 300;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease 0.2s both;
}

.btn-main {
  background: var(--primary-color);
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  color: var(--white);
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 169, 157, 0.3);
  animation: fadeInUp 1s ease 0.4s both;
}

.btn-main:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(241, 90, 36, 0.4);
  color: var(--white);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--white);
  border-radius: 15px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 10px;
  background: var(--white);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

/* =========================================
   SECCIONES GENERALES
   ========================================= */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--secondary-color);
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* =========================================
   SERVICIOS
   ========================================= */
.section-services {
  background: var(--white);
}

.service-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 15px;
  text-align: center;
  transition: var(--transition);
  height: 100%;
  border: 2px solid transparent;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 169, 157, 0.2);
}

.service-icon {
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.service-card h5 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-light);
  line-height: 1.6;
}

.service-card ul {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}

.service-card ul li {
  padding: 0.5rem 0;
  color: var(--text-light);
  position: relative;
  padding-left: 25px;
}

.service-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* =========================================
   SERVICIOS ESPECÍFICOS
   ========================================= */
.section-specific-services {
  background: var(--light-bg);
}

.specific-service-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  height: 100%;
  transition: var(--transition);
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.specific-service-card:hover {
  transform: translateX(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.specific-service-card .service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.specific-service-card h4 {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.specific-service-card .features {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.specific-service-card .features li {
  padding: 0.4rem 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* =========================================
   ESTADÍSTICAS
   ========================================= */
.section-stats {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: var(--white);
}

.stat-item {
  padding: 2rem 1rem;
}

.stat-icon {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 1rem 0;
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* =========================================
   BLOG
   ========================================= */
.blog-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.blog-card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.blog-card h4 {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.blog-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* =========================================
   CTA SECTION
   ========================================= */
.section-cta {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.cta-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  position: relative;
}

.cta-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  position: relative;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer h5 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a,
.footer-contact li {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-contact {
  list-style: none;
  padding: 0;
}

.footer-contact li {
  margin-bottom: 0.8rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  color: var(--white);
}

/* =========================================
   ANIMACIONES
   ========================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes scroll {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(15px);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   RESPONSIVE
   ========================================= */

/* Tablets */
@media (max-width: 991px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  section {
    padding: 3.5rem 0;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .hero {
    height: 100svh; /* Safari mobile fix */
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .btn-main {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .service-card,
  .specific-service-card {
    margin-bottom: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-icon {
    font-size: 2rem;
  }
  
  .footer {
    padding: 3rem 0 1.5rem;
  }
  
  .navbar-nav {
    padding: 1rem 0;
  }
  
  .navbar-nav .nav-link {
    margin: 0.5rem 0;
  }
}

/* iPhone SE y dispositivos pequeños */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  .btn-main {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
}

/* iPad Pro landscape */
@media (min-width: 1024px) and (max-width: 1366px) {
  .container {
    max-width: 960px;
  }
}

/* =========================================
   UTILIDADES
   ========================================= */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
}

/* =========================================
   PÁGINAS INTERNAS
   ========================================= */
.hero-internal {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: var(--white);
  text-align: center;
}

.hero-internal h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-internal .lead {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  opacity: 0.9;
}

/* Misión y Visión */
.section-mission {
  padding: 5rem 0;
}

.mission-card {
  background: var(--white);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: 100%;
  border-left: 5px solid var(--primary-color);
  transition: var(--transition);
}

.mission-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.mission-card .icon-wrapper {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.mission-card .icon-wrapper i {
  font-size: 2.5rem;
  color: var(--white);
}

.mission-card h2 {
  color: var(--secondary-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.mission-card p {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 1.1rem;
}

/* Valores */
.section-values {
  padding: 5rem 0;
}

.value-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 15px;
  text-align: center;
  height: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  border-top: 4px solid var(--primary-color);
}

.value-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.value-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.value-card h4 {
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.value-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Equipo */
.section-team {
  padding: 5rem 0;
}

.team-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  height: 100%;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.team-image {
  height: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.team-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.team-content {
  padding: 2rem;
}

.team-content h4 {
  color: var(--secondary-color);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.team-content .role {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.team-content p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Proyectos Pro Bono */
.probono-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  height: 100%;
}

.probono-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.probono-image {
  height: 250px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.probono-tags {
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.probono-tag {
  background: rgba(255, 255, 255, 0.9);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.probono-content {
  padding: 2rem;
}

.probono-content h4 {
  color: var(--secondary-color);
  font-weight: 700;
  margin-bottom: 1rem;
}

.probono-content .impact {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  margin: 1rem 0;
  display: inline-block;
}

.probono-content .date {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Blog página completa */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-post-full {
  max-width: 800px;
  margin: 0 auto;
}

.blog-post-full .post-header {
  margin-bottom: 3rem;
}

.blog-post-full .post-meta {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.blog-post-full .post-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.blog-post-full .post-content {
  line-height: 1.8;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.blog-post-full .post-content h2,
.blog-post-full .post-content h3 {
  color: var(--secondary-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Consultorías */
.consulting-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  height: 100%;
  border-left: 5px solid var(--primary-color);
  transition: var(--transition);
}

.consulting-card:hover {
  transform: translateX(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-left-color: var(--accent-color);
}

.consulting-card h3 {
  color: var(--secondary-color);
  font-weight: 700;
  margin-bottom: 1rem;
}

.consulting-card p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.consulting-card ul {
  list-style: none;
  padding: 0;
}

.consulting-card ul li {
  padding: 0.6rem 0;
  color: var(--text-light);
  position: relative;
  padding-left: 30px;
}

.consulting-card ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2rem;
}

/* =========================================
   CONTACTO
   ========================================= */
.section-contact {
  padding: 6rem 0;
  background: var(--light-bg);
}

/* Formulario de contacto */
.contact-form {
  background: var(--white);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-control {
  padding: 0.8rem 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 169, 157, 0.25);
}

.contact-info-card {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: var(--white);
  padding: 3rem;
  border-radius: 20px;
  height: 100%;
}

.contact-info-card h4 {
  margin-bottom: 2rem;
  font-weight: 700;
}

.contact-info-item {
  display: flex;
  align-items: start;
  margin-bottom: 1.5rem;
}

.contact-info-item i {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: var(--accent-color);
  min-width: 30px;
}

.contact-info-item div h5 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.contact-info-item div p {
  margin: 0;
  opacity: 0.9;
}

/* Alertas del formulario */
.alert-custom {
  display: none;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success-custom {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-success-custom i {
  margin-right: 0.5rem;
  color: #28a745;
}

.alert-error-custom {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-error-custom i {
  margin-right: 0.5rem;
  color: #dc3545;
}

.btn-submit {
  position: relative;
  overflow: hidden;
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
