/* FCMG clone overrides */

/* Hide cookie consent banner and image popups globally */
app-cookies-footer,
.ql-html-popupContainer,
.pdcc-module,
[class*="cookie-consent"],
[class*="cookie-banner"] {
  display: none !important;
}

/* Hide social media share popup (Facebook, Twitter, WhatsApp, etc.) */
.cdk-overlay-container,
.cdk-overlay-backdrop,
.cdk-overlay-pane,
.mat-menu-panel,
.mat-mdc-menu-panel,
app-publication-actions,
.publication-actions-icons,
.single-pub-icons .bottom,
.pub-actions {
  display: none !important;
}

/* Replace "Powered by Clupik" with "Powered by Astra Solutions" */
.powered #clupik-logo { display: none !important; }
.powered .astra-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  background: linear-gradient(135deg, #6a1de8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.powered .astra-brand:hover {
  opacity: 0.8;
}

/* Hide user / login icon in the header (desktop + mobile) */
button.user-topbar,
.user-topbar,
.user-bottombar,
app-main-nav-actions button[aria-label*="sesi" i],
app-main-nav-actions button[title*="login" i] {
  display: none !important;
}

/* Hide the now-empty buttons wrapper if it leaves a gap */
app-main-nav-actions .buttons:empty {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE BURGER MENU + NAVIGATION DRAWER
   ═══════════════════════════════════════════════════════════════ */

/* ── Burger Button ────────────────────────────────────────────── */
#fcmg-burger-btn {
  display: none; /* shown via media query */
  position: fixed;
  top: 26px;
  right: 16px;
  z-index: 100010;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#fcmg-burger-btn:active {
  transform: scale(0.92);
}
#fcmg-burger-btn span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #222;
  border-radius: 3px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  transform-origin: center;
}

/* Animated X state */
#fcmg-burger-btn.is-open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
#fcmg-burger-btn.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#fcmg-burger-btn.is-open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ── Drawer Backdrop ──────────────────────────────────────────── */
#fcmg-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
#fcmg-drawer-backdrop.is-visible {
  display: block;
  opacity: 1;
}

/* ── Navigation Drawer ────────────────────────────────────────── */
#fcmg-mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100005;
  width: 88vw;
  max-width: 360px;
  height: 100dvh;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#fcmg-mobile-drawer.is-open {
  transform: translateX(0);
}

/* Drawer header / brand */
.fcmg-drawer-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fcmg-drawer-header img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}
.fcmg-drawer-header .fcmg-drawer-title {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Drawer navigation list */
.fcmg-drawer-nav {
  padding: 12px 0 24px;
  list-style: none;
  margin: 0;
}
.fcmg-drawer-nav li {
  list-style: none;
}
.fcmg-drawer-nav > li > a,
.fcmg-drawer-nav > li > .fcmg-drawer-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.fcmg-drawer-nav > li > a:hover,
.fcmg-drawer-nav > li > .fcmg-drawer-parent:hover {
  background: rgba(230, 25, 76, 0.06);
  color: #e6194c;
}

/* Chevron icon for dropdown parents */
.fcmg-drawer-parent .fcmg-chevron {
  font-size: 12px;
  transition: transform 0.3s ease;
  color: #999;
}
.fcmg-drawer-parent.is-expanded .fcmg-chevron {
  transform: rotate(180deg);
  color: #e6194c;
}

/* Submenu */
.fcmg-drawer-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f8f8f8;
}
.fcmg-drawer-submenu.is-expanded {
  max-height: 500px;
}
.fcmg-drawer-submenu li a {
  display: block;
  padding: 12px 24px 12px 40px;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  border-left: 3px solid transparent;
}
.fcmg-drawer-submenu li a:hover {
  background: rgba(230, 25, 76, 0.08);
  color: #e6194c;
  border-left-color: #e6194c;
}

/* Drawer social icons row */
.fcmg-drawer-social {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-top: 1px solid #eee;
  margin-top: 12px;
}
.fcmg-drawer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #555;
  font-size: 18px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.fcmg-drawer-social a:hover {
  background: #e6194c;
  color: #fff;
  transform: scale(1.08);
}

