/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #f9f9f9;
  line-height: 1.6;
  scroll-behavior: smooth; /* 🔹 Suaviza el scroll al hacer clic en el menú */
}

/* NAVBAR */
header {
  background: #0a2e57;
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 1.2rem;
}

.navbar .logo img {
  height: 40px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #00aaff;
}

/* MENU HAMBURGUESA */
.menu-btn {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
  z-index: 1100;
}

.menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: 0.3s;
}

/* Animación al abrir (X) */
.menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-btn.open span:nth-child(2) {
  opacity: 0;
}
.menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* HERO */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 80px 10%;
  background: linear-gradient(to right, #0d3b66, #144e8c);
  color: white;
}

.hero-text {
  max-width: 50%;
}

.hero-text h1 {
  font-size: 2.5rem;
}

.hero-text span {
  color: #00aaff;
}

.hero-img img {
  max-width: 250px;
  border-radius: 15px;
}

/* SECTIONS */
#about, #servicios, #portfolio, #contact {
  padding: 3rem 10%;
  text-align: center;
  scroll-margin-top: 100px; /* 🔹 evita que el título quede oculto bajo el header */
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #0a2e57;
}

/* SOBRE MÍ */
.about {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 10%;
  background: #f9f9f9;
  gap: 50px;
}

.about-img img {
  max-width: 250px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.about-text {
  max-width: 600px;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #0d3b66;
}

/* === SECCIÓN TÍTULOS (similar a servicios) === */
.titulos {
  text-align: center;
  padding: 60px 20px;
}

.titulos h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #0a2a43;
}

.titulos-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-content: center;
}

.titulo-card {
  background: #eef8ff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(50px);
}

.titulo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.titulo-card.show {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

.titulo-card .icon {
  font-size: 2.5rem;
  color: #0a2a43;
  margin-bottom: 15px;
}

.titulo-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #0a2a43; 
}

.titulo-card p {
  font-size: 1rem;
  color: #555;
}

/* --- SECCIÓN SERVICIOS --- */
.services {
  text-align: center;
  padding: 60px 20px;
  background-color: #f9f9f9;
}

.services h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #0a2a43;
}

.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-content: center;
}

.service-card {
  background: #eef8ff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(50px);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.service-card.show {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

.service-card .icon {
  font-size: 2.5rem;
  color: #0a2a43;
  margin-bottom: 15px;
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #0a2a43;
}

.service-card p {
  font-size: 1rem;
  color: #444;
}

/* PORTAFOLIO */
#portfolio {
  text-align: center;
  padding: 50px 20px;
}

#portfolio h2 {
  font-size: 2em;
  margin-bottom: 10px;
  color: #0a2a43;
}

#portfolio p {
  margin-bottom: 30px;
  color: #555;
}

.portfolio-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.portfolio-card {
  background: #f0f9ff; /* igual a servicios */
  border-radius: 12px;
  padding: 30px 20px;
  width: 280px;
  text-align: center;
  box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 8px 20px rgba(0,0,0,0.2);
}

.portfolio-card img {
  max-width: 120px;
  margin-bottom: 15px;
}

.portfolio-card h3 {
  font-size: 1.2em;
  color: #002b5c;
  margin-bottom: 8px;
}

.portfolio-card p {
  color: #444;
  font-size: 0.95em;
}

/* ===== CONTACTO EN TARJETAS MEJORADO ===== */
.contact-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 30px;
}

.contact-card {
  background: #f9fcff;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  width: 360px;
  text-align: left;
  transition: transform 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
}

.contact-card h3 {
  color: #0a2a43;
  margin-bottom: 18px;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
}

/* Inputs */
.contact-card input,
.contact-card textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 15px;
  border: 1px solid #d1d9e6;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.contact-card input:focus,
.contact-card textarea:focus {
  border-color: #0055aa;
  box-shadow: 0 0 6px rgba(0, 85, 170, 0.3);
}

/* Botón */
.contact-card form button {
  background: linear-gradient(135deg, #003366, #0055aa);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s ease;
  width: 100%;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0, 51, 102, 0.25);
}

.contact-card form button:hover {
  background: linear-gradient(135deg, #0055aa, #0077cc);
}

/* Información */
.contact-card p {
  margin: 12px 0;
  color: #333;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.contact-card i {
  margin-right: 10px;
  color: #0a2e57;
  font-size: 1.1rem;
}

/* Redes sociales */
.social-links {
  margin-top: 15px;
}

.social-links a {
  font-size: 1.3rem;
  margin: 0 10px;
  color: #003366;
  transition: 0.3s ease;
}

.social-links a:hover {
  color: #0077cc;
}


/* ===== FOOTER ===== */
footer {
  background: #0a2e57;
  color: #f1f1f1;
  padding: 50px 20px 20px;
  margin-top: 50px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
  gap: 40px;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  position: relative;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 40px;
  height: 2px;
  background: #0077cc;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin: 8px 0;
}

.footer-col ul li a {
  text-decoration: none;
  color: #d1d1d1;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: #0077cc;
}

.footer-logo {
  width: 120px;
  margin-bottom: 15px;
}

/* Iconos contacto */
.footer-col p i {
  margin-right: 8px;
  color: #0077cc;
}

/* Parte inferior */
.footer-bottom {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 30px auto 0;
}

.footer-bottom p {
  font-size: 0.9rem;
  color: #ccc;
}

/* Redes sociales */
.social-links a {
  font-size: 1.2rem;
  margin-left: 15px;
  color: #ccc;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: #0077cc;
}


/* Botón WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}
.whatsapp-float i {
  margin-top: 2px;
}

/* 🔹 Ajustes responsive */
@media (max-width: 768px) {
  /* HERO */
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 50px 5%;
  }

  .hero-text {
    max-width: 100%;
    margin-bottom: 20px;
  }

  .hero-img img {
    max-width: 180px;
  }

  /* SOBRE MÍ */
  .about {
    flex-direction: column;
    text-align: center;
    padding: 50px 5%;
  }

  .about-img img {
    max-width: 200px;
    margin-bottom: 20px;
  }

  /* NAV LINKS */
  .menu-btn {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    right: -100%;
    background: #0a2e57;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 2rem;
    transition: right 0.4s ease;
    width: 250px;
    height: 100vh;
  }

  .nav-links.active {
    right: 0;
  }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .about-text h2 {
    font-size: 1.5rem;
  }

  .service-card {
    padding: 20px;
  }
  .service-card .icon {
    font-size: 2rem;
  }
  .service-card h3 {
    font-size: 1.1rem;
  }
  .service-card p {
    font-size: 0.95rem;
  }
}

/* Notificación flotante */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #4CAF50; /* Verde éxito */
  color: white;
  padding: 15px 20px;
  border-radius: 6px;
  font-size: 1rem;
  display: none; /* Oculto por defecto */
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  z-index: 1000;
  animation: fadeInOut 4s ease forwards;
}

/* Animación entrada/salida */
@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(20px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(20px); }
}

/* ✅ Fin del archivo CSS */