* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #0f172a;
  color: #e5e7eb;
}

section[id] {
  scroll-margin-top: 90px;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: #020617;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  z-index: 1000;
}

.logo img {
  height: 60px;
}

.navbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navbar nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #e5e7eb;
  font-weight: 500;
}

.navbar nav a:hover {
  color: #38bdf8;
}

/* HERO */
.hero {
  min-height: 100vh;
  padding-top: 80px;
  background: linear-gradient(135deg, #020617, #0f172a);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-logo {
  width: 350px;
  margin-bottom: 60px;
  animation: fadeIn 1.5s ease-in-out;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 25px;
}

.btn {
  background: #38bdf8;
  color: #020617;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
}

/* SECCIONES */
.section {
  padding: 100px 15%;
  text-align: center;
}

.section h2 {
  font-size: 2.2rem;
  margin-bottom: 25px;
  color: #38bdf8;
}

.text {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* EQUIPO / ORGANIGRAMA */
.orgchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}

.org-node.company {
  background: #020617;
  padding: 20px 30px;
  border-radius: 12px;
  color: #38bdf8;
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
}

.org-line {
  width: 2px;
  height: 30px;
  background: #38bdf8;
}

.org-branch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px;
  width: 100%;
  max-width: 1200px;
}

.org-branch .org-node {
  background: #020617;
  padding: 25px 22px;
  border-radius: 15px;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
}

.org-branch .org-node:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

.org-branch .role {
  display: block;
  font-size: 0.8rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 8px;
}

.org-branch strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.org-branch .enfoque {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #94a3b8;
}

/* SERVICIOS / TARJETAS GENERALES */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: #020617;
  padding: 30px;
  border-radius: 15px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

.card h3 {
  margin-bottom: 15px;
  color: #38bdf8;
}

/* PROYECTOS */
.project-card {
  text-align: left;
  position: relative;
}

.project-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  margin-bottom: 15px;
  object-fit: cover;
}

.badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 15px;
  font-weight: 600;
}

.project-title {
  background: #ffffff;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 15px;
  display: inline-block;
}

.project-title img {
  display: block;
  height: 32px;
  width: auto;
}

.project-card p {
  margin-bottom: 20px;
}

.btn.small {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.badge-row .badge {
  margin-bottom: 0;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.project-header .project-icon {
  margin-bottom: 0;
}

.project-header .project-title {
  margin-bottom: 0;
}

/* STACK TECNOLÓGICO */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #020617;
  padding: 20px 10px;
  border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.tech-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.15);
}

.tech-item i {
  font-size: 2.5rem;
}

.tech-item span {
  font-size: 0.85rem;
  color: #e5e7eb;
}

/* CONTACTO */
.contact p {
  margin-bottom: 30px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

.whatsapp {
  background: #25D366;
  color: #ffffff;
}

.whatsapp:hover {
  opacity: 0.9;
}

.email-btn {
  background: #38bdf8;
  color: #020617;
}

.email-btn:hover {
  opacity: 0.9;
}

/* FOOTER */
footer {
  background: #020617;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

.footer-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-github:hover {
  color: #38bdf8;
}

.footer-github i {
  font-size: 1.2rem;
}

/* ANIMACIÓN */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .navbar {
    padding: 15px 25px;
  }

  .navbar nav a {
    margin-left: 12px;
    font-size: 0.85rem;
  }

  .section {
    padding: 80px 8%;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-logo {
    width: 220px;
    margin-bottom: 40px;
  }

  .org-branch {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
  }

  .org-branch .org-node {
    position: relative;
    width: 100%;
  }

  .org-branch .org-node::before {
    content: "";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: #38bdf8;
  }

  .org-branch .org-node:first-child::before {
    display: none;
  }
}