/*
Theme Name: Liceo José Victorino Lastarria
Theme URI: https://cdsprovi.rescateweb.help/colegios/liceolastarria.cl/wp_tmp/
Author: CDS Providencia
Author URI: https://cdsprovidencia.cl
Description: Tema réplica exacta Joomla a WordPress para Liceo José Victorino Lastarria
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: liceolastarria
*/

html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

*, *:before, *:after {
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333333;
  background-color: #f7f9fa;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

/* Regla general: Las imágenes en páginas y entradas no sobrepasan el 90% del body */
.itemFullText img,
.itemView img,
.itemBody img,
.itemImageBlock img,
.single-post-content img,
.t3-content .itemBody img {
  max-width: 90% !important;
  max-width: min(90%, 90vw) !important;
  height: auto !important;
}

/* Contenedores de imagen o bloques Gutenberg dentro de entradas/páginas */
.itemFullText figure,
.itemFullText .wp-block-image,
.itemView figure,
.itemView .wp-block-image {
  max-width: 90% !important;
  max-width: min(90%, 90vw) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

a {
  color: #007799;
  text-decoration: none;
}
a:hover, a:focus {
  color: #004d66;
  text-decoration: underline;
}

/* Header Container */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid #2cd5c4;
  padding: 15px 0 10px 0;
}
.header-logo img {
  max-height: 95px;
  max-width: 100%;
  height: auto;
}
.header-search {
  padding-top: 25px;
}
.header-search .input-group {
  max-width: 300px;
  float: right;
}

/* Navigation Navbar */
.navbar-mercedes {
  background-color: #2cd5c4;
  border: none;
  border-radius: 0;
  margin-bottom: 25px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.navbar-mercedes .navbar-brand {
  display: none;
}
.navbar-mercedes .navbar-nav > li > a {
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  padding: 15px 14px;
  letter-spacing: 0.5px;
}
.navbar-mercedes .navbar-nav > li > a:hover,
.navbar-mercedes .navbar-nav > li > a:focus,
.navbar-mercedes .navbar-nav > .active > a,
.navbar-mercedes .navbar-nav > .open > a {
  background-color: #64c0cd;
  color: #ffffff;
}
.navbar-mercedes .navbar-toggle {
  border-color: #ffffff;
  background-color: #64c0cd;
}
.navbar-mercedes .navbar-toggle .icon-bar {
  background-color: #ffffff;
}

/* Dropdowns */
.navbar-mercedes .dropdown-menu {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.15);
  border-top: 3px solid #2cd5c4;
  box-shadow: 0 6px 12px rgba(0,0,0,0.175);
  padding: 5px 0;
  min-width: 260px;
}
.navbar-mercedes .dropdown-menu > li > a {
  color: #444444;
  font-size: 13px;
  padding: 8px 16px;
  font-weight: 500;
  white-space: normal;
  border-bottom: 1px solid #f0f0f0;
}
.navbar-mercedes .dropdown-menu > li:last-child > a {
  border-bottom: none;
}
.navbar-mercedes .dropdown-menu > li > a:hover {
  background-color: #f0faf9;
  color: #007799;
}
.navbar-mercedes .dropdown-submenu {
  position: relative;
}
.navbar-mercedes .dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
}
.navbar-mercedes .dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

/* Main Layout */
.site-main-container {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 25px 20px 40px 20px;
  margin-bottom: 40px;
  min-height: 600px;
}

/* Sidebars */
.t3-sidebar {
  padding: 0 10px;
}
.t3-sidebar-1 img, .t3-sidebar-2 img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 12px auto;
  border-radius: 4px;
  transition: transform 0.2s ease;
}
.t3-sidebar-1 img:hover, .t3-sidebar-2 img:hover {
  transform: scale(1.02);
}
.t3-sidebar table {
  width: 100% !important;
}

/* Center Content & News */
.t3-content {
  padding: 0 15px;
}
.section-heading {
  border-bottom: 2px solid #2cd5c4;
  padding-bottom: 8px;
  margin-top: 0;
  margin-bottom: 22px;
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  text-transform: uppercase;
}

/* News List Item (mod_jasidenews style) */
.news-item-card {
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 20px;
  margin-bottom: 20px;
  overflow: hidden;
}
.news-item-card:last-child {
  border-bottom: none;
}
.news-item-thumb {
  float: left;
  margin-right: 18px;
  max-width: 180px;
}
.news-item-thumb img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e1e4e8;
  display: block;
}
.news-item-body {
  overflow: hidden;
}
.news-item-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px 0;
  line-height: 1.3;
}
.news-item-title a {
  color: #2c3e50;
}
.news-item-title a:hover {
  color: #007799;
}
.news-item-meta {
  color: #888888;
  font-size: 12px;
  margin-bottom: 10px;
}
.news-item-meta i {
  margin-right: 4px;
}
.news-item-excerpt {
  color: #555555;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 10px;
  text-align: justify;
}
.btn-read-more {
  background-color: #4a4aad;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 3px;
  display: inline-block;
  float: right;
  text-decoration: none !important;
  transition: background-color 0.2s ease;
}
.btn-read-more:hover {
  background-color: #3b3b8c;
}

