/* ===== CONFIGURACIÓN GENERAL ===== */
html {
    scroll-behavior: smooth; /* Scroll suave */
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f4f6f9;
    color: #333;
}

/* ===== HEADER ===== */
header {
    background: url('../img/titulo.jpg') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 25px;
    font-size: 24px;
    letter-spacing: 1px;
}

/* ===== NAVBAR ===== */
nav {
    background-color: #111;
    position: sticky; /* Se queda arriba al hacer scroll */
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    text-align: center;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    transition: 0.3s;
}

nav a:hover {
    color: #0d6efd;
}

/* ===== SECCIÓN INICIO ===== */
#inicio {
    background: url('../img/inicio.jpg') no-repeat center center/cover;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    color: white;
    text-align: center;
    position: relative;
}

/* Capa oscura encima de la imagen */
#inicio::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

/* Contenido encima */
#inicio h2,
#inicio p {
    position: relative;
    z-index: 1;
}

#inicio h2 {
    font-size: 42px;
    margin-bottom: 10px;
}

#inicio p {
    font-size: 20px;
    max-width: 600px;
}

/* ===== SECCIONES GENERALES ===== */
section {
    padding: 60px 20px;
    text-align: center;
}

#servicios {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: auto;
}
.card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: 0.3s;
}
.card:hover {
    transform: translateY(-8px);
}
.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.card .contenido {
    padding: 20px;
}
.card h3 {
    margin-bottom: 10px;
}

/* ===== ASESORÍA ===== */
#asesoria {
    background: url('../img/asesoramiento.jpg') no-repeat center center/cover;
    padding: 100px 40px;
    position: relative;
    color: white;
    font-family: 'Poppins', 'Segoe UI', sans-serif; /* 🔥 fuente más moderna */
}

/* capa oscura bien controlada */
#asesoria::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

/* contenido visible encima */
.contenedor-asesoria {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: auto;
}

/* TEXTO */
.texto {
    max-width: 600px;
}

.texto h2 {
    font-size: 36px;
    font-weight: 800; /* 🔥 más grueso */
    margin-bottom: 15px;
}

.texto p {
    font-size: 20px;
    font-weight: 500;
}

.texto h3 {
    margin-top: 25px;
    font-size: 24px;
    font-weight: 700;
    color: #60a5fa; /* azul elegante */
}

.texto ul {
    margin-top: 15px;
    font-size: 20px;
    font-weight: 600;
}

/* BOTONES */
.botones {
    margin-top: 30px;
}

/* botón principal */
.btn-primary {
    background: #0d6efd;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #0b5ed7;
}

/* botón secundario */
.btn-secondary {
    border: 2px solid #0d6efd;
    padding: 14px 28px;
    border-radius: 8px;
    color: #0d6efd;
    text-decoration: none;
    margin-left: 10px;
    font-weight: 700;
    display: inline-block;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: #0d6efd;
    color: white;
}


/* ===== BLOG ===== */
.blog {
  padding: 80px 5%;
  background: #f5f7fa;
}

.blog h2 {
  text-align: center;
  font-size: 2.5rem;
}

.subtitulo {
  text-align: center;
  margin-bottom: 40px;
  color: #2c5aa0;
  font-size: 1.3rem;
}

/* GRID */
.blog-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  align-items: start; /* clave */
}

/* IZQUIERDA */
.blog-content img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
}

.blog-content p {
  text-align: center;
  color: #555;
  margin-bottom: 20px;
}

.blog-content h3 {
  text-align: center;
  margin-top: 30px;
  font-weight: 500;
}

/* DERECHA */
.blog-sidebar {
  position: sticky;
  top: 100px; /*  esto hace que quede fija visualmente */
}

/* CAJAS */
.box {
  margin-bottom: 40px;
}

.box h4 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

/* LISTA */
.box ul {
  list-style: none;
  padding: 0;
}

.box li {
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

/* TEXTO */
.autor {
  font-size: 12px;
  color: gray;
  text-align: center;
}

.box h5 {
  text-align: center;
  color: #2c5aa0;
  margin: 10px 0;
}

.box p {
  font-size: 13px;
  text-align: center;
  color: #666;
}

.box hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 20px 0;
}

/* ===== CONTACTO ===== */
#contacto.contacto {
  padding: 40px;
  text-align: center;

  background-image: url("../img/contactos.jpg");
  background-size: cover;

  color: black; /* para que el texto se vea */
}

.contacto h2 {
  margin-bottom: 10px;
}

.contacto form {
  max-width: 400px;
  margin: auto;
  display: flex;
  flex-direction: column;
}

.contacto input,
.contacto textarea {
  margin: 8px 0;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contacto button {
  background: #6c63ff;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
}

.contacto button:hover {
  background: #574fd6;
}

.info {
  margin-top: 15px;
  font-size: 14px;
}

/* ===== FOOTER ===== */
footer {
    background-color: #111;
    color: white;
    text-align: center;
    padding: 15px;
}