/* ============================================
   Mannish TIWARI PORTFOLIO - MAIN STYLES
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Default: Dark Theme Colors */
  --bg-dark: #0a0a0a;
  --bg-dark-soft: #151515;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text-main: #f0f0f0;
  --text-muted: #b0b0b0;
  --header-bg: rgba(0, 0, 0, 0.3);
  --nav-link-color: var(--primary-white);

  /* Primary Colors */
  --primary-gold: #e1ba41;
  --primary-white: #ffffff;

  /* Gradient Variations */
  --gradient-gold: linear-gradient(135deg, #e1ba41 0%, #f5d576 100%);
  --gradient-gold-fade: linear-gradient(180deg,
      rgba(225, 186, 65, 0.05) 0%,
      rgba(225, 186, 65, 0) 100%);
  --gradient-overlay: linear-gradient(135deg,
      rgba(0, 0, 0, 0.6) 0%,
      rgba(0, 0, 0, 0.2) 100%);
  --gradient-dark: linear-gradient(180deg, #151515 0%, #202020 100%);
  --bg-page-gradient: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);

  /* Shadow & Glow Effects */
  --shadow-gold: 0 4px 25px rgba(225, 186, 65, 0.2);
  --shadow-gold-hover: 0 8px 35px rgba(225, 186, 65, 0.4);
  --glow-gold: 0 0 15px rgba(225, 186, 65, 0.3);
  --shadow-main: 0 4px 30px rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-smooth: 0.5s ease;
  --transition-slow: 0.8s ease;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 50%;
}

/* Light Theme Variables */
.light-theme {
  --bg-dark: #f9f9f9;
  --bg-dark-soft: #ffffff;
  --bg-card: #ffffff;
  --text-main: #333333;
  --text-muted: #666666;
  --header-bg: rgba(0, 0, 0, 0.4);
  --nav-link-color: var(--primary-white);
  --bg-page-gradient: linear-gradient(180deg, #f9f9f9 0%, #ffffff 100%);
  --gradient-dark: linear-gradient(180deg, #f0f0f0 0%, #ffffff 100%);
  --shadow-main: 0 4px 20px rgba(0, 0, 0, 0.05);
  --gradient-overlay: linear-gradient(135deg,
      rgba(255, 255, 255, 0.5) 0%,
      rgba(255, 255, 255, 0.2) 100%);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg-dark);
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

.card,
.section,
.header,
.navbar,
.btn,
.nav-link,
.theme-toggle {
  transition: all 0.4s ease !important;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-gold);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-sm);
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.text-gold {
  color: var(--primary-gold);
}

.text-white {
  color: var(--primary-white);
}

.text-center {
  text-align: center;
}

.decorative-line {
  margin-bottom: 2rem;
  position: relative;
}

.decorative-line h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--gradient-gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-md);
}

.section {
  padding: 4rem 0;
  /* Reduced from 6rem (var(--spacing-xl)) */
  position: relative;
  background: var(--bg-page-gradient);
}

.section-alt {
  background: var(--gradient-dark);
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============================================
   FLEXBOX UTILITIES
   ============================================ */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-column {
  flex-direction: column;
}

.gap-sm {
  gap: var(--spacing-sm);
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--primary-white);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold-hover);
}

.btn-outline {
  background: transparent;
  color: var(--primary-gold);
  border: 2px solid var(--primary-gold);
}

.btn-outline:hover {
  background: var(--primary-gold);
  color: var(--primary-white);
  transform: translateY(-3px);
}

.btn-white {
  background: transparent;
  color: var(--primary-gold);
  border: 2px solid var(--primary-gold);
}

.btn-white:hover {
  background: var(--primary-gold);
  color: var(--primary-white);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-main);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-gold);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
  font-size: 1.5rem;
  color: var(--primary-white);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.card-text {
  color: var(--text-muted);
  line-height: 1.8;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  box-shadow: none;
  z-index: 1000;
  transition: all var(--transition-fast);
}

.header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-white);
  text-decoration: none;
  transition: all var(--transition-fast);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.logo:hover {
  text-shadow: var(--glow-gold);
}

.logo-img {
  height: 100px;
  width: auto;
  display: block;
  filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.5));
  transition: all var(--transition-fast);
}

.logo-img:hover {
  filter: drop-shadow(0 0 10px rgba(225, 186, 65, 0.8));
  transform: scale(1.05);
}

.header.scrolled .logo-img {
  filter: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--nav-link-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-gold);
  transition: width var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-gold);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary-white);
  border-radius: 2px;
  transition: all var(--transition-fast);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.header.scrolled .mobile-toggle span {
  background: var(--primary-gold);
  box-shadow: none;
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Default: Center alignment */
  position: relative;
  background: var(--gradient-gold);
  color: var(--primary-white);
  text-align: center;
  padding: var(--spacing-xl) 0;
  overflow: hidden;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero-home,
.hero-contact,
.hero-ngo {
  justify-content: flex-end;
  text-align: center;
}

.hero-home {
  background-position: 10% center;
}

.hero-contact,
.hero-ngo {
  background-position: 10% top;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  /* Further reduced opacity for clearer images */
  z-index: 0;
}

.hero-home::before {
  background: transparent;
  /* Keep homepage original (No dark overlay) */
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--primary-gold);
  color: var(--primary-gold);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
  box-shadow: var(--glow-gold);
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--primary-gold);
  color: var(--primary-white);
  box-shadow: var(--shadow-gold-hover);
}

.light-theme .theme-toggle {
  background: var(--primary-white);
  border-color: #eee;
  color: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.light-theme .theme-toggle:hover {
  background: #f0f0f0;
  border-color: #ddd;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10vh;
  background: linear-gradient(to bottom, transparent, var(--bg-dark));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 2rem;
}

.hero-home .hero-content {
  margin-right: 5%;
  /* Homepage specific right margin */
}

.hero-title {
  color: var(--primary-white);
  margin-bottom: var(--spacing-sm);
  text-shadow:
    2px 2px 8px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 0, 0, 0.2);
  font-weight: 800;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
  opacity: 1;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-style: italic;
  margin-bottom: var(--spacing-md);
  opacity: 1;
  line-height: 1.8;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
  font-weight: 500;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: var(--primary-white);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-section h3 {
  color: var(--primary-gold);
  margin-bottom: var(--spacing-sm);
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-section a:hover {
  color: var(--primary-gold);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--primary-gold);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-white);
  transition: all var(--transition-fast);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .logo-img {
    height: 60px;
  }

 /* Banner Responsiveness - Refined */
  .hero {
    min-height: 80vh !important;
    padding: var(--spacing-xl) 0 !important;
    background-position: 75% center !important;
    /* Focal point adjustment */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    text-align: center !important;
    margin-right: 0 !important;
    padding: var(--spacing-md) !important;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    width: 100%;
    margin: 0 auto;
  }

  .hero-title {
    font-size: 2.5rem !important;
  }

  .hero-buttons {
    justify-content: center !important;
  }

  .hero-home,
  .hero-contact,
  .hero-ngo {
    justify-content: center !important;
    text-align: center !important;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-dark-soft);
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-main);
    transition: left var(--transition-fast);
    overflow-x: hidden;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-link {
    color: var(--text-main);
    text-shadow: none;
    width: 100%;
    display: block;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }
}


/* Responsive Image Cards */
.responsive-card-img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: transform var(--transition-medium);
}

.gallery-card-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

@media (max-width: 768px) {
  .responsive-card-img {
    height: 300px;
  }

  .gallery-card-img {
    height: 250px;
  }
}