/* ============================================================
   RUBE Servicios Pedagógicos — Cassiopeia Child Template
   user.css — /templates/cassiopeia_rube/css/user.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;700;800&family=Playfair+Display:wght@700&display=swap');

/* ── Variables corporativas ── */
:root {
  --rb-primary: #e62914;
  --rb-dark:    #b81f0f;
  --rb-light:   #fdecea;
  --rb-muted:   #f9b8b2;
  --rb-text:    #1a1a1a;
  --rb-text2:   #555;
  --rb-border:  rgba(0,0,0,0.10);
  --rb-bg:      #fff;
  --rb-bg2:     #f7f7f5;
  --rb-radius:  8px;
  --rb-radiuslg:12px;
}

/* ── Reset base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif !important;
  color: var(--rb-text);
  background: var(--rb-bg2);
}

/* ── Eliminar contenedores Cassiopeia en portada ── */
.home .site-grid,
.home .grid-child,
.home #wrapper_r {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  gap: 0;
}
.home .container,
.home .container-main {
  max-width: 100% !important;
  padding: 0 !important;
}
.home main.container {
  padding: 0 !important;
}
.home main {
  margin: 0;
}

.home .site-grid .card,
.home .site-grid .card-body {
  margin: 0;
  padding: 0;
  border: none;
}


/* ── TOPBAR ── */
.container-topbar {
  background: var(--rb-dark);
}
.mod-topbar {
  padding: 6px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.mod-topbar .topbar-contact {
  color: var(--rb-muted);
  font-size: 13px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.mod-topbar .topbar-contact a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
}
.mod-topbar .topbar-contact a:hover { color: #fff; }
.mod-topbar .topbar-social {
  display: flex;
  gap: 8px;
}
.mod-topbar .topbar-social a {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}
.mod-topbar .topbar-social a:hover { background: rgba(255,255,255,0.30); }

/* ── HEADER: logo + menú en la misma fila ── */
.rube-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  background: #fff;
  border-bottom: 1px solid var(--rb-border);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
}

.rube-logo a { display: block; text-decoration: none; }
.rube-logo a img {
  height: 52px !important;
  width: auto !important;
  max-width: none !important;
  display: block;
}

.rube-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  overflow: visible;
}

.rube-nav .navbar-expand-lg {
  overflow: visible;
}

/* ── Menú de navegación ── */
.rube-nav .mod-menu,
.rube-nav .mod-menu ul {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rube-nav .mod-menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--rb-text2);
  padding: 7px 14px;
  border-radius: var(--rb-radius);
  text-decoration: none;
  display: block;
  transition: background 0.15s, color 0.15s;
}
.rube-nav .mod-menu a:hover,
.rube-nav .mod-menu .active > a {
  background: var(--rb-light);
  color: var(--rb-dark);
}

/* ── HERO ── */
.mod-hero {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
}
.mod-hero .hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.mod-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(182,24,10,0.90) 40%, rgba(182,24,10,0.40) 100%);
}
.mod-hero .hero-content {
  position: relative;
  z-index: 2;
  padding: 56px 48px;
  max-width: 620px;
}
.mod-hero .hero-badge {
  display: inline-block;
  background: rgba(255,220,100,0.22);
  color: #ffe080;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.mod-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.2;
  max-width: 460px;
}
.mod-hero .hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.88);
  margin: 0 0 28px;
  max-width: 420px;
  line-height: 1.65;
}
.mod-hero .hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.mod-hero .btn-primary {
  background: #fff;
  color: var(--rb-primary);
  border: none;
  border-radius: var(--rb-radius);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 26px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.mod-hero .btn-primary:hover { opacity: 0.9; }
.mod-hero .btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--rb-radius);
  font-size: 15px;
  font-weight: 500;
  padding: 13px 26px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  text-decoration: none;
  transition: background 0.15s;
}
.mod-hero .btn-ghost:hover { background: rgba(255,255,255,0.25); }
.mod-hero .hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.20);
  flex-wrap: wrap;
}
.mod-hero .hero-stat strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.mod-hero .hero-stat span {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 3px;
  display: block;
}

/* ── SERVICIOS ── */
.mod-servicios {
  display: flex;
  align-items: stretch;
  min-height: 360px;
  background: var(--rb-bg);
}
.mod-servicios .srv-img {
  width: 340px;
  flex-shrink: 0;
  overflow: hidden;
}
.mod-servicios .srv-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.mod-servicios .srv-content {
  flex: 1;
  padding: 48px 40px;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--rb-primary);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--rb-text);
  margin: 0 0 28px;
}
.service-list { display: flex; flex-direction: column; gap: 18px; }
.service-item { display: flex; align-items: flex-start; gap: 14px; }
.service-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--rb-light);
  color: var(--rb-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.service-item strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--rb-text);
  display: block;
  margin-bottom: 3px;
}
.service-item span {
  font-size: 13px;
  color: var(--rb-text2);
  line-height: 1.5;
}

