/* =========================================

   Archivo: main.css

   Objetivo: Estilos base del sitio

   ========================================= */



:root {

    --color-primario: #0a58ca;

    --color-secundario: #1c1f23;

    --color-fondo: #f7f9fb;

    --color-texto: #333;

    --color-blanco: #fff;

}



/* =========================================
   RESETEO DE INGENIERÍA (Fix Espacio Derecha)
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box; /* El padding ya no suma ancho */
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* MATA EL SCROLL HORIZONTAL DEFINITIVAMENTE */
    position: relative;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased; /* Mejora legibilidad */
}



/* Wrapper para contenido + footer */

.page-wrapper {

    min-height: 100vh;

    display: flex;

    flex-direction: column;

}



.page-content {

    flex: 1;

}



/* Contenedor genérico */

/* Ajuste al contenedor para que sea exacto */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}



/* Botón principal */

.btn-principal {

    background: var(--color-primario);

    color: var(--color-blanco);

    padding: 12px 24px;

    border-radius: 999px;

    text-decoration: none;

    font-weight: 600;

    transition: 0.25s ease;

    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);

    border: none;

    display: inline-flex;

    align-items: center;

    gap: 8px;

}



.btn-principal:hover {

    background: #0047b3;

    transform: translateY(-1px);

    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.25);

}



/* Botón secundario */

.btn-secundario {

    background: #ffffff;

    color: var(--color-primario);

    padding: 11px 22px;

    border-radius: 999px;

    text-decoration: none;

    font-weight: 600;

    border: 1px solid rgba(15, 23, 42, 0.12);

    transition: 0.25s ease;

    display: inline-flex;

    align-items: center;

    gap: 6px;

}



.btn-secundario:hover {

    background: #e0edff;

}



/* Botón tipo link */

.btn-link {

    text-decoration: none;

    color: var(--color-primario);

    font-weight: 500;

    margin-left: 12px;

}



.btn-link:hover {

    text-decoration: underline;

}



/* Sección de inicio / hero */

.inicio {

    padding: 90px 20px 70px;

}



.hero-grid {

    display: grid;

    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);

    gap: 40px;

    align-items: center;

}



/* Izquierda */

.hero-left .hero-tagline {

    font-size: 0.95rem;

    text-transform: uppercase;

    letter-spacing: 1.4px;

    color: #64748b;

    margin-bottom: 10px;

}



.hero-title {

    font-size: 2.4rem;

    line-height: 1.2;

    margin: 0 0 14px;

    color: #111827;

}



.hero-subtitle {

    font-size: 1.05rem;

    line-height: 1.6;

    color: #4b5563;

    margin-bottom: 18px;

}



.hero-badges {

    list-style: none;

    padding: 0;

    margin: 0 0 24px;

    color: #374151;

}



.hero-badges li {

    margin-bottom: 6px;

}



/* Botones */

.hero-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    align-items: center;

    margin-bottom: 16px;

}



.hero-mini {

    font-size: 0.9rem;

    color: #6b7280;

    display: flex;

    align-items: center;

    gap: 6px;

}



/* Derecha: tarjeta tecnológica */

.hero-right {

    display: flex;

    justify-content: center;

}



.hero-card {

    background: radial-gradient(circle at top left, #1d4ed8, #0f172a);

    border-radius: 24px;

    padding: 24px 20px;

    color: #e5e7eb;

    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.6);

    max-width: 360px;

    text-align: center;

}



.hero-logo {

    width: 130px;

    height: 130px;

    border-radius: 50%;

    background: #ffffff;

    padding: 10px;

    margin-bottom: 12px;

}



.hero-card h2 {

    margin: 0 0 8px;

    font-size: 1.35rem;

}



.hero-card p {

    font-size: 0.98rem;

    margin-bottom: 14px;

}



.hero-card-list {

    list-style: none;

    padding: 0;

    margin: 0 0 16px;

    text-align: left;

    font-size: 0.95rem;

}



.hero-card-list li {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 6px;

}



.hero-whatsapp {

    width: 100%;

    justify-content: center;

}



/* Toast (usado por WhatsApp JS) */

.toast {

    position: fixed;

    bottom: 20px;

    right: 20px;

    background: #16a34a;

    color: #fff;

    padding: 10px 16px;

    border-radius: 999px;

    display: flex;

    align-items: center;

    gap: 8px;

    opacity: 0;

    transform: translateY(10px);

    transition: opacity 0.25s ease, transform 0.25s ease;

    z-index: 2000;

    font-size: 0.9rem;

}



.toast.show {

    opacity: 1;

    transform: translateY(0);

}



/* Responsive */

@media (max-width: 900px) {

    .hero-grid {

        grid-template-columns: 1fr;

        text-align: left;

    }



    .hero-right {

        order: -1;

    }



    .inicio {

        padding-top: 80px;

    }

}

/* Mejora para que los círculos no se salgan en pantallas pequeñas */
@media (max-width: 1200px) {
    .home-hero-media::before, 
    .home-hero-media::after {
        opacity: 0.5; /* Los hace más sutiles si se amontonan */
        right: -50px; /* Los empuja un poco más afuera pero el overflow:hidden los corta */
    }
}


/* ================================
   BLOG (listado y detalle)
   ================================ */

.blog-listado {
    padding: 60px 0;
    background: var(--color-fondo);
}

