/* ============================================================
   CTSP Ayacucho — Re-skin institucional (Trabajadores Sociales)
   Sobrescribe la paleta del tema base al azul institucional.
   ============================================================ */
:root {
  --ctsp-primary: #1d63b3;
  --ctsp-accent: #2e8bd6;
  --ctsp-dark: #0f2e57;
  --ctsp-soft: #f5f8fc;
}

body {
  color: #43536b;
}

/* ---- Botones ---- */
.boxed-btn3,
.boxed-btn3-white-2,
button.boxed-btn3,
.genric-btn,
.bttn {
  background: linear-gradient(to right, var(--ctsp-primary) 0%, var(--ctsp-accent) 100%) !important;
  color: #fff !important;
  border-radius: 30px !important;
  box-shadow: 0 6px 18px rgba(29, 99, 179, 0.28);
  transition: all .3s ease;
}

.boxed-btn3:hover,
.boxed-btn3-white-2:hover,
button.boxed-btn3:hover {
  background: var(--ctsp-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 46, 87, 0.32);
}

.boxed-btn3-white {
  background: #fff !important;
  color: var(--ctsp-primary) !important;
  border-radius: 30px !important;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.boxed-btn3-white:hover {
  background: var(--ctsp-dark) !important;
  color: #fff !important;
}

/* ---- Títulos de sección ---- */
.section_title h3 {
  color: var(--ctsp-dark) !important;
  font-weight: 700 !important;
}

.section_title h3::before,
.section_title span::before {
  background: linear-gradient(90deg, var(--ctsp-primary), var(--ctsp-accent)) !important;
  height: 3px !important;
  width: 60px !important;
  border-radius: 3px;
}

.section_title p {
  color: #6b7a90 !important;
}

/* ---- Breadcrumb (cabecera de páginas internas) ---- */
.bradcam_overlay::before {
  background: linear-gradient(120deg, rgba(15, 46, 87, 0.85) 0%, rgba(29, 99, 179, 0.78) 55%, rgba(46, 139, 214, 0.55) 100%) !important;
  opacity: 1 !important;
}

.bradcam_area h3 {
  font-weight: 700 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.bradcam_text p a,
.bradcam_text p {
  color: #eaf2fb !important;
}

/* ---- Enlaces / acentos ---- */
a {
  color: var(--ctsp-primary);
  transition: color .25s ease;
}

a:hover {
  color: var(--ctsp-dark);
  text-decoration: none;
}

/* ---- Acentos de color de marca antiguos -> institucional ---- */
.text-info,
.skyblue,
.color-skyblue {
  color: var(--ctsp-primary) !important;
}

.single_service .icon i,
.single_offers .icon i,
.single_feature .icon i {
  color: var(--ctsp-primary) !important;
}

/* ---- Tarjetas: sombras más suaves y modernas ---- */
.single_service,
.single_offers,
.single_news,
.blog_left_sidebar .single-post,
.single_member,
.card,
.single_course {
  border-radius: 14px !important;
  box-shadow: 0 10px 30px rgba(15, 46, 87, 0.08) !important;
  transition: transform .3s ease, box-shadow .3s ease;
  border: none !important;
}

.single_service:hover,
.single_offers:hover,
.single_news:hover,
.single_member:hover,
.single_course:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(29, 99, 179, 0.16) !important;
}

/* ---- Tipografía general más limpia ---- */
h1,
h2,
h3,
h4,
h5 {
  font-family: "Poppins", "Segoe UI", sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
}

/* ---- Footer institucional ---- */
.footer-area,
.footer_top {
  background: var(--ctsp-dark) !important;
}

.copy-right_text,
.footer_bottom {
  background: #0a2143 !important;
}

.footer_top {
  padding-top: 60px !important;
}

.footer_logo_section {
  margin-bottom: 32px !important;
}

.footer_logo_link {
  gap: 18px !important;
  align-items: center !important;
}

.footer_logo_img {
  width: 160px !important;
  height: 80px !important;
  padding: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
}

.footer_logo_text {
  padding-right: 8px;
}

.footer_logo_text h3 {
  font-size: 17px !important;
  line-height: 1.35 !important;
}

/* ---- Header azul marino institucional (prioridad, resiliente) ---- */
#sticky-header.main-header-area,
.header-area .main-header-area,
.main-header-area {
  background: linear-gradient(135deg, #0f2e57 0%, #16365f 100%) !important;
}

#navigation>li>a {
  color: #ffffff !important;
}

#navigation>li>a:hover,
#navigation>li>a.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

#navigation>li>a i.ti-angle-down {
  color: #cfe0f5 !important;
}