/* Single Post & Page View */
.single-post-title {
  font-size: 26px;
  font-weight: 700;
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 12px;
  border-bottom: 2px solid #2cd5c4;
  padding-bottom: 10px;
}
.single-post-meta {
  color: #888888;
  font-size: 12.5px;
  margin-bottom: 20px;
}
.single-featured-image {
  margin-bottom: 25px;
  text-align: center;
}
.single-featured-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.single-post-content {
  font-size: 14.5px;
  line-height: 1.7;
  color: #333333;
}
.single-post-content img,
.itemFullText img {
  max-width: 90% !important;
  max-width: min(90%, 90vw) !important;
  height: auto !important;
}

/* ==========================================================================
   Responsive Tables (Scroll horizontal en la tabla y nunca en el body)
   ========================================================================== */

/* Contenedor responsivo para tablas */
.table-responsive-wrapper {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin-top: 15px;
  margin-bottom: 25px;
  clear: both;
}

/* Scrollbar estilizado en la tabla */
.table-responsive-wrapper::-webkit-scrollbar {
  height: 6px;
}
.table-responsive-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.table-responsive-wrapper::-webkit-scrollbar-thumb {
  background: #2cd5c4;
  border-radius: 3px;
}
.table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
  background: #20b0a0;
}

/* Tablas dentro del contenedor responsivo: mantienen su estructura tabular completa */
.table-responsive-wrapper > table {
  display: table !important;
  max-width: none !important;
  margin-bottom: 0 !important;
  height: auto !important;
}

/* Si una tabla contiene imágenes en sus celdas, permitir que se adapten a la celda */
.table-responsive-wrapper table img {
  max-width: 90% !important;
  height: auto !important;
  display: inline-block;
}

/* Regla directa para tablas en entradas/páginas (fallback) */
.itemFullText table,
.itemView table,
.single-post-content table,
.t3-content table:not(.no-responsive) {
  max-width: 100%;
  border-collapse: collapse;
}

.itemFullText > table,
.itemView > table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  height: auto !important;
}

/* Pagination */
.pagination-wrapper {
  text-align: center;
  margin-top: 25px;
}
.pagination-wrapper .page-numbers {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 3px;
  border: 1px solid #dcdcdc;
  background: #ffffff;
  color: #333333;
  border-radius: 3px;
  text-decoration: none;
}
.pagination-wrapper .page-numbers.current {
  background-color: #2cd5c4;
  color: #ffffff;
  border-color: #2cd5c4;
}
.pagination-wrapper .page-numbers:hover:not(.current) {
  background-color: #f0f0f0;
}

/* Footer */
.t3-footer {
  border-top: 3px solid #25b9aa;
  background: #2cd5c4;
  color: #333333;
  padding: 35px 0 25px 0;
  font-size: 13px;
}
.t3-footer a {
  color: #0d4b57;
  text-decoration: underline;
}
.t3-footer a:hover {
  color: #05262c;
}
.footer-box {
  margin-bottom: 20px;
}
.footer-box h4 {
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 14px;
  color: #000000;
  margin-top: 10px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.footer-box p {
  margin: 0 0 6px 0;
  line-height: 1.4;
}
.footer-logo {
  margin-bottom: 10px;
}
.footer-logo img {
  max-height: 80px;
  width: auto;
}
.t3-copyright {
  background: #20b0a0;
  color: #ffffff;
  text-align: center;
  padding: 12px 0;
  font-size: 12.5px;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .header-search {
    padding-top: 10px;
    padding-bottom: 15px;
  }
  .header-search .input-group {
    float: none;
    max-width: 100%;
  }
  .navbar-mercedes .navbar-nav > li > a {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }
  .news-item-thumb {
    float: none;
    margin-right: 0;
    margin-bottom: 12px;
    max-width: 100%;
  }
  .news-item-thumb img {
    width: 100%;
  }
  .t3-sidebar {
    margin-top: 30px;
  }
  .footer-box {
    margin-bottom: 30px;
  }
  /* Imágenes y alineaciones en móviles */
  .itemFullText img.alignleft,
  .itemFullText img.alignright,
  .itemFullText .alignleft,
  .itemFullText .alignright {
    float: none !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 15px !important;
  }
}

/* Spotlight Bottom Banners */
.t3-spotlight-2 {
  margin-top: 30px;
  margin-bottom: 30px;
}
.t3-spotlight-2 .col-banner {
  margin-bottom: 15px;
  text-align: center;
}
.t3-spotlight-2 .col-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}
.t3-spotlight-2 .col-banner img:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
