/*
TV Iranian Republic - RED THEME + MOBILE FIXES
Place this file AFTER static/public_modern/css/site.css in templates/public/partials/head.html
or copy its content to the bottom of site.css, then run collectstatic.
*/
:root{
  --brand-primary:#dc1f2a;
  --brand-primary-dark:#b9151f;
  --brand-secondary:#111827;
  --brand-accent:#ef233c;
  --brand-soft:#fff1f2;
  --brand-border:#e5e7eb;
  --brand-bg:#f3f4f6;
  --brand-card:#ffffff;
  --brand-text:#111827;
  --brand-muted:#6b7280;
}

body{background:var(--brand-bg);color:var(--brand-text);overflow-x:hidden;}
a{color:inherit;}

/* Header: keep the red design */
.site-header,.main-header,.masthead,.brand-header{
  background:linear-gradient(135deg,var(--brand-primary),var(--brand-primary-dark)) !important;
}
.site-title,.brand-title,.masthead-title{color:#fff!important;}
.site-subtitle,.brand-subtitle,.masthead-subtitle{color:rgba(255,255,255,.9)!important;}

/* Buttons */
.btn-primary,.read-more,.slider-button,.donation-link,.donation-button,.card-button{
  background:var(--brand-primary)!important;color:#fff!important;border-color:var(--brand-primary)!important;
}
.btn-primary:hover,.read-more:hover,.slider-button:hover,.donation-link:hover,.donation-button:hover{
  background:var(--brand-primary-dark)!important;
}

/* Section heading accent */
.section-title,.widget-title,.block-title,.content-title{
  border-right-color:var(--brand-primary)!important;
}
.section-title:before,.widget-title:before,.block-title:before{background:var(--brand-primary)!important;}

/* Cards */
.card,.post-card,.article-card,.widget-card,.sidebar-card,.content-card,.page-card{
  background:var(--brand-card)!important;border:1px solid var(--brand-border);border-radius:18px;box-shadow:0 14px 35px rgba(15,23,42,.06);
}

/* Slider fixes */
.hero-slider .slider-arrow,.main-slider .slider-arrow,.slider-arrow,.swiper-button-next,.swiper-button-prev{
  display:none!important;
}
.hero-slider .badge,.main-slider .badge,.slide-badge,.slider-badge{
  display:none!important;
}
.slider-button[href=""],.slider-button:not([href]),.slide-button[href=""],.slide-button:not([href]){
  display:none!important;
}
.hero-slider,.main-slider,.slider,.swiper,.swiper-slide{
  max-width:100%!important;overflow:hidden!important;
}

/* Donation/search: one icon, side by side on mobile */
.donation-link::before,.donation-link::after,.donation-button::before,.donation-button::after{content:none!important;display:none!important;}
.donation-link .donation-icon:not(:first-of-type),.donation-button .donation-icon:not(:first-of-type){display:none!important;}

/* Footer social links: icons only on narrow screens */
.footer-social a,.footer .social-link{white-space:nowrap;}

/* Mobile/tablet hard fixes */
@media (max-width:900px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;}
  *{box-sizing:border-box;}
  img,video,iframe{max-width:100%!important;height:auto;}
  .container,.site-container,.page-container,.main-container,.content-container,
  .home-layout,.content-layout,.page-layout,.article-layout,.list-layout,.detail-layout,
  .site-main,main,section,header,footer{
    width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important;
  }
  .masthead-inner,.brand-header-inner,.header-inner{
    width:100%!important;max-width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:12px!important;align-items:center!important;justify-content:space-between!important;padding:18px 16px!important;
  }
  .site-logo,.brand-logo,.masthead-logo{width:58px!important;height:58px!important;flex:0 0 auto!important;}
  .site-title,.brand-title,.masthead-title{font-size:24px!important;line-height:1.35!important;white-space:normal!important;max-width:calc(100% - 76px)!important;}
  .site-subtitle,.brand-subtitle,.masthead-subtitle{display:none!important;}
  .masthead-actions,.header-actions,.mobile-header-actions{
    width:100%!important;display:flex!important;flex-direction:row!important;gap:10px!important;align-items:center!important;justify-content:center!important;margin-top:8px!important;
  }
  .donation-link,.donation-button,.search-button,.search-toggle,.mobile-search-button{
    width:calc(50% - 5px)!important;max-width:220px!important;min-width:0!important;height:44px!important;border-radius:999px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;white-space:nowrap!important;
  }
  .search-button,.search-toggle,.mobile-search-button{background:rgba(255,255,255,.12)!important;color:#fff!important;border:1px solid rgba(255,255,255,.35)!important;}

  /* Simple stable RTL drawer */
  .mobile-drawer,.site-mobile-drawer,.drawer-menu{
    position:fixed!important;top:0!important;right:0!important;left:auto!important;width:min(300px,86vw)!important;max-width:86vw!important;height:100dvh!important;background:#fff!important;color:#111827!important;z-index:99999!important;transform:translateX(100%)!important;transition:transform .25s ease!important;overflow-y:auto!important;overflow-x:hidden!important;box-shadow:-20px 0 50px rgba(15,23,42,.25)!important;
  }
  body.drawer-open .mobile-drawer,body.drawer-open .site-mobile-drawer,body.drawer-open .drawer-menu,
  .mobile-drawer.is-open,.site-mobile-drawer.is-open,.drawer-menu.is-open{transform:translateX(0)!important;}
  .mobile-backdrop,.drawer-backdrop{position:fixed!important;inset:0!important;background:rgba(15,23,42,.55)!important;z-index:99998!important;display:none!important;}
  body.drawer-open .mobile-backdrop,body.drawer-open .drawer-backdrop,.mobile-backdrop.is-open,.drawer-backdrop.is-open{display:block!important;}
  body.drawer-open{overflow:hidden!important;touch-action:none;}
  .mobile-drawer a,.site-mobile-drawer a,.drawer-menu a{color:#111827!important;display:block!important;width:100%!important;padding:16px 22px!important;border-bottom:1px solid #eef2f7!important;text-align:right!important;white-space:normal!important;}
  .drawer-close,.mobile-drawer-close{color:#111827!important;background:#fff!important;border:1px solid #e5e7eb!important;}

  /* Hide sidebars before content on mobile */
  .detail-sidebar,.list-sidebar,.article-sidebar,.page-sidebar,.left-sidebar,.right-sidebar{display:none!important;}

  /* Slider mobile proportions - keep old visual size without overflow */
  .hero-slider,.main-slider,.slider{border-radius:18px!important;min-height:250px!important;max-height:300px!important;}
  .slide-title,.slider-title,.hero-slider h1,.hero-slider h2{font-size:22px!important;line-height:1.5!important;max-width:90%!important;}
  .slide-summary,.slider-summary{display:none!important;}
  .slide-button,.slider-button{height:42px!important;padding:0 18px!important;border-radius:999px!important;}

  /* Cards */
  .article-card,.post-card{border-radius:18px!important;overflow:hidden!important;}
  .article-card .summary,.post-card .summary,.article-card .excerpt,.post-card .excerpt{display:none!important;}

  /* Footer: icons only, no labels causing overflow */
  .footer-inner,.footer-grid,.footer-social,.social-links,.social-icons{width:100%!important;max-width:100%!important;display:flex!important;flex-wrap:wrap!important;justify-content:center!important;gap:12px!important;overflow:hidden!important;}
  .footer-social a,.social-links a,.social-icons a{width:44px!important;height:44px!important;max-width:44px!important;overflow:hidden!important;font-size:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:50%!important;}
  .footer-social a svg,.social-links a svg,.social-icons a svg,.footer-social a i,.social-links a i,.social-icons a i{font-size:20px!important;}
}