/* ---- Marca del header (el logo ya contiene el nombre) ---- */
.logo-img {
  max-width: 160px !important;
  height: auto;
  filter: none !important;
}

@media (max-width: 991px) {
  .logo-img {
    max-width: 120px !important;
  }
}

@media (max-width: 480px) {
  .logo-img {
    max-width: 90px !important;
  }
}

.logo-brand {
  display: none !important;
}

/* ---- Texto sobre el carrusel del inicio (banners con título/subtítulo) ---- */
.single_slider { position: relative; }
.single_slider.ctsp-slider-overlay::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(8,28,58,.86) 0%, rgba(13,42,80,.62) 42%, rgba(15,46,87,.20) 72%, rgba(15,46,87,0) 100%);
}
.single_slider .ctsp-slider-text {
  position: relative; z-index: 2;
  padding: 28px 30px 28px 34px;
}
/* barra de acento a la izquierda */
.ctsp-slider-text::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 6px; border-radius: 6px;
  background: linear-gradient(180deg, #36a0e0, #1d63b3);
  box-shadow: 0 0 18px rgba(46,139,214,.7);
}
.ctsp-slider-text h3 {
  color: #fff !important; font-weight: 800; font-size: 58px; line-height: 1.08;
  letter-spacing: -.5px; text-shadow: 0 6px 26px rgba(0,0,0,.55); margin: 0 0 16px;
}
.ctsp-slider-text p {
  color: #dfeaf7; font-size: 21px; font-weight: 400; line-height: 1.55;
  text-shadow: 0 2px 14px rgba(0,0,0,.5); margin: 0 0 28px; max-width: 600px;
}
.ctsp-slider-text .boxed-btn3 { padding: 14px 38px !important; font-size: 15px; }

/* contenido de texto enriquecido (Summernote) del banner; los estilos inline
   que aplique el usuario (color, tamaño) tienen prioridad sobre estas reglas */
