/* ==========================================================
   CG FOUNDATION — inner-pages.css + forms.css + animation.css + responsive.css
   ========================================================== */

/* ── INNER PAGES ── */

/* About Section */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--cgf-gray-200); }
.timeline-item { position: relative; padding-bottom: 2.5rem; padding-left: 1.5rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.35rem; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cgf-primary); border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(30,107,58,.2);
}
.timeline-date { font-size: .8rem; font-weight: 700; color: var(--cgf-primary); text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-ui); margin-bottom: .3rem; }
.timeline-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: .4rem; }
.timeline-text { font-size: .875rem; color: var(--cgf-gray-500); }

/* Team Cards */
.team-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); text-align: center; transition: all .3s ease; }
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.team-img { width: 100%; height: 260px; object-fit: cover; object-position: top; }
.team-body { padding: 1.5rem; }
.team-name { font-size: 1rem; font-weight: 700; margin-bottom: .2rem; }
.team-role { font-size: .8125rem; color: var(--cgf-primary); font-weight: 600; font-family: var(--font-ui); margin-bottom: .75rem; }
.team-socials { display: flex; justify-content: center; gap: .5rem; }
.team-socials a { width: 32px; height: 32px; background: var(--cgf-gray-100); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; color: var(--cgf-gray-600); transition: all .2s ease; }
.team-socials a:hover { background: var(--cgf-primary); color: #fff; }

/* Blog Detail */
.blog-detail-header { padding: 120px 0 60px; background: linear-gradient(135deg, var(--cgf-dark) 0%, var(--cgf-dark-2) 100%); }
.blog-detail-header h1 { color: #fff; }
.blog-detail-meta { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.blog-detail-meta span { color: rgba(255,255,255,.65); font-size: .875rem; display: flex; align-items: center; gap: 5px; }
.blog-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.blog-content h3 { margin-top: 2rem; margin-bottom: .75rem; }
.blog-content p { font-size: 1.0625rem; line-height: 1.85; color: var(--cgf-gray-700); }
.blog-content ul, .blog-content ol { padding-left: 1.75rem; margin-bottom: 1.5rem; }
.blog-content li { font-size: 1rem; line-height: 1.8; color: var(--cgf-gray-700); margin-bottom: .4rem; }
.blog-content blockquote {
  border-left: 4px solid var(--cgf-primary); padding: 1.25rem 1.75rem;
  background: rgba(30,107,58,.05); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0; font-style: italic; font-size: 1.0625rem; color: var(--cgf-gray-700);
}
.blog-content img { border-radius: var(--radius-lg); margin: 1.5rem 0; }

/* TOC Sidebar */
.toc-sidebar { position: sticky; top: 100px; }
.toc-box { background: var(--cgf-gray-100); border-radius: var(--radius-lg); padding: 1.5rem; border-left: 4px solid var(--cgf-primary); }
.toc-title { font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--cgf-gray-900); margin-bottom: 1rem; font-family: var(--font-ui); }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li a { font-size: .85rem; color: var(--cgf-gray-600); font-family: var(--font-ui); display: block; padding: .3rem 0; border-bottom: 1px solid var(--cgf-gray-200); transition: color .2s ease; }
.toc-list li a:hover, .toc-list li a.active { color: var(--cgf-primary); }
.toc-list li.toc-h3 a { padding-left: 1rem; font-size: .82rem; }

/* Share Buttons */
.share-btns { display: flex; flex-direction: column; gap: .75rem; position: sticky; top: 120px; }
.share-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; color: #fff; transition: transform .2s ease; }
.share-btn:hover { transform: scale(1.1); color: #fff; }
.share-twitter { background: #1da1f2; }
.share-linkedin { background: #0077b5; }
.share-facebook { background: #1877f2; }
.share-copy { background: var(--cgf-gray-600); }

/* Case Study Detail */
.cs-challenge-section { background: rgba(232,93,38,.05); border-left: 4px solid var(--cgf-accent); padding: 2rem; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.cs-solution-section { background: rgba(30,107,58,.05); border-left: 4px solid var(--cgf-primary); padding: 2rem; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.cs-result-section { background: rgba(13,148,136,.05); border-left: 4px solid var(--cgf-teal); padding: 2rem; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }

/* Stats Boxes */
.stat-box { background: #fff; border-radius: var(--radius-lg); padding: 2rem; text-align: center; box-shadow: var(--shadow-card); }
.stat-box .stat-num { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; color: var(--cgf-primary); line-height: 1; margin-bottom: .4rem; }
.stat-box .stat-label { font-size: .875rem; color: var(--cgf-gray-500); }

/* FAQ Accordion */
.faq-accordion .accordion-item { border: 1px solid var(--cgf-gray-200); border-radius: var(--radius-md) !important; margin-bottom: .75rem; overflow: hidden; }
.faq-accordion .accordion-button { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; color: var(--cgf-gray-900); background: #fff; padding: 1.25rem 1.5rem; }
.faq-accordion .accordion-button:not(.collapsed) { background: rgba(30,107,58,.04); color: var(--cgf-primary); box-shadow: none; }
.faq-accordion .accordion-button::after { filter: invert(0); }
.faq-accordion .accordion-button:not(.collapsed)::after { filter: none; }
.faq-accordion .accordion-body { font-size: .9375rem; color: var(--cgf-gray-600); line-height: 1.75; padding: 1rem 1.5rem 1.5rem; }

/* Project Map */
.project-map-section { background: var(--cgf-gray-100); }
.india-map-container { position: relative; max-width: 560px; margin: 0 auto; }
.india-map-svg { width: 100%; }
.map-marker {
  position: absolute; width: 24px; height: 24px; background: var(--cgf-primary);
  border: 3px solid #fff; border-radius: 50%; cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(30,107,58,.4);
  transition: all .25s ease;
}
.map-marker:hover, .map-marker.active { background: var(--cgf-secondary); transform: translate(-50%, -50%) scale(1.3); }
.map-marker::after { content: ''; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--cgf-primary); }
.map-marker:hover::after { border-top-color: var(--cgf-secondary); }

.location-detail-panel { transition: all .4s ease; min-height: 400px; }
.location-card { background: #fff; border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-card); }
.location-card h4 { color: var(--cgf-primary); margin-bottom: .5rem; }
.location-stat { display: flex; justify-content: space-between; padding: .75rem 0; border-bottom: 1px solid var(--cgf-gray-200); font-size: .875rem; }
.location-stat:last-child { border-bottom: none; }
.location-stat strong { color: var(--cgf-gray-900); font-weight: 700; }

/* Newsroom */
.news-filter-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.news-tab {
  padding: .5rem 1.25rem; border-radius: var(--radius-full); font-size: .875rem; font-weight: 600;
  font-family: var(--font-ui); cursor: pointer; border: 2px solid var(--cgf-gray-300); color: var(--cgf-gray-600);
  transition: all .2s ease; background: transparent;
}
.news-tab:hover, .news-tab.active { background: var(--cgf-primary); border-color: var(--cgf-primary); color: #fff; }

.media-kit-card { background: var(--cgf-primary); border-radius: var(--radius-lg); padding: 1.5rem; color: #fff; }
.media-kit-card h5 { color: #fff; font-size: .9375rem; margin-bottom: 1rem; }
.media-kit-item { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.media-kit-item:last-child { border-bottom: none; }
.media-kit-thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; }
.media-kit-label { font-size: .875rem; color: rgba(255,255,255,.85); font-family: var(--font-ui); }

/* ── FORMS ── */
.cgf-form .form-label { font-size: .875rem; font-weight: 600; color: var(--cgf-gray-700); font-family: var(--font-ui); margin-bottom: .4rem; }
.cgf-form .form-control, .cgf-form .form-select {
  border: 1.5px solid var(--cgf-gray-300); border-radius: var(--radius-md);
  padding: .75rem 1rem; font-size: .9375rem; font-family: var(--font-body);
  color: var(--cgf-gray-700); background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.cgf-form .form-control:focus, .cgf-form .form-select:focus {
  border-color: var(--cgf-primary); box-shadow: 0 0 0 3px rgba(30,107,58,.12); outline: none;
}
.cgf-form .form-control.is-invalid { border-color: var(--cgf-danger); }
.cgf-form .invalid-feedback { font-size: .8125rem; color: var(--cgf-danger); font-family: var(--font-ui); }
.cgf-form textarea.form-control { min-height: 120px; resize: vertical; }

.contact-info-item { display: flex; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--cgf-gray-200); }
.contact-icon { width: 48px; height: 48px; background: rgba(30,107,58,.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--cgf-primary); font-size: 1.125rem; flex-shrink: 0; }
.contact-info-title { font-weight: 700; font-size: .9375rem; margin-bottom: .2rem; }
.contact-info-value { font-size: .875rem; color: var(--cgf-gray-500); font-family: var(--font-ui); }

/* Auth Forms */
.auth-page { min-height: 100vh; background: linear-gradient(135deg, var(--cgf-dark) 0%, var(--cgf-dark-2) 100%); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { background: #fff; border-radius: var(--radius-xl); padding: 3rem; width: 100%; max-width: 440px; box-shadow: var(--shadow-xl); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 2rem; }
.auth-title { text-align: center; margin-bottom: 2rem; }
.auth-divider { position: relative; text-align: center; margin: 1.5rem 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--cgf-gray-200); }
.auth-divider span { background: #fff; padding: 0 1rem; color: var(--cgf-gray-500); font-size: .8125rem; position: relative; }

/* ── ANIMATIONS ── */
[data-aos="fade-up"]    { opacity: 0; transform: translateY(30px); }
[data-aos="fade-down"]  { opacity: 0; transform: translateY(-30px); }
[data-aos="fade-left"]  { opacity: 0; transform: translateX(30px); }
[data-aos="fade-right"] { opacity: 0; transform: translateX(-30px); }
[data-aos="zoom-in"]    { opacity: 0; transform: scale(.9); }
[data-aos].aos-animate  { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }

.reveal-text { overflow: hidden; }
.reveal-text span { display: inline-block; transform: translateY(100%); transition: transform .7s cubic-bezier(.16,1,.3,1); }
.reveal-text.revealed span { transform: translateY(0); }

@keyframes fadeInUp   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes fadeInRight{ from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes scaleIn    { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse      { 0%,100% { box-shadow: 0 0 0 0 rgba(30,107,58,.4); } 70% { box-shadow: 0 0 0 12px rgba(30,107,58,0); } }

.animate-fade-up      { animation: fadeInUp   .7s ease both; }
.animate-fade-left    { animation: fadeInLeft .7s ease both; }
.animate-fade-right   { animation: fadeInRight .7s ease both; }
.animate-scale-in     { animation: scaleIn    .6s ease both; }
.animate-pulse        { animation: pulse 2s infinite; }

.delay-100 { animation-delay: .1s !important; }
.delay-200 { animation-delay: .2s !important; }
.delay-300 { animation-delay: .3s !important; }
.delay-400 { animation-delay: .4s !important; }
.delay-500 { animation-delay: .5s !important; }
.delay-600 { animation-delay: .6s !important; }

/* Parallax helper */
.parallax-element { will-change: transform; }

/* Page transition overlay */
.page-transition {
  position: fixed; inset: 0; background: var(--cgf-primary); z-index: 9998;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .5s cubic-bezier(.77,0,.175,1);
}
.page-transition.enter { transform: scaleY(1); transform-origin: bottom; }
.page-transition.leave { transform: scaleY(0); transform-origin: top; }

/* ── DARK MODE ── */
body.dark-mode {
  background: var(--cgf-dark); color: rgba(255,255,255,.8);
}
body.dark-mode .main-header { background: var(--cgf-dark-2); border-bottom: 1px solid rgba(255,255,255,.07); }
body.dark-mode .main-nav-link { color: rgba(255,255,255,.75) !important; }
body.dark-mode .main-nav-link:hover { color: var(--cgf-primary) !important; }
body.dark-mode .mega-menu-wrapper { background: var(--cgf-dark-2); border-color: rgba(255,255,255,.07); }
body.dark-mode .mega-sidebar { background: var(--cgf-dark); }
body.dark-mode .mega-sidebar-item.active, body.dark-mode .mega-sidebar-item:hover { background: var(--cgf-dark-2); }
body.dark-mode .mega-sidebar-title, body.dark-mode .mega-link-title, body.dark-mode .mega-header-title { color: #fff; }
body.dark-mode .mega-sidebar-desc, body.dark-mode .mega-link-desc { color: rgba(255,255,255,.45); }
body.dark-mode h1,body.dark-mode h2,body.dark-mode h3,body.dark-mode h4,body.dark-mode h5,body.dark-mode h6 { color: #fff; }
body.dark-mode .cgf-card, body.dark-mode .blog-card, body.dark-mode .feature-card, body.dark-mode .wp-card, body.dark-mode .news-card { background: var(--cgf-dark-2); border-color: rgba(255,255,255,.07); }
body.dark-mode .bg-gray-section, body.dark-mode .testimonials-section, body.dark-mode .partners-section { background: rgba(255,255,255,.03); }
body.dark-mode .top-bar-dropdown-menu, body.dark-mode .simple-dropdown { background: var(--cgf-dark-2); }
body.dark-mode .top-bar-dropdown-menu a, body.dark-mode .simple-dropdown a { color: rgba(255,255,255,.75); }
body.dark-mode .logo-text .logo-name { color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 1199.98px) {
  .main-nav-link { padding: 0 .875rem !important; font-size: .875rem; }
  .mega-menu-inner { grid-template-columns: 240px 1fr 280px; }
}

@media (max-width: 991.98px) {
  :root { --section-py: 70px; }
  .top-bar { display: none; }
  .main-header .navbar { min-height: 64px; }
  .hero-slider { height: 90vh; min-height: 520px; }
  .hero-heading { font-size: clamp(2rem,6vw,3rem); }
  .hero-stats { gap: 1.5rem; }
  .hero-stat-num { font-size: 1.5rem; }
  .who-we-are-badge { right: 0; }
  .circles-wrapper { gap: 1rem; }
  .circle-img { width: 120px; height: 120px; }
  .newsletter-popup-inner { grid-template-columns: 1fr; }
  .newsletter-popup-img { display: none; }
}

@media (max-width: 767.98px) {
  :root { --section-py: 50px; }
  h1 { font-size: clamp(1.75rem,7vw,2.5rem); }
  h2 { font-size: clamp(1.5rem,5vw,2rem); }
  .hero-slider { height: 100svh; min-height: 480px; max-height: none; }
  .hero-prev, .hero-next { display: none; }
  .hero-stats { flex-wrap: wrap; gap: 1.25rem; }
  .who-we-are-badge { position: static; margin-top: 1.5rem; display: inline-block; }
  .impact-band .row { text-align: center; }
  .impact-divider { display: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }
  .share-btns { flex-direction: row; position: static; }
  .toc-sidebar { position: static; }
  .blog-detail-meta { gap: .75rem; }
  .circles-wrapper { gap: .75rem; }
  .circle-img { width: 90px; height: 90px; }
  #backToTop { bottom: 20px; right: 20px; }
  .cookie-actions { width: 100%; justify-content: center; }
}

@media (max-width: 575.98px) {
  .hero-heading { font-size: 1.875rem; }
  .hero-text { font-size: 1rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
  .section-label { font-size: .7rem; }
  .feature-card { padding: 1.5rem; }
  .auth-card { padding: 2rem 1.5rem; }
  .mega-resources-grid { grid-template-columns: 1fr; }
}
