/*
Theme Name: MediaGen
Theme URI: https://mediagen.co.in
Author: ZDK / Shamaas
Author URI: https://mediagen.co.in
Description: Custom MediaGen agency theme - pixel-matched to design. IP enforcement / media agency.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: mediagen
*/

/* ============ RESET / BASE ============ */
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  font-family:'Poppins',Arial,Helvetica,sans-serif;
  color:#444;
  background:#fff;
  line-height:1.6;
  font-size:15px;
  overflow-x:hidden;
}
a{text-decoration:none;color:inherit;transition:all .25s ease;}
img{max-width:100%;height:auto;display:block;}
ul{list-style:none;}
.container{max-width:1640px;margin:0 auto;padding:0 20px;}

/* ============ HEADER ============ */
.site-header{
  background:#fff;
  padding:18px 0;
  position:relative;
  z-index:50;
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  max-width:1880px;
  margin:0 auto;
  padding:0 30px;
}
.site-logo{
  display:flex;
  align-items:center;
  font-weight:700;
  font-size:22px;
  color:#0f4c81;
  border:none !important;
  background:none !important;
}
.site-logo a,.site-logo .custom-logo-link{border:none !important;background:none !important;}
.site-logo img{max-height:64px;width:auto;}

/* ---- NAV ---- */
.main-nav{flex:1;display:flex;justify-content:center;}
.main-nav ul{display:flex;align-items:center;gap:38px;}
.main-nav > ul > li{position:relative;}
.main-nav > ul > li > a{
  font-weight:600;
  font-size:16px;
  color:#222;
  padding:10px 0;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.main-nav > ul > li > a:hover{color:#2196d6;}
/* caret */
.main-nav .menu-item-has-children > a::after{
  content:"";
  display:inline-block;
  width:0;height:0;
  border-left:5px solid transparent;
  border-right:5px solid transparent;
  border-top:6px solid currentColor;
  margin-left:4px;
}
/* dropdown */
.main-nav ul ul{
  display:block;
  position:absolute;
  top:100%;left:0;
  background:#fff;
  min-width:210px;
  box-shadow:0 8px 24px rgba(0,0,0,.12);
  padding:8px 0;
  opacity:0;visibility:hidden;
  transform:translateY(10px);
  transition:all .25s ease;
  z-index:60;
}
.main-nav ul li:hover > ul{opacity:1;visibility:visible;transform:translateY(0);}
.main-nav ul ul li a{
  display:block;
  padding:9px 20px;
  font-size:14px;
  font-weight:500;
  color:#444;
  white-space:nowrap;
}
.main-nav ul ul li a:hover{background:#f5f7f9;color:#2196d6;}

/* mobile toggle */
.nav-toggle{display:none;background:none;border:none;cursor:pointer;flex-direction:column;gap:5px;padding:8px;}
.nav-toggle span{display:block;width:26px;height:3px;background:#222;border-radius:2px;}

/* ============ BREADCRUMB BAR ============ */
.breadcrumb-bar{
  background:#2196d6;
  color:#fff;
  padding:14px 0;
}
.breadcrumb-bar .container{max-width:1880px;padding:0 30px;}
.breadcrumb-bar a,.breadcrumb-bar span{
  color:#fff;
  font-weight:600;
  font-size:15px;
}
.breadcrumb-bar .sep{margin:0 8px;font-weight:400;}

/* ============ HERO BANNER ============ */
.hero-banner{width:100%;overflow:hidden;line-height:0;}
.hero-banner img{width:100%;height:auto;object-fit:cover;}

/* ============ PAGE TITLE ============ */
.page-title{
  text-align:center;
  font-size:42px;
  font-weight:600;
  color:#555;
  margin:55px 0 45px;
  letter-spacing:.5px;
}

/* ============ MEDIA + TEXT SECTION ============ */
.media-text{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:55px;
  align-items:start;
  max-width:1180px;
  margin:0 auto 60px;
  padding:0 20px;
}
.media-text.reverse{grid-template-columns:1fr 1fr;}
.media-text .mt-img img{width:100%;}
.media-text h3{
  font-size:26px;
  font-weight:600;
  color:#222;
  margin-bottom:16px;
}
.media-text h3:not(:first-child){margin-top:34px;}
.media-text p{
  color:#777;
  font-size:15px;
  margin-bottom:16px;
  line-height:1.75;
}
.media-text hr{border:none;border-top:1px solid #e5e5e5;margin:30px 0;}
.media-text .lead-title{
  font-size:30px;
  font-weight:600;
  color:#222;
  line-height:1.35;
  margin-bottom:22px;
}
.media-text a.inline{color:#222;font-weight:600;}


/* ============ CTA STRIP ============ */
.cta-strip{
  text-align:center;
  padding:30px 0 70px;
}
.cta-strip a{
  font-size:24px;
  font-weight:500;
  color:#333;
  display:inline-flex;
  align-items:center;
  gap:14px;
}
.cta-strip a:hover{color:#2196d6;}
.cta-strip .arrow{
  display:inline-block;
  font-size:26px;
  transition:transform .25s ease;
}
.cta-strip a:hover .arrow{transform:translateX(8px);}

/* ============ FOOTER ============ */
.site-footer{
  background:#111;
  color:#bbb;
  padding:55px 0 0;
}
.footer-inner{
  max-width:1880px;
  margin:0 auto;
  padding:0 30px;
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr 1.2fr;
  gap:40px;
}
.footer-logo{
  display:flex;
  align-items:center;
  font-weight:700;
  color:#fff;
  font-size:20px;
  margin-bottom:30px;
  border:none !important;
  background:none !important;
}
.footer-logo a,.footer-logo .custom-logo-link{border:none !important;background:none !important;}
.footer-logo img{max-height:74px;width:auto;}
.footer-col h4{
  color:#fff;
  font-size:18px;
  font-weight:700;
  letter-spacing:.5px;
  margin-bottom:22px;
  text-transform:uppercase;
}
.footer-col ul li{margin-bottom:13px;}
.footer-col ul li a{
  color:#bbb;
  font-size:14.5px;
  position:relative;
  padding-left:14px;
  display:inline-block;
}
.footer-col ul li a::before{
  content:"\203A";
  position:absolute;
  left:0;top:-1px;
  color:#bbb;
}
.footer-col ul li a:hover{color:#2196d6;}
.footer-contact p{
  display:flex;
  gap:10px;
  font-size:14.5px;
  color:#bbb;
  margin-bottom:18px;
  line-height:1.6;
}
.footer-contact .ico{color:#888;margin-top:3px;flex-shrink:0;}
.footer-map{
  width:100%;
  max-width:260px;
  height:120px;
  margin:6px 0 22px;
  border:0;
  overflow:hidden;
  border-radius:2px;
}
.footer-map iframe{width:100%;height:100%;border:0;}
.footer-login{font-size:15px;color:#ccc;}
.footer-login a:hover{color:#2196d6;}

.footer-bottom{
  border-top:1px solid #222;
  margin-top:45px;
  padding:20px 0;
  text-align:center;
  font-size:13.5px;
  color:#777;
}

/* back to top */
.back-top{
  position:fixed;
  right:24px;bottom:24px;
  width:42px;height:42px;
  background:#2196d6;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:3px;
  font-size:18px;
  opacity:0;visibility:hidden;
  transition:all .3s ease;
  z-index:99;
  cursor:pointer;
}
.back-top.show{opacity:1;visibility:visible;}

/* ============ RESPONSIVE ============ */
@media(max-width:1024px){
  .footer-inner{grid-template-columns:repeat(2,1fr);}
  .page-title{font-size:34px;}
}
@media(max-width:768px){
  .nav-toggle{display:flex;}
  .main-nav{
    position:absolute;
    top:100%;left:0;right:0;
    background:#fff;
    flex-direction:column;
    box-shadow:0 8px 24px rgba(0,0,0,.12);
    display:none;
    padding:10px 0;
  }
  .main-nav.open{display:flex;}
  .main-nav ul{flex-direction:column;gap:0;width:100%;}
  .main-nav > ul > li{width:100%;}
  .main-nav > ul > li > a{padding:12px 24px;width:100%;}
  .main-nav ul ul{
    position:static;opacity:1;visibility:visible;transform:none;
    box-shadow:none;background:#f7f7f7;padding-left:18px;
    display:none;
  }
  .main-nav ul li.open-sub > ul{display:block;}
  .header-inner{padding:0 18px;}
  .site-logo{width:180px;height:60px;font-size:16px;}

  .media-text{grid-template-columns:1fr;gap:30px;}
  .media-text.reverse .mt-img{order:-1;}
  .footer-inner{grid-template-columns:1fr;}
  .page-title{font-size:28px;margin:35px 0 30px;}
  .media-text .lead-title{font-size:24px;}
  .cta-strip a{font-size:19px;}
}

/* ============ GUTENBERG BLOCK LAYOUT (page content) ============ */
.mg-page-content{max-width:1180px;margin:0 auto;padding:0 20px 40px;}

/* Page title (H1) */
.mg-page-title{
  text-align:center;
  font-size:42px !important;
  font-weight:600;
  color:#555;
  margin:55px 0 45px !important;
  letter-spacing:.5px;
}

/* media + text columns */
.mg-media-text{gap:55px !important;align-items:flex-start !important;margin-bottom:55px !important;}
.mg-media-text .wp-block-column h3{font-size:26px;font-weight:600;color:#222;margin:0 0 16px;}
.mg-media-text .wp-block-column h3:not(:first-child){margin-top:34px;}
.mg-media-text .wp-block-column p{color:#777;font-size:15px;line-height:1.75;margin:0 0 16px;}
.mg-media-text .wp-block-separator{border-top:1px solid #e5e5e5;margin:30px 0;opacity:1;}
.mg-media-text img{width:100%;height:auto;}
.mg-lead-title{font-size:30px !important;font-weight:600;color:#222;line-height:1.35;margin:0 0 22px !important;}
.mg-reverse .wp-block-column:first-child{order:1;}
.mg-reverse .wp-block-column:last-child{order:2;}

/* 4-column pillars */
.mg-pillars{
  border:1px solid #2196d6;
  padding:40px 35px !important;
  gap:30px !important;
  margin:20px auto 70px !important;
}
.mg-pillar-head{
  border:1px solid #d6d6d6 !important;
  background:#f6f6f6;
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-weight:700 !important;
  font-size:19px !important;
  color:#333 !important;
  padding:8px 10px !important;
  margin:0 0 24px !important;
}
.mg-pillars .wp-block-list{margin:0;padding:0;list-style:none;}
.mg-pillars .wp-block-list li{
  position:relative;padding-left:16px;margin-bottom:14px;
  font-size:13.5px;color:#555;line-height:1.5;
}
.mg-pillars .wp-block-list li::before{
  content:"";position:absolute;left:0;top:7px;
  width:6px;height:6px;border-radius:50%;background:#555;
}

/* CTA */
.mg-cta{padding:30px 0 50px !important;}
.mg-cta a{font-size:24px;font-weight:500;color:#333;}
.mg-cta a:hover{color:#2196d6;}

@media(max-width:1024px){
  .mg-pillars{flex-wrap:wrap !important;}
  .mg-pillars .wp-block-column{flex-basis:calc(50% - 15px) !important;}
}
@media(max-width:768px){
  .mg-media-text{flex-direction:column !important;gap:30px !important;}
  .mg-media-text .wp-block-column{flex-basis:100% !important;}
  .mg-reverse .wp-block-column:first-child{order:2;}
  .mg-reverse .wp-block-column:last-child{order:1;}
  .mg-pillars{flex-direction:column !important;}
  .mg-pillars .wp-block-column{flex-basis:100% !important;}
  .mg-page-title{font-size:28px !important;margin:35px 0 30px !important;}
  .mg-lead-title{font-size:24px !important;}
  .mg-cta a{font-size:19px;}
}

/* ============================================================
   HOME PAGE SECTIONS
   ============================================================ */
.mg-home-content > *{}

/* Cover banner 1 (top hero image) */
.mg-cover-banner{width:100%;line-height:0;}
.mg-cover-banner img.mg-cover-img{width:100%;height:auto;display:block;}

/* Section titles + intro */
.mg-section-title{
  text-align:center;font-size:36px !important;font-weight:600;color:#555;
  margin:55px 0 18px !important;
}
.mg-intro{
  text-align:center;color:#777;font-size:15px;max-width:760px;
  margin:0 auto 36px !important;line-height:1.75;
}

/* What We Do - 3 cards */
.mg-do-cards{max-width:1180px;margin:0 auto 55px !important;padding:0 20px;gap:26px !important;align-items:flex-start !important;}
.mg-do-head{
  background:#2196d6 !important;color:#fff !important;
  padding:15px 20px !important;font-size:19px !important;font-weight:600 !important;
  margin:0 0 16px !important;position:relative;padding-left:52px !important;
}
.mg-do-head::before{
  content:"";position:absolute;left:18px;top:50%;transform:translateY(-50%);
  width:22px;height:22px;background-size:contain;background-repeat:no-repeat;
}
.mg-do-protection::before{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6'><path d='M12 2l8 3v6c0 5-3.5 8-8 11-4.5-3-8-6-8-11V5z'/><path d='M9 12l2 2 4-4'/></svg>");}
.mg-do-research::before{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4-4'/></svg>");}
.mg-do-policy::before{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6'><path d='M6 2h9l5 5v15H6z'/><path d='M14 2v6h6'/><path d='M9 13h7M9 17h7'/></svg>");}
.mg-do-cards .wp-block-column p{color:#777;font-size:14px;line-height:1.75;margin:0;}

/* Stats strip (blue) */
.mg-stats-strip{background:#0f4c81;color:#fff;padding:42px 20px;text-align:center;margin:10px 0 0;}
.mg-stats-title{font-size:24px;font-weight:600;letter-spacing:.5px;margin-bottom:30px;}
.mg-stats-grid{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:repeat(4,1fr);gap:20px;}
.mg-stat-num{font-size:42px;font-weight:700;color:#7fc4f0;line-height:1;}
.mg-stat-lbl{font-size:15px;margin-top:8px;color:#e7f1fa;}

/* Advantages: image left + blue 8-feature box */
.mg-adv{max-width:1180px;margin:0 auto 50px;padding:0 20px;display:grid;grid-template-columns:1fr 1fr;}
.mg-adv-img{background:#e6e9ec;display:flex;align-items:center;justify-content:center;min-height:340px;overflow:hidden;}
.mg-adv-img img{width:100%;height:100%;object-fit:cover;}
.mg-adv-img .mg-img-ph{color:#9aa1a6;font-size:13px;}
.mg-adv-box{background:#2196d6;color:#fff;padding:36px 32px;display:flex;align-items:center;}
.mg-adv-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px 22px;width:100%;}
.mg-adv-item{display:flex;align-items:center;gap:12px;font-size:16px;font-weight:500;line-height:1.25;}
.mg-adv-item .mg-ic{width:34px;height:34px;flex-shrink:0;stroke:#fff;}

/* 9 features grid */
.mg-features{max-width:1180px;margin:0 auto 55px;padding:0 20px;display:grid;grid-template-columns:repeat(3,1fr);gap:40px 24px;}
.mg-feature{text-align:center;}
.mg-feature-ic{display:flex;justify-content:center;margin-bottom:12px;}
.mg-feature-ic .mg-ic{width:44px;height:44px;stroke:#222;}
.mg-feature p{font-size:14px;color:#666;line-height:1.6;margin:0;}

/* Genre banner (cover 2) */
.mg-genre-banner{
  background:#0f4c81;background-size:cover;background-position:center;
  position:relative;padding:40px 20px;margin:10px 0;color:#fff;
}
.mg-genre-banner::before{content:"";position:absolute;inset:0;background:rgba(15,76,129,.82);}
.mg-genre-inner{position:relative;max-width:1180px;margin:0 auto;display:grid;grid-template-columns:1fr 1.6fr;gap:30px;align-items:center;}
.mg-genre-title{font-size:24px;font-weight:700;line-height:1.3;}
.mg-genre-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:24px 18px;}
.mg-genre-item{text-align:center;font-size:14px;font-weight:500;}
.mg-genre-item .mg-ic{width:40px;height:40px;margin:0 auto 6px;stroke:#fff;display:block;}
.mg-genre-link{color:#fff;display:block;}

/* What's New title spacing */
.mg-section-title + .mg-cta-blue{margin-top:20px;}

/* Looking For Solutions (blue CTA) */
.mg-cta-blue{
  background:#2196d6;color:#fff;max-width:none !important;
  margin:20px 0 0 !important;padding:46px max(20px,calc((100% - 1180px)/2)) !important;
  gap:34px !important;align-items:center !important;
}
.mg-cta-title{font-size:28px !important;font-weight:700;line-height:1.25;margin:0 0 16px !important;color:#fff;}
.mg-cta-blue p{font-size:14px;line-height:1.7;color:#e8f1fa;margin:0 0 22px;}
.mg-cta-btn .wp-block-button__link{background:#fff;color:#222;border-radius:0;padding:13px 32px;font-weight:600;}
.mg-cta-blue img{width:100%;height:auto;}

/* Top Searches (dark) */
.mg-top-searches-title{
  background:#141414;color:#fff !important;font-size:22px !important;font-weight:700;
  margin:0 !important;padding:40px max(20px,calc((100% - 1180px)/2)) 16px !important;
}
.mg-top-searches{
  background:#141414;color:#9a9a9a !important;font-size:13px;line-height:2;
  margin:0 !important;padding:0 max(20px,calc((100% - 1180px)/2)) !important;
}
.mg-top-searches:last-of-type{padding-bottom:40px !important;}

@media(max-width:900px){
  .mg-do-cards,.mg-features{grid-template-columns:1fr !important;}
  .mg-stats-grid{grid-template-columns:repeat(2,1fr);gap:30px 20px;}
  .mg-adv{grid-template-columns:1fr;}
  .mg-genre-inner{grid-template-columns:1fr;}
  .mg-genre-grid{grid-template-columns:repeat(3,1fr);}
  .mg-cta-blue{flex-direction:column !important;}
  .mg-section-title{font-size:28px !important;}
}
@media(max-width:560px){
  .mg-stats-grid{grid-template-columns:1fr;}
  .mg-genre-grid{grid-template-columns:repeat(2,1fr);}
  .mg-adv-grid{grid-template-columns:1fr;}
}