.ctsp-slider-text .ctsp-slider-richtext {
  color: #fff; font-size: 22px; line-height: 1.45; margin: 0 0 18px; max-width: 760px;
  text-shadow: 0 4px 20px rgba(0,0,0,.55);
}
.ctsp-slider-text .ctsp-slider-richtext p { color: #fff; margin: 0 0 10px; }
.ctsp-slider-text .ctsp-slider-richtext h1,
.ctsp-slider-text .ctsp-slider-richtext h2,
.ctsp-slider-text .ctsp-slider-richtext h3,
.ctsp-slider-text .ctsp-slider-richtext h4 {
  color: #fff; font-weight: 800; line-height: 1.1; margin: 0 0 12px;
  text-shadow: 0 6px 26px rgba(0,0,0,.55);
}
.ctsp-slider-text .ctsp-slider-richtext a { color: #9bd0ff; text-decoration: underline; }
.ctsp-slider-text .ctsp-slider-richtext ul,
.ctsp-slider-text .ctsp-slider-richtext ol { margin: 0 0 14px; padding-left: 22px; }

/* animación de entrada del texto en la diapositiva activa */
@keyframes ctspSlideIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.slider_active .owl-item.active .ctsp-slider-text::before { animation: ctspSlideIn .6s ease both; }
.slider_active .owl-item.active .ctsp-slider-text h3,
.slider_active .owl-item.active .ctsp-slider-text .ctsp-slider-richtext { animation: ctspSlideIn .7s ease .12s both; }
.slider_active .owl-item.active .ctsp-slider-text p { animation: ctspSlideIn .7s ease .26s both; }
.slider_active .owl-item.active .ctsp-slider-text .boxed-btn3 { animation: ctspSlideIn .7s ease .40s both; }

@media (max-width: 991px){ .ctsp-slider-text h3 { font-size: 42px; } }
@media (max-width: 767px){ .ctsp-slider-text { padding: 20px 18px; } .ctsp-slider-text h3 { font-size: 30px; } .ctsp-slider-text p { font-size: 16px; } }
@media (max-width: 480px){ .ctsp-slider-text h3 { font-size: 22px; } .ctsp-slider-text p { font-size: 14px; margin-bottom: 16px; } }

/* ============================================================
   MENÚ MÓVIL (SlickNav) — Colores institucionales
   ============================================================ */

/* El header es el contenedor de referencia para el dropdown */
.main-header-area {
  position: relative;
}

/* ============================================================
   MENÚ HAMBURGUESA MÓVIL PERSONALIZADO
   ============================================================ */

/* Botón hamburguesa */
.ctsp-ham-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  cursor: pointer;
  padding: 6px;
  gap: 5px;
  transition: background 0.3s, border-color 0.3s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.ctsp-ham-btn:hover,
.ctsp-ham-btn:focus {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.85);
}

.ctsp-ham-bar {
  display: block;
  width: 24px;
  height: 3px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animación X cuando está activo */
.ctsp-ham-btn.ctsp-active .ctsp-ham-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.ctsp-ham-btn.ctsp-active .ctsp-ham-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.ctsp-ham-btn.ctsp-active .ctsp-ham-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Panel de navegación móvil */
.ctsp-mobile-nav {
  background: #0d2847;
  width: 100%;
  z-index: 9999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s ease, box-shadow 0.38s ease;
  box-shadow: none;
}

.ctsp-mobile-nav.ctsp-open {
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(13, 40, 71, 0.55);
}

/* Lista principal */
.ctsp-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 8px 0 16px;
}

.ctsp-mobile-menu > li {
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ctsp-mobile-menu > li:last-child {
  border-bottom: none;
}

.ctsp-mobile-menu > li > a {
  display: block;
  color: #dbeeff;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 20px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.ctsp-mobile-menu > li > a:hover {
  background: rgba(46, 139, 214, 0.18);
  color: #ffffff;
}

.ctsp-mobile-menu > li > a i:first-child {
  width: 22px;
  text-align: center;
  margin-right: 8px;
  color: #6ab4f5;
}

/* Botón de submenú */
.ctsp-sub-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
  color: #dbeeff;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 20px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s;
  outline: none;
}

.ctsp-sub-toggle:hover {
  background: rgba(46, 139, 214, 0.18);
  color: #ffffff;
}

.ctsp-sub-toggle i:first-child {
  width: 22px;
  text-align: center;
  margin-right: 8px;
  color: #6ab4f5;
}

.ctsp-arrow {
  margin-left: auto;
  font-size: 13px;
  transition: transform 0.3s ease;
  color: rgba(255,255,255,0.5);
}

/* Submenú colapsable */
.ctsp-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.2);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.ctsp-submenu.ctsp-sub-open {
  max-height: 400px;
}

