
/* FORCE BLOCK DISPLAY FOR ICONS TO PREVENT FOUT/FOIT */
@font-face {
  font-family: 'icomoon';
  src:  url('fonts/icomoon.eot?e22tl1');
  src:  url('fonts/icomoon.eot?e22tl1#iefix') format('embedded-opentype'),
    url('fonts/icomoon.ttf?e22tl1') format('truetype'),
    url('fonts/icomoon.woff?e22tl1') format('woff'),
    url('fonts/icomoon.svg?e22tl1#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "tabler-icons";
  font-style: normal;
  font-weight: 400;
  src: url("https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@2.44.0/fonts/tabler-icons.woff2") format("woff2"),
       url("https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@2.44.0/fonts/tabler-icons.woff") format("woff"),
       url("https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@2.44.0/fonts/tabler-icons.ttf") format("truetype");
  font-display: block;
}






﻿/* WP GRID & FLEXBOX REPLICA - BULLETPROOF */
.custom-container, .custom-container * {
  box-sizing: border-box;
}
.custom-container { 
  max-width: 1600px; 
  margin: 0 auto; 
  width: 100%; 
  display: block;
  padding-left: 15px; 
  padding-right: 15px; 
}
.custom-container .row { 
  display: flex; 
  flex-wrap: wrap; 
  margin-right: -15px; 
  margin-left: -15px; 
  width: auto;
}
.col-lg-9 { 
  flex: 0 0 75%; 
  max-width: 75%; 
  padding-left: 15px; 
  padding-right: 15px; 
  display: block;
}
.col-lg-3 { 
  flex: 0 0 25%; 
  max-width: 25%; 
  padding-left: 15px; 
  padding-right: 15px; 
  display: block;
}
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-stretch { align-items: stretch; }
.w-100 { width: 100%; }
.m-0 { margin: 0; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.pl-3 { padding-left: 1rem; }
.text-white { color: #fff; }
.text-muted { color: #6c757d; }
.text-decoration-none { text-decoration: none; }
.bg-primary { background-color: #007bff; }
.bg-dark { background-color: #343a40; }
.bg-success { background-color: #28a745; }
.bg-info { background-color: #17a2b8; }
.rounded { border-radius: 0.25rem; }
.rounded-start { border-top-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }


/* MISSING GRID CLASSES */
.col-12 { flex: 0 0 100%; max-width: 100%; padding-left: 15px; padding-right: 15px; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; padding-left: 15px; padding-right: 15px; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding-left: 15px; padding-right: 15px; }


/* EPISODE GRID 5 COLS */
@media (min-width: 992px) {
  .row-cols-lg-5 > * { 
    flex: 0 0 20%; 
    max-width: 20%; 
    padding-left: 10px;
    padding-right: 10px;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .row-cols-md-4 > * { 
    flex: 0 0 25%; 
    max-width: 25%; 
    padding-left: 10px;
    padding-right: 10px;
  }
}
/* Ensure row-cols-2 works on mobile */
@media (max-width: 767px) {
  .row-cols-md-4 > *, .row-cols-lg-5 > * { 
    flex: 0 0 50%; 
    max-width: 50%; 
    padding-left: 5px;
    padding-right: 5px;
  }
}
/* EPISODE GRID */
.row-cols-lg-4 > * { 
  flex: 0 0 25%; 
  max-width: 25%; 
  padding-left: 10px;
  padding-right: 10px;
  display: flex;
}
.wp-card { 
  background: transparent; 
  border-radius: 12px; 
  overflow: visible; 
  transition: none; 
  box-shadow: none; 
  display: block;
  width: 100%;
}
.wp-card:hover { transform: none; box-shadow: none; }
.d-thumb { width: 100%; display: block; }
.wp-thumb { 
  width: 100%; 
  height: 140px; 
  object-fit: cover; 
  border-bottom: 2px solid #007bff; 
  display: block;
}
.badges-top { display: flex; gap: 5px; z-index: 2; }
.badge { font-size: 11px; font-weight: 700; padding: 4px 6px; border-radius: 4px; display: inline-block; }
.badge-primary { background-color: #007bff; color: white; }
.badge-secondary { background-color: rgba(0,0,0,0.7); color: white; border: 1px solid #555; }

/* TABS */
.nav-tabs { border-bottom: 1px solid var(--border-color); display: flex; list-style: none; padding: 0; margin-bottom: 1rem; width: 100%; }
.nav-tabs .nav-item { margin-bottom: -1px; }
.nav-tabs .nav-link { border: 1px solid transparent; border-top-left-radius: 0.25rem; border-top-right-radius: 0.25rem; padding: 0.5rem 1rem; display: block; color: #aaa; text-decoration: none; font-weight: bold; }
.nav-tabs .nav-link.active { color: #fff; background-color: #0f0f11; border-color: #007bff #333 transparent; border-top: 2px solid #007bff; }
.section-title h4 { color: #fff; border-left: 3px solid #007bff; padding-left: 10px; margin-bottom: 20px; font-weight: bold; font-size: 1.2rem; }

/* SIDEBAR */
.home-widgets { background: transparent; }
.wp-sidebar-item { border-bottom: 1px solid #222; align-items: flex-start; }
.custom_thumb_home { width: 70px; flex-shrink: 0; }
.custom_thumb_home img { width: 100%; height: 100px; object-fit: cover; border-radius: 4px; display: block; }
.card-body-home { flex-grow: 1; padding-left: 15px; }
.card-body-home a:hover { color: #007bff; }

/* FIXES FOR CONTAINER LAYOUT CONFLICTS */
body #contenedor { background-color: var(--bg-color); position: static; width: 100%; overflow-x: hidden; box-sizing: border-box; }
body { background: var(--bg-color); }

/* RESPONSIVE */
@media (max-width: 1199px) {

  /* FloatSearch Mobile Metamorphosis */
  .search-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1050;
    max-width: none;
    display: none; /* Hidden by default on mobile */
    align-items: flex-start;
    padding-top: 20px;
  }
  .search-wrapper.mobile-active {
    display: flex;
  }
  .search-wrapper .form_search2 {
    width: 90%;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 20px;
    height: 50px;
  }
  .search-wrapper .buscanime {
    height: 50px;
  }

  .col-lg-9, .col-lg-3 { flex: 0 0 100%; max-width: 100%; }
  .row-cols-lg-4 > * { flex: 0 0 33.333%; max-width: 33.333%; }
}
@media (max-width: 767px) {
  .row-cols-lg-4 > * { flex: 0 0 50%; max-width: 50%; }
}

/* WP THEME CSS REWRITE */
:root {
  --bg-color: #f2f3f5;
  --bg-secondary: #ffffff;
  --text-primary: #212529;
  --text-secondary: #666666;
  --header-bg: #1fb0f4;
  --border-color: #e0e0e0;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --card-text: #333;
  --tab-bg: #ffffff;
  --tab-text: #666;
  --tab-active-bg: #f1f4f5;
  --tab-active-text: #333;
}

body.dark-mode {
  --bg-color: #303240;
  --bg-secondary: #474c67;
  --text-primary: #ffffff;
  --text-secondary: #c2c6d8;
  --header-bg: #1f212b;
  --border-color: #474c67;
  --sidebar-bg: #474c67;
  --card-bg: #474c67;
  --card-text: #ffffff;
  --tab-bg: #303240;
  --tab-active: #474c67;
}

/* Base resets */
body, body #contenedor { 
  background-color: var(--bg-color); 
  color: var(--text-primary);
  font-family: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
#contenedor { position: static; overflow-x: hidden; padding-left: 80px; padding-top: 70px; }

/* Header */
.wp-header {
    position: fixed; top: 0; left: 0; right: 0; height: 70px;
  background-color: var(--header-bg);
  z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header__logo img { height: 40px; }
.header__right { display: flex; align-items: center; gap: 20px; flex-grow: 1; justify-content: flex-end; }
.switchBtn { display: flex; align-items: center; cursor: pointer; }
.switchBtn input { display: none; }
.slidebtn { width: 40px; height: 20px; background: #ddd; border-radius: 20px; position: relative; transition: 0.3s; }
.slidebtn::after { content: ''; width: 16px; height: 16px; background: white; border-radius: 50%; position: absolute; top: 2px; left: 2px; transition: 0.3s; }
.switchBtn input:checked + .slidebtn { background: #3f6eb4; }
.switchBtn input:checked + .slidebtn::after { left: 22px; }



.user-icon { font-size: 24px; color: white; cursor: pointer; }

/* Left Sidebar Menu */
.mainmenu {
  position: fixed; top: 70px; left: 0; bottom: 0; width: 80px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  z-index: 999;
  display: flex; flex-direction: column; align-items: center; padding-top: 20px;
  box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}
.mobile-bottom-nav__item { 
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-secondary); text-decoration: none; padding: 15px 0; width: 100%;
  font-size: 12px; transition: all 0.3s ease-in-out;
}
.mobile-bottom-nav__item i { font-size: 24px; margin-bottom: 5px; transition: color 0.3s ease-in-out; }
.mobile-bottom-nav__item { border-right: 3px solid transparent; }
.mobile-bottom-nav__item:hover { color: #ff9800; background-color: transparent; }
.mobile-bottom-nav__item--active { color: #1fb0f4; border-right: 3px solid #1fb0f4; background-color: #e6f5fd; }
body.dark-mode .mobile-bottom-nav__item--active { background-color: rgba(31, 176, 244, 0.15); }

/* Grid Cards (Overrides for dynamic colors) */
.wp-card { background: transparent; color: var(--card-text); }
.card-body-home h5 a, .section-title h4, .text-white { color: var(--text-primary); }

/* Tabs */
.nav-tabs { border-bottom: 1px solid var(--border-color); }
.nav-tabs .nav-link { color: var(--tab-text); background: var(--tab-bg); border-bottom: none;}
.nav-tabs .nav-link.active { color: var(--tab-active-text); background-color: var(--tab-active-bg); border-color: #1fb0f4 var(--border-color) transparent; }
.section-title h4 { border-left-color: #1fb0f4; }

/* Hero Slider Placeholder */
.hero__slider { width: 100%; height: 430px; min-height: 430px; background: #0d1017; border-radius: 12px; margin-bottom: 24px; overflow: hidden; position: relative; }
.hero__items { width: 100%; height: 100%; background-size: cover; background-position: center 22%; position: absolute; top:0; left:0; display:flex; align-items: flex-end; padding: 36px 76px 48px; box-sizing: border-box; }
.hero__items::after { content: none; display: none; }


.hero__text { position: relative; z-index: 2; color: white; max-width: 720px; }
.hero__text h2 { font-family: "Mulish", sans-serif; font-size: 32px; font-weight: 800; line-height: 1.18; margin-bottom: 10px; color: white; text-shadow: 0 2px 10px rgba(0,0,0,0.65); }
.hero__text p { font-size: 14.5px; line-height: 1.55; color: rgba(248, 250, 252, 0.92); margin-bottom: 0; }
.hero__btns { position: relative; z-index: 2; display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 12px; }
.btn-primary { background: #1fb0f4; border-color: #1fb0f4; }
.btn-dark { background: rgba(255,255,255,0.2); border:none; color: white;}

/* Continuar Mirando */
.destacados { background: var(--card-bg); border-radius: 8px; padding: 20px; margin-bottom: 30px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.destacados h4 { color: var(--text-primary); font-size: 18px; font-weight: bold; }
.cw-card { display: flex; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; background: var(--bg-color); max-width: 300px; text-decoration:none;}
.cw-thumb { width: 120px; height: 70px; object-fit: cover; }
.cw-info { padding: 10px; flex-grow: 1; }
.cw-title { font-size: 14px; color: var(--text-primary); font-weight: bold; margin:0; }
.cw-ep { font-size: 12px; color: #1fb0f4; margin:0; }

/* PUSH CONTENT FOR LEFT MENU */





/* ======= FINAL AESTHETIC POLISH ======= */

/* Header Search */


.header__logo { width: 200px; }

/* Episode Cards Proportions */
.row-cols-lg-4 > * { padding: 10px; }
.wp-thumb {
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-bottom: 2px solid #1fb0f4;
}

/* Left Sidebar Aesthetics */
.mainmenu { width: 85px; padding-top: 10px; background: var(--bg-secondary); }
.mobile-bottom-nav__item { font-size: 11px; padding: 12px 0; gap: 0; color: var(--text-secondary); }
.mobile-bottom-nav__item i { font-size: 22px; margin-bottom: 0; }
.mobile-bottom-nav__item span { display: block; transition: color 0.3s ease-in-out; }
#contenedor { padding-left: 85px; }

/* Header colors in Light Mode */
body.light-mode .wp-header { background: #1fb0f4; border-bottom: none; }
body.dark-mode .wp-header { background: var(--header-bg); border-bottom: none; }

/* Hero Slider Aesthetics */
.hero__slider { position: relative; border-radius: 12px; }
.hero-controls { position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); z-index: 15; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; pointer-events: none; }
.hero-controls button { background: rgba(17, 18, 23, 0.62); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.22); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; pointer-events: auto; backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); transition: all 0.22s ease; font-size: 20px; }
.hero-controls button:hover { background: #1fb0f4; border-color: rgba(255, 255, 255, 0.45); box-shadow: 0 8px 22px rgba(31, 176, 244, 0.55); transform: scale(1.08); }

.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; z-index: 15; padding: 5px 10px; border-radius: 999px; background: rgba(10, 12, 18, 0.48); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(6px); }
.hero-dots span { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.45); cursor: pointer; transition: all 0.25s ease; }
.hero-dots span.active { width: 24px; border-radius: 999px; background: #1fb0f4; box-shadow: 0 0 10px rgba(31, 176, 244, 0.65); }
.hero__text h2 { font-family: "Oswald", sans-serif; font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 10px; color: white; text-shadow: 0px 1px 2px #676767; }
.btn-primary { background: #1fb0f4; border-radius: 20px; padding: 8px 20px; font-size: 13px; font-weight:bold; }
.btn-dark { background: rgba(255,255,255,0.15); border-radius: 20px; padding: 8px 20px; font-size: 13px; font-weight:bold; }

/* Continuar Mirando Aesthetics */
.destacados { padding: 15px 20px; margin-bottom: 20px; border-radius: 4px; box-shadow: none; border: 1px solid var(--border-color); background: var(--bg-secondary); }
.cw-card { display: flex; border: none; background: transparent; max-width: 100%; align-items: center; gap: 15px;}
.cw-thumb { width: 140px; height: 80px; border-radius: 4px; }
.cw-title { font-size: 15px; margin-bottom: 5px; }

/* Titles */
.section-title h4 { font-size: 18px; margin: 0; }

/* Tabs */
.nav-tabs { border-bottom: 2px solid var(--border-color); margin-bottom: 20px; }
.nav-tabs .nav-link { padding: 10px 20px; font-size: 14px; }

/* Fix Bootstrap pseudo-elements breaking CSS Grid */
.custom-container > .row::before, 
.custom-container > .row::after { 
    display: none; 
}

/* Adjust Header Alignment */
.wp-header { padding: 0; }
.header__logo { width: 250px; padding-left: 20px; display: flex; align-items: center; }
.header__right { padding-right: 20px; justify-content: flex-end; }


/* HERO BADGES (Serie, En emision) */
.hero__text .badge { background: #ff9d00; border: none; color: white; font-weight: bold; padding: 6px 14px; border-radius: 12px; font-size: 12px; letter-spacing: 0.5px; margin-bottom: 10px; }

/* HERO BUTTONS */
.hero__btns .btn { border-radius: 4px; padding: 12px 20px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; border: none; transition: all 0.3s; }
.hero__btns .btn:hover { transform: scale(1.05); }

/* EPISODE CARDS BADGES (Move to top right, combine pills) */
.d-thumb .badges-top { top: 8px; left: auto; right: 8px; display: flex; background: rgba(0,0,0,0.7); border-radius: 12px; overflow: hidden; padding: 0; }
.d-thumb .badges-top .badge { border-radius: 0; padding: 4px 8px; font-size: 10px; font-weight: bold; margin: 0; }
.d-thumb .badges-top .bg-primary { background: #1fb0f4; }
.d-thumb .badges-top .bg-dark { background: transparent; color: #ddd; }

/* RIGHT SIDEBAR BADGES (Animes recientes) */
.wp-sidebar-item .card-info .badge { font-size: 9px; padding: 3px 6px; border-radius: 3px; font-weight: bold; letter-spacing: 0.5px; }
.wp-sidebar-item .card-info .bg-success { background: #e74c3c; } /* Change 'En emision' / 'Concluido' to Red like WP */
.wp-sidebar-item .card-info .bg-info { background: #1fb0f4; } /* Change 'Anime' / 'OVA' to Blue like WP */


/* Expand Container Width */
.custom-container { max-width: 1600px; width: 95%; }






/* LIGHT/DARK TOGGLE FIX */
.slidebtn { width: 56px; height: 28px; background: rgba(0,0,0,0.15); border-radius: 30px; position: relative; transition: 0.3s; margin-right: 10px; }
.slidebtn::after { display: none; } /* Hide old pseudo element */
.slidebtn-circle { width: 22px; height: 22px; background: white; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: 0.3s; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.slidebtn-circle i { font-size: 14px; color: #ff9800; } /* Orange sun */
.switchBtn input:checked + .slidebtn .slidebtn-circle { left: 31px; background: #222; }
.switchBtn input:checked + .slidebtn .slidebtn-circle i { color: #f1c40f; } /* Yellow moon */
.switchBtn input:checked + .slidebtn { background: rgba(255,255,255,0.1); }

/* SEARCH BAR EXACT MATCH */





/* USER ICON */
.user-icon { font-size: 20px; margin-left: 10px; opacity: 0.9; }

/* Continuar Mirando Hover Effect */
.cw-card-hover:hover .cw-overlay { opacity: 1; }

/* Fix Continuar Mirando Header */
#bloque-continuar-mirando > div:first-child { display: flex; justify-content: space-between; align-items: center; }



/* Proportional Header Icons & Search */
.header__right { display: flex; align-items: center; gap: 20px; padding-right: 30px; width: 100%; justify-content: flex-end; }

.switchBtn { margin: 0; width: 70px; height: 36px; border-radius: 18px; }
.slidebtn { width: 70px; height: 36px; border-radius: 18px; }
.slidebtn-circle { width: 30px; height: 30px; line-height: 30px; font-size: 18px; left: 3px; top: 3px; }
.switchBtn input:checked + .slidebtn .slidebtn-circle { left: 37px; }






.user-icon { font-size: 36px; color: white; margin-left: 15px; cursor: pointer; padding: 8px; }


/* Fix overlapping X button in search */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
}


/* NEW SEARCH BAR STYLES - BULLETPROOF */
.form_search2 {
    width: 100%;
    max-width: 800px;
    height: 40px;
    position: relative;
    margin: 0;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
}

.buscanime {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    padding: 0 50px 0 20px;
    font-size: 14px;
    color: #333333;
    outline: none;
    box-shadow: none;
    border-radius: 20px;
}

.buscanime::placeholder {
    color: #888888;
    font-weight: normal;
}

.buton-form {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 45px;
    background: transparent;
    border: none;
    color: #1fb0f4;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
}


/* LIVE SEARCH DROPDOWN */
.live-search-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #e1e1e1;
}

.live-search-header {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #eee;
    background: #fdfdfd;
}

.live-search-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}
.live-search-item:hover {
    background: #f9f9f9;
}

.live-search-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
}

.live-search-title {
    font-size: 13px;
    color: #444;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-search-badge {
    background: #6c7a89;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    font-weight: normal;
    display: inline-block;
    flex-shrink: 0;
}

.live-search-footer {
    display: block;
    text-align: center;
    padding: 12px;
    background: #f7f7f7;
    color: #111;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.live-search-footer:hover {
    background: #eeeeee;
}


.search-wrapper {
    width: 100%;
    max-width: 800px;
    position: relative;
    margin: 0;
    display: flex;
    flex-direction: column;
}


/* SECONDARY SIDE PANEL */
.secondary-panel {
    position: fixed;
    top: 70px;
    left: 85px;
    bottom: 0;
    width: 260px;
    background: #ffffff;
    z-index: 99;
    transform: translateX(-150%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 15px rgba(0,0,0,0.05);
    overflow-y: auto;
    padding: 25px 0;
}
body.dark-mode .secondary-panel {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
}

.secondary-panel.open {
    transform: translateX(0);
}

.sp-section {
    margin-bottom: 30px;
}

.sp-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding: 0 25px;
    margin-bottom: 15px;
}
body.dark-mode .sp-section h3 { color: #fff; }

.sp-section a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
body.dark-mode .sp-section a { color: #aaa; }

.sp-section a i {
    font-size: 18px;
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.sp-section a:hover {
    background: rgba(31, 176, 244, 0.1);
    color: #1fb0f4;
}

.sp-recommend {
    padding: 0 25px;
    font-size: 13px;
    color: #888;
}

/* OVERLAY */
.sp-overlay {
    position: fixed;
    top: 70px;
    left: 85px;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}
.sp-overlay.open {
    opacity: 1;
    visibility: visible;
}



/* User requested #333 for unselected sidebar items */
body.light-mode .mobile-bottom-nav__item:not(.mobile-bottom-nav__item--active) {
    color: #333;
}
body.light-mode .mobile-bottom-nav__item:not(.mobile-bottom-nav__item--active) i,
body.light-mode .mobile-bottom-nav__item:not(.mobile-bottom-nav__item--active) span {
    color: inherit;
}
body.light-mode .mobile-bottom-nav__item:hover {
    color: #ff9800;
}

/* Secondary panel text and icons */
body.light-mode .sp-section a {
    color: #333;
}
body.light-mode .sp-section a:hover {
    color: #1fb0f4;
}

body.dark-mode .form_search2 { background: var(--bg-secondary); border: 1px solid var(--border-color); }
body.dark-mode .buscanime { color: var(--text-primary); }


/* Animes Recientes Scroll */
.trending_div.scroll {
    max-height: 800px;
    overflow-y: auto;
    padding-right: 5px;
}
.trending_div.scroll::-webkit-scrollbar {
    width: 6px;
}
.trending_div.scroll::-webkit-scrollbar-track {
    background: transparent;
}
.trending_div.scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

@media (max-width: 1199px) {

  /* FloatSearch Mobile Metamorphosis */
  .search-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1050;
    max-width: none;
    display: none; /* Hidden by default on mobile */
    align-items: flex-start;
    padding-top: 20px;
  }
  .search-wrapper.mobile-active {
    display: flex;
  }
  .search-wrapper .form_search2 {
    width: 90%;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 20px;
    height: 50px;
  }
  .search-wrapper .buscanime {
    height: 50px;
  }

    .trending_div.scroll {
        max-height: none;
        overflow-y: visible;
    }
}


/* Mobile Bottom Nav Transformation */
@media (max-width: 1199px) {

  /* FloatSearch Mobile Metamorphosis */
  .search-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1050;
    max-width: none;
    display: none; /* Hidden by default on mobile */
    align-items: flex-start;
    padding-top: 20px;
  }
  .search-wrapper.mobile-active {
    display: flex;
  }
  .search-wrapper .form_search2 {
    width: 90%;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 20px;
    height: 50px;
  }
  .search-wrapper .buscanime {
    height: 50px;
  }

  .mainmenu {
    top: auto;
    bottom: 0;
    width: 100vw;
    height: 70px;
    flex-direction: row;
    padding-top: 0;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1050;
  }
  .mobile-bottom-nav__item {
    border-right: none;
    border-top: 3px solid transparent;
    padding: 10px 0;
  }
  .mobile-bottom-nav__item--active {
    border-top: 3px solid #1fb0f4;
    border-right: none;
  }
  #contenedor {
    padding-left: 0;
    padding-bottom: 70px;
  }
  .secondary-panel {
    top: auto;
    bottom: 70px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 70px);
    transform: translateY(100%);
  }
  .secondary-panel.open, .secondary-panel.active {
    transform: translateY(0);
  }
}


/* Desktop defaults */
.mobile-only { display: none; }

@media (max-width: 1199px) {

  /* FloatSearch Mobile Metamorphosis */
  .search-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1050;
    max-width: none;
    display: none; /* Hidden by default on mobile */
    align-items: flex-start;
    padding-top: 20px;
  }
  .search-wrapper.mobile-active {
    display: flex;
  }
  .search-wrapper .form_search2 {
    width: 90%;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 20px;
    height: 50px;
  }
  .search-wrapper .buscanime {
    height: 50px;
  }

  .mobile-only { display: flex; }
}


.btn-hero-dark { background: transparent; color: white; }
.btn-hero-dark:hover { color: #ff9d00; }
.btn-hero-orange { background: transparent; color: white; }
.btn-hero-orange:hover { color: #ff9d00; }

/* Modern Cascade Slide-Up Animations */
.hero__items .hero__text .ainfo,
.hero__items .hero__text h2,
.hero__items .hero__text p,
.hero__items .hero__btns {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero__items .hero__text .ainfo { transition-delay: 0.1s; }
.hero__items .hero__text h2 { transition-delay: 0.2s; }
.hero__items .hero__text p { transition-delay: 0.3s; }
.hero__items .hero__btns { transition-delay: 0.4s; }

.hero__items.active .hero__text .ainfo,
.hero__items.active .hero__text h2,
.hero__items.active .hero__text p,
.hero__items.active .hero__btns {
    opacity: 1;
    transform: translateY(0);
}


/* Continuar Mirando Grid */
#recientes_div {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    width: 100%;
}
@media (max-width: 1399px) { #recientes_div { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1199px) { #recientes_div { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 575px) { #recientes_div { grid-template-columns: repeat(2, 1fr); } }
.cw-grid-item {
    width: 100%;
    margin-bottom: 20px;
}


/* INLINE SVG ICON OVERRIDES */
[class^="icon-"], [class*=" icon-"], .ti {
    display: inline-block;
    font-family: inherit;
    line-height: 1;
    vertical-align: baseline;
}
.ti::before, [class^="icon-"]::before { content: none; }
.icon-svg {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.15em;
}

@media (max-width: 1199px) {
  .sp-overlay {
    left: 0;
    bottom: 70px;
  }
}


/* JKAnime Pills (Programacion) */
.jkanime-pills {
    display: inline-flex;
    align-items: center;
    list-style: none;
    padding: 4px;
    margin: 0 0 20px 0;
    border: none;
    background: #e9e9e9;
    border-radius: 12px;
}
body.dark-mode .jkanime-pills {
    background: var(--card-bg);
}
.jkanime-pills .nav-item {
    margin-right: 0;
}
.jkanime-pills .nav-link {
    background: transparent;
    color: #6c757d;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}
body.dark-mode .jkanime-pills .nav-link {
    color: #999;
}
.jkanime-pills .nav-link:hover {
    color: #ff9d00;
}
.jkanime-pills .nav-link.active {
    background: #ff9d00;
    color: #fff;
    border: none;
}
body.dark-mode .jkanime-pills .nav-link.active {
    background: #ff9d00;
    color: #fff;
}

/* Anti Spoiler Button */
.anti-spoiler-btn {
    margin-left: 5px;
    background: #303240;
    color: #fff;
    border-radius: 12px;
    padding: 9px 10px;
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}
.anti-spoiler-btn:hover {
    background: #474c67;
}



/* Spoiler Blur Effect */




.card-img-top, .custom_thumb_home img, .cw-thumb {
    transition: filter 0.3s ease;
}

/* Anti-Spoiler Toggle Logic */
#bloque-programacion-principal .thumb-wrapper {
    aspect-ratio: 16 / 10.8;
}
#bloque-programacion-principal .thumb-poster {
    display: none;
}
#bloque-programacion-principal .thumb-wide {
    display: block;
}

body.anti-spoiler-active #bloque-programacion-principal .thumb-wrapper {
    aspect-ratio: 2.2 / 3;
}
body.anti-spoiler-active #bloque-programacion-principal .thumb-wide {
    display: none;
}
body.anti-spoiler-active #bloque-programacion-principal .thumb-poster {
    display: block;
}

/* ANIMES RECIENTES SIDEBAR CLONE */
.custom-sidebar-item {
    border-bottom: 1px solid #e9ecef;
    transition: 0.2s ease;
}
.custom-sidebar-item:last-child {
    border-bottom: none;
}
.custom-sidebar-item:hover {
    background: rgba(0,0,0,0.02);
}
.custom_thumb_home {
    width: 102px;
    flex-shrink: 0;
    margin-right: 15px;
}
.custom_thumb_home img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
}
.card-body-home {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.card-body-home .card-title {
    margin-bottom: 6px;
    line-height: 1.2;
}
.card-body-home .card-title a {
    color: #007bff;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}
.card-body-home .card-title a:hover {
    color: #4b85b4;
}
.card-body-home .card-info {
    margin-bottom: 6px;
    display: flex;
    gap: 5px;
}
.card-body-home .card-info .badge {
    margin: 0;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
}
.card-body-home .card-info .badge.finished {
    background-color: #dc3541;
}
.card-body-home .card-info .badge.currently {
    background-color: #28a745;
}
.card-body-home .card-info .badge.Movie,
.card-body-home .card-info .badge.OVA,
.card-body-home .card-info .badge.TV {
    background-color: #2d849f;
}
.card-body-home .card-text.ep {
    color: #3d3d3d;
    font-size: 13px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Dark mode overrides for Animes Recientes */
body.dark-mode .custom-sidebar-item {
    border-bottom: 1px solid var(--border-color);
}
body.dark-mode .custom-sidebar-item:hover {
    background: rgba(255,255,255,0.03);
}
body.dark-mode .card-body-home .card-title a {
    color: #8bb9ff;
}
body.dark-mode .card-body-home .card-title a:hover {
    color: #b0d0ff;
}
body.dark-mode .card-body-home .card-text.ep {
    color: #aaa;
}

/* JKAnime Light Mode Background */


/* Sidebar White Box */
.home-widgets .sidebar-white-box {
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #e2e8f0;

    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-radius: 4px;
}
.sidebar-title-container {
    padding: 15px 15px 10px 15px;
    margin-bottom: 0;
    border-bottom: 1px solid #e9ecef;
}
.sidebar-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: #111;
    border-left: 4px solid #f39c12; /* Orange bar */
    padding-left: 10px;
    text-transform: uppercase;
}

/* Scrollable List (6 animes visibles en escritorio: 6 x 173px = 1038px) */
.jkanime-sidebar-scroll {
    max-height: 1040px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
}
@media (max-width: 1199px) {
    .jkanime-sidebar-scroll {
        min-height: auto;
        max-height: 700px;
    }
}
.jkanime-sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}
.jkanime-sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.jkanime-sidebar-scroll::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}
.jkanime-sidebar-scroll:hover::-webkit-scrollbar-thumb {
    background-color: #aaa;
}

/* Badges Pill Shape Overrides */
.card-body-home .card-info .badge {
    border-radius: 50rem;
    padding: 3px 8px;
    font-size: 10px;
}

/* Dark mode adjustments */
body.dark-mode .home-widgets .sidebar-white-box {
    background-color: var(--bg-secondary);
    border: none;
    box-shadow: none;
}
body.dark-mode .sidebar-title {
    color: #fff;
}
body.dark-mode .sidebar-title-container {
    border-bottom: 1px solid var(--border-color);
}

/* Prevent transitions on load */
.no-transitions * {
  transition: none;
}

/* CSS-based Theme Icon Swapping */
body.light-mode .theme-icon-dark { display: none; }
body.light-mode .theme-icon-light { display: block; }

body.dark-mode .theme-icon-light { display: none; }
body.dark-mode .theme-icon-dark { display: block; color: #f1c40f; }



/* TOP ANIMES WIDGET */
.top-animes-grid-1 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.top-animes-grid-2 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}
.top-anime-card {
  padding-top: 0; 
  border-radius: 6px;
  overflow: hidden;
  transform: translateZ(0); /* Fixes Safari/Chrome image overflow during scale */
}
.top-animes-grid-2 .top-anime-card {
  padding-top: 0;
}

.top-anime-card .img-wrapper img {
  transition: transform 0.3s ease;
}
.top-anime-card:hover .img-wrapper img {
  transform: scale(1.05);
}

.top-anime-card .views-badge {
  top: 8px; right: 8px;
  background: #ff9800; color: #fff;
  padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: bold;
  display: flex; align-items: center; gap: 4px;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.top-animes-grid-2 .top-anime-card .views-badge {
  font-size: 10px; padding: 2px 6px;
}

.top-anime-card .title-container {
  bottom: 8px; left: 8px; right: 8px;
  display: flex; align-items: center; gap: 8px;
  z-index: 2;
}
.top-anime-card .rank-badge {
  background: rgba(255,255,255,0.25); color: #fff;
  min-width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 12px;
  border-radius: 4px;
  backdrop-filter: blur(2px);
  flex-shrink: 0;
}
.top-animes-grid-1 .top-anime-card.rank-1 .rank-badge { background: #ff9800; }
.top-animes-grid-1 .top-anime-card.rank-2 .rank-badge { background: #f39c12; }
.top-animes-grid-1 .top-anime-card.rank-3 .rank-badge { background: #e67e22; }
.top-animes-grid-1 .top-anime-card.rank-4 .rank-badge { background: #7f8c8d; }

.top-animes-grid-2 .top-anime-card .rank-badge {
  min-width: 24px; height: 24px; font-size: 11px;
}

.top-anime-card .title-container h5 {
  color: #fff; font-size: 13px; font-weight: 500;
  margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}
.top-animes-grid-2 .top-anime-card .title-container h5 {
  font-size: 11px;
}

/* Responsive Rules for Top Anime */
@media (max-width: 1199px) {
  .top-animes-grid-1 { grid-template-columns: repeat(2, 1fr); }
  .top-animes-grid-2 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .top-animes-grid-1 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .top-animes-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .top-anime-card .title-container h5 { font-size: 11px; }
}
@media (max-width: 480px) {
  .top-animes-grid-1 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .top-animes-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

.top-anime-card .img-wrapper {
  top: 0; left: 0;
}

/* Days Pills Styling */
.jkanime-pills.days-pills .nav-link.active {
  background: #6c757d; /* Grey for active light mode */
  color: #fff;
}
body.dark-mode .jkanime-pills.days-pills .nav-link.active {
  background: #474c67; /* Dark grey for active dark mode */
  color: #fff;
}
.jkanime-pills.days-pills::-webkit-scrollbar {
  height: 0px;
  background: transparent; /* make scrollbar invisible */
}



/* Make the days container perfectly match the height and padding of the main tabs */
.jkanime-pills {
    min-height: 48px;
    align-items: center;
}
.jkanime-pills.days-pills {
    padding: 6px;
}
.jkanime-pills.days-pills .nav-link {
    padding: 6px 16px;
    border-radius: 20px;
}

/* Responsive Programacion Filters */
.programacion-filters {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: flex-start;
}

@media (max-width: 767px) {
    .programacion-filters {
        justify-content: center;
    }
}

/* Fix Grid Gutters for Programacion */
#box_movies.row, #box_donghuas.row, #box_ovas.row {
    margin-left: -8px;
    margin-right: -8px;
}
#box_movies .episode-card.col, #box_donghuas .episode-card.col, #box_ovas .episode-card.col {
    padding-left: 8px;
    padding-right: 8px;
}


/* CUSTOM GRID EXTENSION FOR RESPONSIVENESS */
.row-cols-2 > * { flex: 0 0 50%; max-width: 50%; }

/* Mobile (stack columns to 100%) */
@media (max-width: 767px) {
  .col-md-12, .col-sm-12, .col-xl-9, .col-xl-3, .col-lg-8, .col-lg-4 { flex: 0 0 100%; max-width: 100%; display: block; padding-left: 15px; padding-right: 15px; }
}

@media (min-width: 1200px) {
  .col-xl-9 { flex: 0 0 calc(100% - 375px); max-width: calc(100% - 375px); display: block; padding-left: 15px; padding-right: 15px; }
  .col-xl-3 { flex: 0 0 375px; max-width: 375px; display: block; padding-left: 15px; padding-right: 15px; }
  .row-cols-xl-4 > * { flex: 0 0 25%; max-width: 25%; }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .col-md-12 { flex: 0 0 100%; max-width: 100%; display: block; padding-left: 15px; padding-right: 15px; }
}
/* Custom breakpoints for Programacion Grid handled in brand-identity.css */


/* HERO RESPONSIVE SCALING */
@media (max-width: 1399px) {
    .hero__items { padding: 40px 60px; }
}
@media (max-width: 1199px) {
    /* Tablet */
    .hero__items { padding: 30px 40px; }
    .hero__text h2 { font-size: 32px; }
    .hero__btns { justify-content: flex-start; padding-top: 15px; }
}
@media (max-width: 767px) {
    /* Mobile */
    .hero__slider { min-height: 450px; }
    .hero__items { padding: 40px 20px 20px 20px; align-items: flex-start; }
    .hero__items > .row { height: 100%; flex-direction: row; align-content: space-between; flex-wrap: wrap; margin-bottom: 0; padding-bottom: 10px; }
    .hero__text { max-width: 100%; }
    .hero__text h2 { font-size: 18px; margin-bottom: 5px; line-height: 1.3; }
    .hero__text p { font-size: 13px; line-height: 1.3; margin-bottom: 10px; }
    .hero__text .badge { padding: 4px 10px; font-size: 10px; margin-bottom: 5px; }
    
    .hero__btns { flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 0; }
    .hero__btns .btn { width: 100%; justify-content: center; padding: 10px; font-size: 12px; }
    
    /* Make dots fit */
    .hero-dots { bottom: 10px; }
}

/* Hero Button Colors */
.btn-hero-orange { background: #ff9d00; color: white; }
.btn-hero-orange:hover { background: #e68a00; color: white; }
.btn-hero-dark { background: rgba(0,0,0,0.6); color: white; border: 1px solid rgba(255,255,255,0.2); }
.btn-hero-dark:hover { background: rgba(0,0,0,0.8); color: white; }

/* Desktop Hero Buttons Alignment */
@media (min-width: 1200px) {
    .hero__btns {
        position: absolute;
        bottom: 40px;
        right: 80px;
        padding-bottom: 0;
    }
}
