/*
Theme Name: UFABETX
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A custom wordPress theme template (Built on Bootstrap 5 + Bootstrap Icons) 
Version: 1.1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ========================================
   Fonts
======================================== */
@font-face {
  font-family: "Google Sans";
  src: url("assets/fonts/GoogleSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("assets/fonts/GoogleSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("assets/fonts/GoogleSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ========================================
   CSS Variables
======================================== */
:root,
[data-bs-theme="dark"] {
  --font-primary: "Google Sans", sans-serif;
  --container-max-width: 1140px;

  /* Theme Colors */
  --bs-body-bg: #111111;
  --bs-body-color: #f8f9fa;
  --bs-primary: #d4af37;
  --bs-secondary-color: #b0b3b8;
  --bs-border-color: #333333;
  --bs-tertiary-bg: #1a1a1a;

  /* Internal Variables mapped to Bootstrap */
  --color-primary: var(--bs-primary);
  --color-text: var(--bs-body-color);
  --color-text-muted: var(--bs-secondary-color);
  --color-border: var(--bs-border-color);
  --color-bg: var(--bs-body-bg);
  --color-bg-light: var(--bs-tertiary-bg);
  --color-gold: #d4af37;
}

/* ========================================
   Base Styles
======================================== */
body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Override Bootstrap container max-width */
.container {
  max-width: var(--container-max-width);
}

/* ========================================
   Typography
======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

/* Mobile-first responsive heading sizes */
h1 {
  font-size: 1.75rem;
  /* 28px */
}

h2 {
  font-size: 1.5rem;
  /* 24px */
}

h3 {
  font-size: 1.25rem;
  /* 20px */
}

h4 {
  font-size: 1.125rem;
  /* 18px */
}

h5 {
  font-size: 1rem;
  /* 16px */
}

h6 {
  font-size: 0.875rem;
  /* 14px */
}

/* Tablet and up (≥768px) */
@media (min-width: 768px) {
  h1 {
    font-size: 2.25rem;
    /* 36px */
  }

  h2 {
    font-size: 1.875rem;
    /* 30px */
  }

  h3 {
    font-size: 1.5rem;
    /* 24px */
  }

  h4 {
    font-size: 1.25rem;
    /* 20px */
  }

  h5 {
    font-size: 1.125rem;
    /* 18px */
  }

  h6 {
    font-size: 1rem;
    /* 16px */
  }
}

/* Desktop and up (≥992px) */
@media (min-width: 992px) {
  h1 {
    font-size: 2.5rem;
    /* 40px */
  }

  h2 {
    font-size: 2rem;
    /* 32px */
  }

  h3 {
    font-size: 1.75rem;
    /* 28px */
  }

  h4 {
    font-size: 1.5rem;
    /* 24px */
  }

  h5 {
    font-size: 1.25rem;
    /* 20px */
  }

  h6 {
    font-size: 1.125rem;
    /* 18px */
  }
}

a {
  text-decoration: none;
  color: var(--color-gold);
}

a:hover {
  text-decoration: underline;
  color: var(--color-gold);
  filter: brightness(1.4);
}

strong {
  color: var(--color-gold);
}

/* ========================================
   Header
======================================== */
.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.site-branding .site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.site-branding .site-title a {
  color: var(--color-text);
}

.site-branding .site-description {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Custom Logo - Prevent Overflow */
.site-branding {
  flex-shrink: 0;
  max-width: 150px;
}

.site-branding .custom-logo-link {
  display: block;
}

.site-branding .custom-logo {
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ========================================
   Navigation
======================================== */
.main-navigation .navbar-nav .nav-link {
  color: var(--color-text);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.main-navigation .navbar-nav .nav-link:hover,
.main-navigation .navbar-nav .nav-link.active {
  color: var(--color-primary);
}

/* Base style for navbar to handle absolute positioning context */
.navbar {
  position: relative;
}

/* Mobile Menu - Floating Dropdown Style */
@media (max-width: 991.98px) {
  .navbar-collapse {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    width: auto;
    min-width: 200px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
  }

  .main-navigation .navbar-nav .nav-link {
    padding: 0.5rem 1.25rem;
  }
}

/* ========================================
   Content
======================================== */
.site-main {
  padding: 1rem 0;
  min-height: 60vh;
}

/* ========================================
   Post Card (Archive/List)
======================================== */
/* ========================================
   Post Card (Archive/List)
======================================== */
.post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  background: linear-gradient(145deg, #111111, #1a1a1a);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover {
  border-color: var(--color-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
}

.post-card:hover::before {
  opacity: 1;
}

.post-card .post-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: #000;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.post-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-card .post-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-card .post-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.post-card .post-title a {
  color: #fff;
  transition: color 0.2s ease;
}

.post-card .post-title a:hover {
  color: var(--color-gold);
}

.post-card .post-meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card .post-excerpt {
  color: #bbb;
  margin-bottom: auto;
  padding-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Button in Card */
.post-card .btn {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: transparent;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
}

.post-card .btn:hover {
  background: var(--color-gold);
  color: #000;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* ========================================
   Single Post
======================================== */
.single-post .entry-header {
  margin-bottom: 2rem;
}

.single-post .entry-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.single-post .entry-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.single-post .entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.single-post .entry-content p {
  margin-bottom: 1.5rem;
}

.single-post .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.single-post .entry-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* ========================================
   Pagination
======================================== */
.pagination-wrapper {
  margin-top: 2rem;
}

.pagination .page-link {
  color: var(--color-text);
}

.pagination .page-item.active .page-link {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ========================================
   Footer
======================================== */
.site-footer {
  background-color: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  padding: 1rem 0;
  margin-top: 1rem;
}

.site-footer .footer-content {
  color: var(--color-text-muted);
}

.site-footer .footer-menu {
  padding: 0;
  list-style: none;
}

.site-footer .footer-menu li {
  display: inline-block;
  margin: 0 0.75rem;
}

.site-footer .footer-menu a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.site-footer .footer-menu a:hover {
  color: var(--color-primary);
}

.footer-custom-logo .custom-logo {
  max-width: 100%;
  height: auto;
  max-height: 80px;
  /* Optional constraint */
  object-fit: contain;
}

/* ========================================
   Utilities
======================================== */
.no-thumbnail {
  background-color: var(--color-bg-light);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

/* ========================================
   Accessibility
======================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

.screen-reader-text:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
}

/* ========================================
   Fixed Footer Menu
======================================== */
.fixed-footer-menu {
  display: block;
  /* Show on all devices */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  z-index: 1030;
  background: transparent;
  /* Or set a background if needed, relying on buttons currently */
  pointer-events: none;
  /* Allow clicking through empty space */
}

.fixed-footer-menu>div {
  pointer-events: auto;
  /* Re-enable clicks on content */
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  /* Add side padding */
}

.fixed-footer-menu .btn {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* Add shadow for better visibility on desktop */
}

.fixed-footer-menu .btn-login {
  background-color: var(--color-bg);
  /* Use solid background */
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.fixed-footer-menu .btn-register {
  background-color: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
  animation: glow-pulse 1s infinite;
  position: relative;
  overflow: hidden;
}

/* Shiny Sweep Effect */
.fixed-footer-menu .btn-register::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
  animation: shiny-sweep 2s infinite;
}

@keyframes shiny-sweep {
  0% {
    left: -100%;
  }

  50% {
    left: 100%;
  }

  100% {
    left: 100%;
  }
}

.fixed-footer-menu .btn-login:hover,
.fixed-footer-menu .btn-register:hover {
  filter: brightness(0.7);
}

@keyframes glow-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

/* ========================================
   Custom Helper Classes
 ======================================== */
.text-gold {
  background: linear-gradient(135deg, #f9e082 0%, #d4af37 25%, #c9a227 50%, #f4d674 75%, #d4af37 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #d4af37;
  /* Fallback for browsers that don't support text-fill-color */
  display: inline-block;
  /* Helps with gradient clipping on some mobile browsers */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.5) !important;
}

.bg-dark {
  background-color: #1a1a1a !important;
}

.bg-black {
  background-color: #000000 !important;
}

.hover-underline:hover {
  text-decoration: underline !important;
}

.grayscale-hover {
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.grayscale-hover:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Ensure content isn't hidden behind the fixed footer */
body {
  padding-bottom: 80px;
}