.blog-listado .titulo-seccion {
    text-align: center;
    margin-bottom: 8px;
}

.blog-listado .subtitulo-seccion {
    text-align: center;
    margin-bottom: 32px;
    color: #555;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.blog-card {
    background: var(--color-blanco);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.08);
}

.blog-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-cat {
    display: inline-block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-primario);
    font-weight: 600;
}

.blog-title {
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0;
}

.blog-title a {
    color: var(--color-secundario);
    text-decoration: none;
}

.blog-title a:hover {
    text-decoration: underline;
}

.blog-extracto {
    font-size: 0.92rem;
    color: #555;
    margin: 0 0 8px;
}

.btn-blog {
    margin-top: auto;
    align-self: flex-start;
    font-size: 0.9rem;
    border: none;
    background: transparent;
    color: var(--color-primario);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

/* Detalle */

.blog-detalle {
    padding: 50px 0 70px;
}

.blog-cat-detalle {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primario);
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-titulo {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--color-secundario);
}

.blog-fecha {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 18px;
}

.blog-img-detalle {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 24px;
}

.blog-contenido {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-texto);
}

.blog-contenido h2,
.blog-contenido h3 {
    margin-top: 24px;
    margin-bottom: 10px;
    color: var(--color-secundario);
}

.blog-contenido ul,
.blog-contenido ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.blog-contenido p {
    margin-bottom: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .home-hero-title { font-size: 2rem; }
    .home-cards--ritze { margin-top: 0; padding-top: 40px; }
}


/* =========================================
   HOME PRO STYLE (Ritzé Moderno)
   ========================================= */

/* --- 1. HERO SECTION --- */
.home-hero--ritze {
    position: relative;
    width: 100%;
    min-height: 600px; /* Altura imponente */
    background-color: #0b1f2a; /* Fondo de carga oscuro */
    display: flex;
    align-items: center;
    overflow: hidden;
}

.home-hero-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}

/* El Texto encima */
.home-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
    color: #fff; /* Texto blanco */
}

.home-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); /* Sombra para legibilidad */
}

.home-hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
    font-weight: 300;
}

/* Botón del Hero */
.home-hero-cta {
    display: inline-block;
    padding: 15px 40px;
    background-color: #F2A900; /* Naranja Ritzé */
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(242, 169, 0, 0.4);
}

.home-hero-cta:hover {
    background-color: #d49300;
    transform: translateY(-3px);
}

/* La imagen de fondo */
.home-hero-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.home-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar todo */
    opacity: 0.6; /* Oscurece la imagen para que el texto resalte */
}

/* círculo amarillo detrás */
.home-hero-media::before{
  content: "";
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: #f4b000;
  z-index: 1;
}

/* curva azul tipo “arco” */
.home-hero-media::after{
  content: "";
  position: absolute;
  right: 260px;
  top: 80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 2px solid rgba(86, 122, 255, .55);
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(18deg);
  z-index: 0;
}

/* =========================
   Cards tipo Ritzé
   ========================= */

.home-cards--ritze {
    position: relative;
    z-index: 3;
    margin-top: -60px; /* Efecto flotante sobre el hero */
    padding-bottom: 60px;
}

.home-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.home-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 4px solid transparent; /* Preparar borde */
    
    /* MAGIA: Usamos la variable PHP aquí */
    border-top: 5px solid var(--card-color, #F2A900);
    position: relative;
    overflow: hidden;
}

.home-card::before{
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 18px; /* barra oscura lateral */
  background: rgba(0,0,0,.18);
}

.home-card-inner{
  padding: 26px 22px 22px 34px;
  color: #fff;
}

/* Icono con el color dinámico */
.home-card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    color: var(--card-color, #F2A900); /* Usa el color de la BD */
}

.home-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #0b1f2a;
}

.home-card-desc {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

/* =========================
   Responsive (básico)
   ========================= */
@media (max-width: 992px){
  .home-hero-grid{ grid-template-columns: 1fr; }
  .home-hero-media{ min-height: 320px; }
  .home-hero-img{ margin: 0 auto; max-width: 520px; }
  .home-hero-media::before{ right: 50%; transform: translate(50%, -50%); }
  .home-hero-media::after{ right: 52%; }
  .home-cards-grid{ grid-template-columns: 1fr; }
  .home-cards--ritze{ margin-top: -40px; }
}

/* --- Estilo de Lectura para Carreras --- */
.carrera-section__html, .item-text {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.8;
    hyphens: auto; /* Divide palabras con guiones si es necesario */
}

/* Contenedor del Título con Icono y Barra Lateral */
.carrera-section__head {
    display: flex;
    align-items: center; /* Alineación vertical perfecta */
    gap: 15px;            /* Espacio entre icono y texto */
    margin: 40px 0 20px 0;
    
    /* La barra oscura lateral de la izquierda */
    border-left: 6px solid #0b1f2a; 
    padding: 5px 0 5px 20px;
}

/* El Icono Dorado */
.section-main-icon {
    font-size: 32px;      /* Tamaño destacado */
    color: #f4b000;       /* El amarillo/oro característico */
    display: flex;
    align-items: center;
}

.carrera-section__head h2 {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    color: #0b1f2a;
    margin: 0;
    letter-spacing: -0.5px;
}