/* === CONFIGURACIÓN GENERAL === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  color: #000;
  background: #fff;
  line-height: 1.6;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
}

/* ------------------------------------------------------
   3. HEADER (Adaptado a tu etiqueta <header>)
------------------------------------------------------ */
.header {
  background: rgba(255, 255, 255, 1);
  border-bottom: 1px solid #e6e6e6;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center; 
  gap: 0.5rem; 
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.logo-img {
  max-width: 80px;
  height: auto;
  border-radius: 50px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: black;
  font-weight: 500;
}

.nav a.btn {
    color: #ffffff !important;
}

.header-item {
  position: relative;
  cursor: pointer;
  color: #454545;
  font-weight: 500;
  transition: color 0.3s;
}

.header-item::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 50%;
  background-color: #7042BF;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.header-item:hover {
  color: #7042BF;
}

.header-item:hover::after {
  width: 100%;
}

.btn {
  background: black;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.btn:hover {
  background: #7042bf;
}

/* === DROPDOWN === */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 150px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
}

.dropdown-content a:hover {
  background-color: #f0f0f0;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* === HAMBURGUESA === */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 22px;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #000;
  border-radius: 2px;
  transition: all 0.3s;
}

/* === HERO === */
.hero img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  margin-top: 8%;
}

/* ------------------------------------------------------
   5. GRID DE SERVICIOS (Adaptado de .cards)
------------------------------------------------------ */
.servicios {
    /* Mismas propiedades que .cards en Main */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    width: 90%;
    max-width: 1280px;
    margin: 0 auto 80px auto; /* Margen inferior */
}

/* ------------------------------------------------------
   6. TARJETAS (Adaptado de .card)
------------------------------------------------------ */
.card {
    /* Mismas propiedades que .card en Main */
    padding: 32px;
    border-radius: 18px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    background: #fff;
    transition: var(--transition);
    border: 1px solid #f0f0f0; /* Borde sutil */
    
    /* Flex para alinear el botón siempre abajo */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #000;
}

.card p {
    font-size: 1rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* ------------------------------------------------------
   7. BOTONES (Adaptado de .btn)
------------------------------------------------------ */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    background: #000; /* Botón negro */
    color: #fff;
    align-self: center;
}

.btn:hover {
    background: var(--accent-color); /* Morado al hover */
    transform: translateY(-2px);
}

/* ------------------------------------------------------
   8. FOOTER (Estilo oscuro de Main)
------------------------------------------------------ */
/* Como tu HTML tiene un footer simple <p>, lo estilizamos
   como la barra inferior del footer de Main */

footer {
    background-color: #222;
    color: #888;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    border-top: 4px solid #0056b3; /* Línea azul corporativa */
    margin-top: auto; /* Empuja el footer al final */
}

footer p {
    margin: 0;
}

/* ------------------------------------------------------
   9. RESPONSIVE
------------------------------------------------------ */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h2 {
        font-size: 26px;
    }
}