/* ── TESTIMONIOS ── */
.mod-testimonios {
  background: var(--rb-bg2);
  padding: 48px;
  border-top: 1px solid var(--rb-border);
  border-bottom: 1px solid var(--rb-border);
}
.testimonios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.testimonial-card {
  background: var(--rb-bg);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radiuslg);
  padding: 22px 24px;
}
.stars { color: var(--rb-primary); font-size: 15px; margin-bottom: 10px; }
.testimonial-card p {
  font-size: 14px;
  color: var(--rb-text2);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 14px;
}
.t-author { display: flex; align-items: center; gap: 10px; }
.t-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--rb-light);
  color: var(--rb-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.t-author span { font-size: 13px; font-weight: 600; color: var(--rb-text); }

/* ── CONTACTO ── */
.mod-contacto {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
}
.mod-contacto .ct-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.mod-contacto .ct-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(182,24,10,0.93) 45%, rgba(182,24,10,0.65) 100%);
}
.mod-contacto .ct-content {
  position: relative;
  z-index: 2;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  width: 100%;
}
.mod-contacto h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.mod-contacto p { font-size: 14px; color: rgba(255,255,255,0.82); }
.ct-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-phone {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: var(--rb-radius);
  padding: 12px 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-phone:hover { background: rgba(255,255,255,0.25); color: #fff; }
.btn-email {
  display: inline-flex; align-items: center;
  background: #fff;
  border: none;
  border-radius: var(--rb-radius);
  padding: 12px 22px;
  color: var(--rb-primary);
  font-size: 15px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-email:hover { opacity: 0.9; color: var(--rb-primary); }

/* ── FOOTER ── */
.rube-footer {
  background: #fff;
  border-top: 1px solid var(--rb-border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.rube-footer .navbar-expand-lg {
  background: transparent;
  padding: 0;
  flex: 1;
}
.rube-footer .mod-menu.metismenu {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.rube-footer .metismenu-item a {
  font-size: 14px;
  padding: 4px 6px;
  color: var(--rb-text2);
  background: transparent;
  text-decoration: none;
}
.rube-footer .metismenu-item a:hover {
  color: var(--rb-primary);
}
.rube-footer .mod-custom {
  flex-shrink: 0;
}

/* ── PÁGINAS INTERIORES ── */
.container-component {
  padding: 2rem 48px;
  max-width: 900px;
  margin: 0 auto;
}
.container-component h1,
.container-component h2,
.container-component h3 {
  font-family: 'Playfair Display', serif;
  color: var(--rb-text);
}
.container-component a {
  color: var(--rb-primary);
}

/* Formulario de contacto */
.com-contact__form .btn-primary,
.contact .btn-primary {
  background-color: var(--rb-primary);
  border-color: var(--rb-primary);
  color: #fff;
}
.com-contact__form .btn-primary:hover,
.contact .btn-primary:hover {
  background-color: var(--rb-dark);
  border-color: var(--rb-dark);
}

/* Imagen de artículos */
figure.item-image {
  margin-left: -48px;
  margin-right: -48px;
  margin-bottom: 2rem;
}
figure.item-image img {
  width: 100%;
  max-width: none;
  height: 300px;
  object-fit: cover;
  object-position: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .mod-topbar { padding: 6px 16px; }
  .rube-header {
    padding: 10px 16px;
    position: relative;
    overflow: visible;
  }
  .rube-nav,
  .rube-nav .navbar-expand-lg {
    position: relative;
    overflow: visible;
  }
  .mod-hero .hero-content { padding: 36px 20px; }
  .mod-hero h1 { font-size: 28px; }
  .mod-hero .hero-stats { gap: 20px; }
  .mod-servicios { flex-direction: column; }
  .mod-servicios .srv-img { width: 100%; height: 220px; }
  .mod-servicios .srv-content { padding: 28px 20px; }
  .mod-testimonios { padding: 32px 16px; }
  .testimonios-grid { grid-template-columns: 1fr; }
  .mod-contacto .ct-content { padding: 28px 16px; }
  .rube-footer { padding: 16px; }
  .container-component { padding: 1.5rem 20px; }
  figure.item-image { margin-left: -20px; margin-right: -20px; }

  /* Menú móvil */
  .rube-nav .navbar-collapse {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--rb-border);
    padding: 0 24px;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  }
  .rube-nav .navbar-collapse.collapse.show .mod-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  .rube-nav .navbar-collapse.collapse.show .mod-menu li {
    width: 100% !important;
  }
  .rube-nav .navbar-collapse.collapse.show .mod-menu a {
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--rb-border);
    color: var(--rb-text2);

    text-align: left;
    padding: 14px 16px;
    border-radius: 0;
  }
  .rube-nav .navbar-collapse.collapse.show .mod-menu a:hover {
    color: var(--rb-primary);
    background: var(--rb-light);
  }

  .rube-nav .navbar-collapse.collapse.show .mod-menu .active > a {
    background: var(--rb-light);
    color: var(--rb-dark);
  }

  .rube-nav .navbar-collapse .mod-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .rube-nav .navbar-collapse .mod-menu li {
    width: 100%;
  }

  .rube-nav .navbar-collapse .mod-menu a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 0;
    border-bottom: 1px solid var(--rb-border);
    text-align: left;
    color: var(--rb-text2);
  }
  
  /* Botón hamburguesa */
  .rube-nav .navbar-toggler {
    border: 1px solid var(--rb-border);
    border-radius: var(--rb-radius);
    padding: 6px 10px;
    background: transparent;
    cursor: pointer;
  }
  .rube-nav .navbar-toggler-icon {
    background-image: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
  }
  .rube-nav .navbar-toggler-icon::before {
    content: '☰';
    font-size: 20px;
    color: var(--rb-text);
    line-height: 1;
  }
}