.ctsp-submenu li a {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  padding: 10px 20px 10px 50px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.ctsp-submenu li a:hover {
  background: rgba(46, 139, 214, 0.2);
  color: #ffffff;
}

/* ============================================================
   RESPONSIVE GLOBAL — Mejoras para móvil y tablet
   ============================================================ */

/* --- Imágenes responsivas (solo dentro de contenedores de página) --- */
.container img,
.container-fluid img {
  max-width: 100%;
}

/* --- Overflow de tablas --- */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

/* Texto de tabla más compacto en móvil */
@media (max-width: 576px) {
  .table {
    font-size: 13px;
  }
  .table th,
  .table td {
    padding: 8px 6px;
    white-space: normal;
    word-break: break-word;
  }
}

/* --- Sección Emergency Contact --- */
@media (max-width: 767px) {
  .Emergency_contact .single_emergency {
    padding: 50px 20px;
    text-align: center;
  }
  .Emergency_contact .single_emergency .info {
    margin-right: 0;
    margin-bottom: 20px;
  }
}

/* --- Breadcrumb responsive --- */
@media (max-width: 576px) {
  .bradcam_area {
    padding: 50px 0;
  }
  .bradcam_text h3 {
    font-size: 24px;
  }
}

/* --- Welcome section (imagen + texto) --- */
@media (max-width: 991px) {
  .welcome_thumb {
    margin-bottom: 30px;
  }
  .thumb_2 {
    display: none;
  }
}

@media (max-width: 767px) {
  .welcome_docmed_area {
    padding: 50px 0;
  }
  .welcome_docmed_info h2 {
    font-size: 22px;
  }
  .welcome_docmed_info h3 {
    font-size: 20px;
  }
}

/* --- Counter section --- */
@media (max-width: 576px) {
  .block-18 {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .block-18 .icon {
    margin-right: 0;
    margin-bottom: 8px;
  }
  .col-md-3 {
    margin-bottom: 24px;
  }
}

/* --- Carousel executive / testimony --- */
@media (max-width: 767px) {
  .expert_doctors_area,
  .ftco-section {
    padding: 50px 0;
  }
  .section_title.mb-55 {
    margin-bottom: 30px !important;
  }
}

/* --- Footer responsive extras --- */
@media (max-width: 576px) {
  .footer_widget {
    text-align: center;
  }
  .footer_widget ul li a {
    justify-content: center;
  }
  .socail_links {
    align-items: center;
  }
  .footer_logo_link {
    justify-content: center;
  }
  .copy_right {
    font-size: 12px;
  }
}

/* --- Botones responsivos --- */
@media (max-width: 480px) {
  .boxed-btn3,
  .boxed-btn3-white-2,
  .boxed-btn3-white {
    padding: 10px 22px !important;
    font-size: 14px !important;
  }
}

/* --- Formularios en móvil --- */
@media (max-width: 576px) {
  .form-control {
    font-size: 14px;
  }
  .input-group-lg .form-control,
  .input-group-lg .input-group-text {
    font-size: 14px;
    padding: 10px 14px;
  }
}

/* --- iframe mapa --- */
@media (max-width: 576px) {
  iframe {
    height: 280px !important;
  }
}

/* --- Sección de acceso rápido (page_home) --- */
@media (max-width: 576px) {
  .ctsp-access-card {
    padding: 24px 18px;
  }
  .ctsp-access-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
}

/* --- Ocultar header-top en móviles muy pequeños para ahorrar espacio --- */
@media (max-width: 480px) {
  .header-top_area {
    display: none;
  }
}

/* --- Prevenir scroll horizontal sin romper position:sticky del header --- */
body {
  overflow-x: hidden;
}

/* --- Solo imágenes y elementos dentro de container no deben desbordar --- */
.container img, .container table, .container iframe {
  max-width: 100%;
}

/* --- Owl carousel en móvil --- */
@media (max-width: 576px) {
  .owl-nav button {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }
}

/* --- Sección de noticias recientes (home) --- */
@media (max-width: 767px) {
  .our_department_area {
    padding: 50px 0;
  }
  .news_recent {
    flex-direction: column;
  }
}

/* --- Texto largo que desborda --- */
@media (max-width: 576px) {
  p, li, td, th, span, a {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* --- Paginación responsiva --- */
@media (max-width: 576px) {
  .pagination {
    flex-wrap: wrap;
    gap: 4px;
  }
  .page-link {
    padding: 6px 10px;
    font-size: 13px;
  }
}