/*
Theme Name: CSUCC Theme
Theme URI: https://csucc.edu.ph/
Author: Rustum Goden
Description: Custom theme for Caraga State University Cabadbaran City
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: csucc-theme
*/

:root {
  --sidebar-width: 280px;
}

/* ---------- HEADER ---------- */
.cs-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  z-index: 3000;
  transition: 0.35s ease;
  border-bottom: 1px solid #e0e0e0;
}

/* Left container: Hamburger + Logo */
.cs-header .header-left {
  display: flex;
  align-items: center;
  gap: 15px; /* space between hamburger and logo */
}

/* Logo */
.cs-header .site-logo {
  height: 65px;
  width: auto;
}

/* Top Links */
.cs-header .top-links {
  display: flex;
  gap: 25px;
}

.cs-header .top-links a {
  color: #13251c;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: 0.2s;
}

.cs-header .top-links a:hover {
  color: #6abf4b;
}

/* Glassmorphism effect on scroll */
.cs-header.glass {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Prevent content overlap */
body {
  padding-top: 90px;
}

/* ---------- Mobile Styles ---------- */
@media (max-width: 768px) {
  /* Shrink header padding */
  .cs-header {
    padding: 0 15px;
    height: 70px;
  }

  /* Change logo for mobile */
  .cs-header .site-logo {
    content: url("/wp-content/uploads/2025/11/cropped-Site-Logo.png");
    height: 50px;
  }

  /* Top links: hide text, show only icons */
  .cs-header .top-links a .link-text {
    display: none;
  }

  /* Reduce gap between icons in top links */
  .cs-header .top-links {
    gap: 15px;
  }

  /* Optional: smaller login button on mobile */
  .cs-header .login-btn {
    padding: 8px 10px;
    font-size: 14px;
  }

  /* Optional: shrink hamburger button */
  .sidebar-toggle {
    padding: 8px 10px;
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .cs-header .top-links a {
    font-size: 0; /* hide text */
    flex-shrink: 0; /* prevent shrinking */
  }

  .cs-header .top-links a i {
    font-size: 20px; /* restore icon size */
  }

  .cs-header .top-links {
    gap: 15px; /* optional: tighter spacing for mobile icons */
  }
}
/* ------------------------------------------------ SIDEBAR ------------------------------------------------------------- */

.sidebar-search {
  position: relative;
  padding: 12px;
}

.sidebar-search input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.sidebar-search i {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  pointer-events: none;
}

/* Hide non-matching items */
.sidebar-menu li.hidden {
  display: none !important;
}

/* Highlight */
.sidebar-menu .highlight {
  color: rgb(209, 11, 11) !important;
  font-weight: 600;
}

/* Hide filtered items */
.sidebar-menu li.hidden {
  display: none !important;
}

/* Close Button */
.close-sidebar-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 1.6rem;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.25s ease;
  backdrop-filter: blur(4px);
}

.close-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
} /* Chevron icons */
.csucc-sidebar i.fa-chevron-down,
.csucc-sidebar i.fa-chevron-right {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-left: auto;
  transition: transform 0.25s ease;
}

/* Rotate icon when open */
.csucc-sidebar .sidebar-link[aria-expanded="true"] i.fa-chevron-down {
  transform: rotate(180deg);
}

/* When Hidden */
.csucc-sidebar.hidden {
  transform: translateX(-100%);
}

/* default state: sidebar visible -> content shifted */
body:not(.sidebar-hidden) .main-content {
  margin-left: 20vw;
  transition: margin-left 0.35s ease;
}
/* ================== SIDEBAR NEW DESIGN ================== */
.csucc-sidebar {
  width: 280px;
  height: calc(100vh - 90px);
  position: fixed;
  top: 90px;
  left: 0;
  background: #f9f9f9;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.05);
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 2000;
}

/* Remove bullets and padding from all UL inside sidebar */
.csucc-sidebar ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/* Sidebar links */
.csucc-sidebar a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: 500;
  color: #2c3e50;
  font-size: 15px;
  border-radius: 8px;
  gap: 15px;
  position: relative;
  transition:
    background 0.2s,
    color 0.2s;
}

/* Hover */
.csucc-sidebar a:hover {
  background: #e6f2e6;
  color: #1a4d2e;
}

/* Active Menu */
.csucc-sidebar a.active {
  background: #dcecd5;
  color: #1a4d2e;
  font-weight: 550;
}

/* Left icons */
.csucc-sidebar a i:first-child {
  width: 20px;
  text-align: center;
  font-size: 16px;
  color: #1a4d2e;
}

/* Right arrow for submenu */
.csucc-sidebar .toggle-icon {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.25s ease;
  color: #1a4d2e;
}

/* Open submenu rotation */
.csucc-sidebar .toggle-icon.open {
  transform: rotate(90deg);
}

.csucc-sidebar .submenu {
  overflow: hidden;
  height: 0;
  padding-left: 30px;
  font-family: "Roboto", sans-serif;
  transition: height 0.3s ease;
}

/* Open submenu */
.csucc-sidebar .submenu.open {
  max-height: 600px; /* adjust if needed */
}

