/*
Theme Name: IBA Event Portal
Theme URI: https://biogas-india.com/
Author: Indian Biogas Association
Author URI: https://biogas-india.com/
Description: Lightweight event and exhibitor portal theme designed for shortcode-driven and Custom HTML content. Optimized for the Bioenergy Exhibitor Portal plugin, full-width event landing pages, responsive navigation, and minimal style conflicts.
Version: 1.1.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Text Domain: iba-event-portal
Tags: events, full-width-template, custom-logo, custom-menu, featured-images, accessibility-ready
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root{
  --iba-blue:#1d5c9b;
  --iba-orange:#ed8223;
  --iba-green:#1d8a44;
  --iba-deep:#0b2742;
  --iba-ink:#172435;
  --iba-muted:#667588;
  --iba-line:#e4eaf0;
  --iba-bg:#f7f9fb;
  --iba-white:#fff;
  --iba-radius:16px;
  --iba-shadow:0 14px 38px rgba(12,42,68,.10);
  --iba-container:1200px;
  --iba-wide:1440px;
  --iba-header-height:78px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:#fff;color:var(--iba-ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px;line-height:1.65;overflow-x:hidden}
img{max-width:100%;height:auto}
a{color:var(--iba-blue);text-underline-offset:3px}
a:hover{color:var(--iba-orange)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid rgba(237,130,35,.45);outline-offset:3px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.screen-reader-text:focus{clip:auto!important;width:auto;height:auto;left:12px;top:12px;background:#fff;padding:10px 14px;z-index:100000;border-radius:8px;color:#111}

.iba-event-container{width:min(calc(100% - 40px),var(--iba-container));margin-inline:auto}
.iba-event-wide{width:min(calc(100% - 40px),var(--iba-wide));margin-inline:auto}
.iba-event-content{padding:46px 0 64px}
.iba-event-content--narrow{max-width:900px;margin-inline:auto}
.iba-event-fullbleed{width:100%;min-width:0}
.iba-event-entry-title{font-size:clamp(2rem,4vw,3.6rem);line-height:1.08;margin:0 0 28px;color:var(--iba-deep);letter-spacing:-.035em}
.iba-event-entry-content::after{content:"";display:table;clear:both}
.iba-event-entry-content>*:first-child{margin-top:0}
.iba-event-entry-content>*:last-child{margin-bottom:0}
.iba-event-entry-content h2,.iba-event-entry-content h3,.iba-event-entry-content h4{color:var(--iba-deep);line-height:1.2}
.iba-event-entry-content table{width:100%;border-collapse:collapse}
.iba-event-entry-content th,.iba-event-entry-content td{border:1px solid var(--iba-line);padding:10px 12px;text-align:left}
.iba-event-entry-content iframe{max-width:100%}

/* Announcement bar */
.iba-event-announcement{background:var(--iba-deep);color:#fff;font-size:14px}
.iba-event-announcement__inner{min-height:38px;display:flex;align-items:center;justify-content:center;gap:10px;text-align:center}
.iba-event-announcement a{color:#fff;font-weight:750;text-decoration:none}
.iba-event-announcement a:hover{text-decoration:underline}

/* Header */
.iba-event-header{position:relative;z-index:999;background:rgba(255,255,255,.98);border-bottom:1px solid var(--iba-line)}
.iba-event-header.is-sticky{position:sticky;top:0;box-shadow:0 7px 24px rgba(11,39,66,.08);backdrop-filter:saturate(180%) blur(14px)}
.admin-bar .iba-event-header.is-sticky{top:32px}
.iba-event-header__inner{min-height:var(--iba-header-height);display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:24px}
.iba-event-brand{display:flex;align-items:center;min-width:0;text-decoration:none;color:var(--iba-deep)}
.iba-event-brand .custom-logo{display:block;max-height:56px;width:auto}
.iba-event-brand__text{font-weight:850;font-size:19px;line-height:1.12;letter-spacing:-.02em}
.iba-event-nav{justify-self:end}
.iba-event-nav ul{display:flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0}
.iba-event-nav li{position:relative}
.iba-event-nav a{display:flex;align-items:center;padding:12px 11px;color:var(--iba-ink);font-size:14.5px;font-weight:700;text-decoration:none;border-radius:9px;white-space:nowrap}
.iba-event-nav a:hover,.iba-event-nav .current-menu-item>a,.iba-event-nav .current_page_item>a{color:var(--iba-blue);background:#f1f6fa}
.iba-event-nav .sub-menu{display:none;position:absolute;top:100%;left:0;min-width:220px;background:#fff;border:1px solid var(--iba-line);box-shadow:var(--iba-shadow);border-radius:12px;padding:8px;z-index:50}
.iba-event-nav li:hover>.sub-menu,.iba-event-nav li:focus-within>.sub-menu{display:block}
.iba-event-nav .sub-menu li{width:100%}
.iba-event-nav .sub-menu a{white-space:normal;padding:10px 12px}
.iba-event-header__cta{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 17px;border-radius:999px;background:var(--iba-orange);color:#fff!important;text-decoration:none;font-size:14px;font-weight:800;box-shadow:0 8px 20px rgba(237,130,35,.24)}
.iba-event-header__cta:hover{filter:brightness(.95);transform:translateY(-1px)}
.iba-event-menu-toggle{display:none;border:1px solid var(--iba-line);background:#fff;color:var(--iba-deep);width:44px;height:44px;border-radius:10px;align-items:center;justify-content:center}
.iba-event-menu-toggle svg{width:22px;height:22px}

/* Footer */
.iba-event-footer{background:var(--iba-deep);color:rgba(255,255,255,.78);margin-top:0}
.iba-event-footer__widgets{display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:42px;padding:52px 0 38px}
.iba-event-footer h2,.iba-event-footer h3,.iba-event-footer .widget-title{color:#fff;font-size:16px;margin:0 0 14px}
.iba-event-footer a{color:rgba(255,255,255,.9)}
.iba-event-footer ul{list-style:none;margin:0;padding:0}
.iba-event-footer li{margin:7px 0}
.iba-event-footer__brand .custom-logo{max-height:54px;width:auto;filter:brightness(0) invert(1)}
.iba-event-footer__brand-name{display:block;color:#fff;font-size:19px;font-weight:850;margin-bottom:10px}
.iba-event-footer__bottom{border-top:1px solid rgba(255,255,255,.12);padding:20px 0;font-size:13px}
.iba-event-footer__bottom-inner{display:flex;justify-content:space-between;gap:20px;align-items:center;flex-wrap:wrap}
.iba-event-footer__menu ul{display:flex;gap:16px;flex-wrap:wrap}

/* Posts/archives */
.iba-event-archive-head{padding:54px 0 24px;background:linear-gradient(135deg,#f2f7fb,#fff)}
.iba-event-archive-head h1{font-size:clamp(2rem,4vw,3.2rem);line-height:1.1;color:var(--iba-deep);margin:0}
.iba-event-post-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;padding:34px 0 62px}
.iba-event-card{background:#fff;border:1px solid var(--iba-line);border-radius:var(--iba-radius);overflow:hidden;box-shadow:0 8px 24px rgba(11,39,66,.05)}
.iba-event-card__thumb{display:block;aspect-ratio:16/9;background:#eff4f7;overflow:hidden}
.iba-event-card__thumb img{width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.iba-event-card:hover .iba-event-card__thumb img{transform:scale(1.035)}
.iba-event-card__body{padding:20px}
.iba-event-card h2{font-size:20px;line-height:1.25;margin:5px 0 9px}
.iba-event-card h2 a{color:var(--iba-deep);text-decoration:none}
.iba-event-card__meta{font-size:12px;color:var(--iba-muted);text-transform:uppercase;letter-spacing:.05em;font-weight:750}
.iba-event-pagination{padding-bottom:56px}
.iba-event-pagination .nav-links{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.iba-event-pagination .page-numbers{padding:9px 13px;border:1px solid var(--iba-line);border-radius:9px;text-decoration:none;background:#fff}
.iba-event-pagination .current{background:var(--iba-blue);border-color:var(--iba-blue);color:#fff}

/* 404 */
.iba-event-404{text-align:center;padding:90px 0 110px}
.iba-event-404 h1{font-size:clamp(3rem,10vw,8rem);margin:0;color:var(--iba-blue);line-height:1}
.iba-event-404 h2{font-size:clamp(1.6rem,3vw,2.4rem);margin:12px 0}
.iba-event-button{display:inline-flex;align-items:center;justify-content:center;padding:11px 18px;border-radius:999px;background:var(--iba-orange);color:#fff!important;text-decoration:none;font-weight:800}

/* Portal/plugin compatibility. Intentionally light-touch. */
body.iba-bep-page .iba-event-content{padding:0}
body.iba-bep-page .iba-event-entry-content{width:100%;max-width:none}
body.single-exhibitor .iba-event-main,body.single-bep_product .iba-event-main{min-width:0}
.bep-public-page{isolation:isolate}

/* WordPress alignment helpers */
.alignwide{width:min(100%,var(--iba-wide));margin-left:auto;margin-right:auto}
.alignfull{width:100vw;max-width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}
.wp-caption{max-width:100%}

@media (max-width:1024px){
  .iba-event-header__inner{grid-template-columns:auto auto;justify-content:space-between}
  .iba-event-menu-toggle{display:inline-flex;justify-self:end}
  .iba-event-nav{display:none;grid-column:1/-1;justify-self:stretch;padding:0 0 16px}
  .iba-event-nav.is-open{display:block}
  .iba-event-nav ul{display:block}
  .iba-event-nav a{padding:12px 6px;border-radius:0;border-bottom:1px solid #edf1f4}
  .iba-event-nav .sub-menu{display:block;position:static;box-shadow:none;border:0;padding:0 0 0 16px;background:transparent}
  .iba-event-header__cta{display:none}
  .iba-event-post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:782px){.admin-bar .iba-event-header.is-sticky{top:46px}}
@media (max-width:700px){
  :root{--iba-header-height:68px}
  .iba-event-container,.iba-event-wide{width:min(calc(100% - 28px),var(--iba-container))}
  .iba-event-brand .custom-logo{max-height:46px;max-width:190px}
  .iba-event-brand__text{font-size:17px}
  .iba-event-content{padding:34px 0 48px}
  .iba-event-post-grid{grid-template-columns:1fr;padding-top:24px}
  .iba-event-footer__widgets{grid-template-columns:1fr;gap:28px;padding-top:40px}
  .iba-event-footer__bottom-inner{align-items:flex-start;flex-direction:column}
  .iba-event-announcement__inner{padding:7px 0;line-height:1.35}
}

@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