/* Scroll lock on body */
body.fcmg-drawer-open {
  overflow: hidden !important;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 960px) {
  /* Show burger button */
  #fcmg-burger-btn {
    display: flex !important;
  }

  /* Show the drawer (it starts off-screen) */
  #fcmg-mobile-drawer {
    display: block !important;
  }

  /* Hide the desktop navigation menu */
  app-navbar-desktop,
  #navbar-menu,
  .nav-container {
    display: none !important;
  }

  /* Hide the social icons row in the desktop nav */
  .social-media-icons {
    display: none !important;
  }

  /* Hide the right side (login / actions) */
  .left.show-this-back {
    display: none !important;
  }

  /* Adjust the main nav container for mobile — logos to the left */
  #main-nav .main-container {
    padding: 8px 16px 8px 16px !important;
    justify-content: flex-start !important;
  }

  /* Make logo smaller on mobile */
  #main-nav .main-container .club-logo img {
    max-height: 40px !important;
    width: auto !important;
  }

  /* Hide the entire center section (title + desktop nav) on mobile
     so the header only shows logos + burger button */
  #main-nav .main-container .center {
    display: none !important;
  }
  .title-this,
  .title-this h1 {
    display: none !important;
  }

  /* Featured publications - full width */
  .featured-pub {
    min-height: 50vh !important;
  }

  /* Publication grid - force 2 columns (flexbox-based layout) */
  #pub-grid .grid.three app-publication-card,
  #pub-grid .grid.three app-skeleton-publication,
  #pub-grid .grid.four app-publication-card,
  #pub-grid .grid.four app-skeleton-publication {
    max-width: calc(50% - var(--module) / 2) !important;
    min-width: calc(50% - var(--module) / 2) !important;
    flex-grow: 1 !important;
  }
  #pub-grid .grid.three app-publication-card:not(:nth-child(2n)),
  #pub-grid .grid.three app-skeleton-publication:not(:nth-child(2n)),
  #pub-grid .grid.four app-publication-card:not(:nth-child(2n)),
  #pub-grid .grid.four app-skeleton-publication:not(:nth-child(2n)) {
    margin-right: var(--module) !important;
  }
  #pub-grid .grid.three app-publication-card:nth-child(2n),
  #pub-grid .grid.three app-skeleton-publication:nth-child(2n),
  #pub-grid .grid.four app-publication-card:nth-child(2n),
  #pub-grid .grid.four app-skeleton-publication:nth-child(2n) {
    margin-right: 0 !important;
  }
  #pub-grid .grid.three app-publication-card:nth-child(3n):not(:nth-child(2n)),
  #pub-grid .grid.three app-skeleton-publication:nth-child(3n):not(:nth-child(2n)) {
    margin-right: var(--module) !important;
  }

  /* Video section - stack vertically */
  .one-two {
    flex-direction: column !important;
  }
  .one-two .pub-list {
    width: 100% !important;
    min-width: unset !important;
    flex-direction: row !important;
    overflow-x: auto !important;
  }

  /* Footer - stack */
  .footer-store .main-container {
    flex-direction: column !important;
    text-align: center;
  }
  .footer-store .right {
    display: none !important;
  }
}

@media (max-width: 600px) {
  /* Two columns for publication cards on smaller mobile (same flexbox override) */
  #pub-grid .grid.three app-publication-card,
  #pub-grid .grid.three app-skeleton-publication,
  #pub-grid .grid.four app-publication-card,
  #pub-grid .grid.four app-skeleton-publication {
    max-width: calc(50% - var(--module) / 2) !important;
    min-width: calc(50% - var(--module) / 2) !important;
  }

  /* Title already hidden at 960px breakpoint */

  /* Smaller logo */
  #main-nav .main-container .club-logo img {
    max-height: 34px !important;
  }

  /* Tighter featured pubs */
  .featured-pub {
    min-height: 40vh !important;
  }

  /* Publication card titles */
  .clupik-title-h3 {
    font-size: 14px !important;
  }

  /* Cookie banner responsive */
  .fixed-footer .container {
    flex-direction: column !important;
    gap: 12px;
  }
  .fixed-footer .right {
    flex-direction: column !important;
    width: 100%;
  }
  .fixed-footer .right button,
  .fixed-footer .right app-button-main {
    width: 100% !important;
  }
  .clupik-button-component {
    width: 100% !important;
  }

  /* Footer legal text */
  #legal-footer {
    padding: 12px !important;
  }
  #legal-footer .links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  /* Burger button tighter */
  #fcmg-burger-btn {
    top: 22px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
  #fcmg-burger-btn span {
    width: 18px;
    height: 2px;
  }

  /* Title already hidden at 960px breakpoint */

  /* Drawer adjustments */
  #fcmg-mobile-drawer {
    width: 92vw;
  }
  .fcmg-drawer-nav > li > a,
  .fcmg-drawer-nav > li > .fcmg-drawer-parent {
    padding: 12px 18px;
    font-size: 14px;
  }
  .fcmg-drawer-submenu li a {
    padding: 10px 18px 10px 32px;
    font-size: 13px;
  }
}