/* Submenu links */
.csucc-sidebar .submenu a {
  padding: 8px 20px;
  font-size: 13px;
  font-family: "Roboto", sans-serif;
  color: #34495e;
  border-radius: 6px;
}

/* Submenu hover */
.csucc-sidebar .submenu a:hover {
  background: #e6f2e6;
  color: #1a4d2e;
}

/* Active submenu */
.csucc-sidebar .submenu a.active {
  background: #dcecd5;
  color: #1a4d2e;
  font-weight: 550;
}

/* Scrollbar */
.csucc-sidebar::-webkit-scrollbar {
  width: 8px;
}
.csucc-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
}

/* Hamburger toggle - keep existing styles */
.sidebar-toggle {
  background: #1a4d2e;
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.sidebar-toggle i {
  transition: transform 0.3s ease;
}

.sidebar-toggle i.fa-xmark {
  transform: rotate(180deg);
}

.sidebar-toggle:hover {
  background: #23633b;
}
#csuccSidebar {
  border-right: #0000006f 1px solid;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
}

@media (min-width: 769px) {
  body.sidebar-open .main-content,
  body.sidebar-open .dynamic-footer,
  body.sidebar-open .site-footer {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: all 0.3s ease;
  }

  .dynamic-footer,
  .site-footer {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
  }
}

/* Mobile */
@media (max-width: 992px) {
  .csucc-sidebar {
    transform: translateX(-100%);
  }
}

/* On mobile, sidebar is hidden by default */
@media (max-width: 768px) {
  #csuccSidebar {
    width: var(--sidebar-width);
    margin-left: 0 !important; /* force sidebar hidden initially */
    transform: translateX(-280px);
    transition: transform 0.35s ease;
    border-right: #0000006f 1px solid;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
    margin-top: -20px;
  }

  body:not(.sidebar-hidden) .main-content {
    margin-left: 0 !important; /* content full width */
  }

  /* When sidebar is active on mobile */
  #csuccSidebar.active {
    transform: translateX(0);
    z-index: 3000;
  }
}
/* ------------------------------------------------ CONTENT ------------------------------------------------------------- */
/* ====================================================================================================================== */

/* ------------------------------------------------- FOOTER ------------------------------------------------------------- */
/* ====================================================================================================================== */
.site-footer {
  background-color: #13251c;
  color: #ffffff;
  padding: 30px 60px;
  font-family: "Poppins", sans-serif;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  text-align: center;
}

.footer-left p {
  margin: 0;
  font-size: 14px;
}

.footer-center .footer-logo {
  width: 70px;
  height: auto;
}

.footer-right {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.footer-right a {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
}

.footer-right a i {
  color: #6abf4b; /* soft green accent */
  font-size: 16px;
}

.footer-right a:hover {
  color: #6abf4b;
}

.footer-right a:hover i {
  color: #ffffff;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 15px;
  }
}

/* ================= Dynamic Widgetized Footer ================= */

.dynamic-footer {
  background-color: #0b5d1e;
  color: #fff;
  height: 70vh;
  padding: 40px;
  font-family: "Poppins", sans-serif;
}

/* IMPORTANT: Make columns container fill height */
.footer-columns {
  max-width: 1200px;
  margin: auto;
  height: 100%; /* KEY FIX */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Each column */
.footer-column {
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Scroll now works */
  min-height: 0; /* VERY IMPORTANT for grid scroll */
  padding-right: 10px;
}

/* Smooth scrollbar */
.footer-column::-webkit-scrollbar {
  width: 6px;
}
.footer-column::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

/* Titles */
.footer-title {
  color: #ffd700;
  margin-bottom: 15px;
  font-size: 18px;
}

/* Text */
.footer-widget p,
.footer-widget li,
.footer-widget a {
  font-size: 14px;
  line-height: 1.8;
  color: #f1f1f1;
  text-decoration: none;
}

.footer-widget a:hover {
  color: #ffd700;
}

/* ================= FIXED LOGO GRID ================= */

.footer-logos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  align-content: start;
}

/* MAKE HEADING FULL WIDTH */
.footer-logos .footer-title,
.footer-logos h1,
.footer-logos h2,
.footer-logos h3,
.footer-logos h4 {
  grid-column: 1 / -1; /* spans both columns */
  margin-bottom: 20px;
}

/* Make images fit nicely */
.footer-center-logos img {
  width: 70% !important;
  height: auto;
}

.footer-logos img {
  width: 70% !important;
  height: auto;
  transition: transform 0.3s ease;
}

.footer-logos img:hover {
  transform: scale(1.05);
}

/* Remove wrapper interference */
.footer-logos .footer-widget {
  display: contents;
}

/* ================= Responsive ================= */

@media (max-width: 992px) {
  .dynamic-footer {
    height: auto;
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-column {
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .footer-logos {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------- Banner Carousel Images ------------------------------------- */
/* Let images control height */
#bannerCarousel .carousel-item img {
  width: 100%;
  height: auto;
  object-fit: contain; /* no cropping */
  background: #13251c; /* optional */
}

/* Optional: center images vertically */
#bannerCarousel .carousel-item {
  text-align: center;
  background: #000; /* prevents white gaps */
}

#bannerCarousel .carousel-item img {
  margin: 0 auto; /* center horizontally */
}
