/* ========== CSS RESET & VARIABLES ========== */
:root {
  --primary-color: #9800CB;
  --secondary-color: #ffcc00;
  --dark-color: #111;
  --light-color: #f9f9f9;
  --text-color: #333;
  --text-light: #fff;
  --shadow: 0 6px 15px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--light-color);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.justified {
  text-align: justify;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--text-light);
  color: var(--primary-color);
}

.btn-primary:hover {
  background: #a585af;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--secondary-color);
  color: var(--dark-color);
}

.btn-secondary:hover {
  background: #e6b800;
  transform: translateY(-2px);
}

.btn-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.btn-link:hover {
  text-decoration: underline;
}

/* ========== NAVIGATION ========== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: transparent;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

header.scrolled {
  background: #1e0425;
  box-shadow: var(--shadow);
  padding: 0.8rem 2rem;
}

.logo {
  flex: 0 0 auto;
}

.logo img {
  height: 60px;
  width: auto;
  transition: var(--transition);
}

.logo-dark { display: none; }
header.scrolled .logo-light { display: none; }
header.scrolled .logo-dark { display: block; }

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-center ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-center ul li a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-center ul li a:hover,
.nav-center ul li a.active {
  color: var(--secondary-color);
}

.nav-center ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: var(--transition);
}

.nav-center ul li a:hover::after,
.nav-center ul li a.active::after {
  width: 100%;
}


/* Header Right Section - Contact + Hamburger */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem; /* Default desktop gap */
  flex: 0 0 auto;
}


/* Contact Button */
.nav-contact .btn-contact {
  background: var(--secondary-color);
  color: var(--dark-color);
  padding: 0.6rem 1.2rem; /* Reduced from 0.8rem 1.8rem */
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.8rem; /* Reduced from 0.9rem */
  display: inline-block;
  white-space: nowrap;
}

.nav-contact .btn-contact:hover {
  background: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

/* Hamburger Menu - Hidden on desktop */
.hamburger {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  background: transparent;
  border: none;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-light);
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 2px;
  display: block;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
  backdrop-filter: blur(5px);
}

.nav-overlay.active {
  display: block;
}

/* ========== MOBILE NAVIGATION (ALL SIZES) ========== */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  header.scrolled {
    padding: 0.8rem 1rem;
  }
  
  /* Hide desktop navigation */
  .nav-center {
    display: none; /* Hide the main navigation menu by default on mobile */
  }
  
  /* Show hamburger on mobile */
  .hamburger {
    display: flex; /* Display the hamburger menu on mobile */
  }
  
  /* ========== ADJUST GAP BETWEEN CONTACT & HAMBURGER HERE ========== */
  .header-right {
    gap: 0.5rem; /* Adjust this value for desired spacing between contact and hamburger on mobile */
  }
  /* ========== END GAP ADJUSTMENT ========== */
  
  /* Adjust contact button for mobile */
  .nav-contact .btn-contact {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }
  
  /* Mobile navigation menu (when active) */
  .nav-center {
    position: fixed;
    top: 0;
    left: -100%; /* Initially off-screen */
    width: 280px;
    height: 100vh;
    background: var(--primary-color);
    display: flex !important; /* Forces display for mobile menu */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 80px 2rem 2rem;
    transition: left 0.3s ease;
    z-index: 999;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
  }
  
  .nav-center.active {
    left: 0; /* Slides into view */
  }
  
  .nav-center ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  
  .nav-center ul li {
    width: 100%;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-center ul li a {
    display: block;
    padding: 1.2rem 0;
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    width: 100%;
    text-transform: uppercase;
  }
  
  .nav-center ul li a:hover,
  .nav-center ul li a.active {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.05);
    padding-left: 1rem;
  }
  
  .nav-center ul li a::after {
    display: none;
  }
  
  /* Navigation Overlay */
  .nav-overlay.active {
    display: block;
  }
  
  /* Logo adjustment for mobile */
  .logo img {
    height: 58px;
  }

  /* Add space to prevent content from going under the fixed header on mobile */
  /* This ensures the first main content element is not overlapped by the header. */
  .page-hero, .intro, .services, .portfolio-preview, .testimonials, .clients { /* Target all main content areas that follow the header */
    padding-top: 90px; /* Approximate header height (logo height + 2 * 1rem padding) */
    /* Use padding-top instead of margin-top if the element already has a background/border that should extend under the header */
  }
}

/* Removed the 'FORCE GAP ADJUSTMENT' media query as its functionality can be managed
   within the primary @media (max-width: 768px) block using `gap` on `.header-right`
   and is generally better to avoid `!important` and negative margins for core layout. */



/* ========== PAGE HERO ========== */
.page-hero {
  padding: 100px 20px;
  background: linear-gradient(135deg, #1e0425, #222);
  color: #fff;
  text-align: center;
}
.page-hero h1 { font-size: 2.5rem; margin-bottom: 15px; color: #ffcc00; }
.page-hero p { font-size: 1.2rem; color: #ddd; }


/* ========== SERVICES SECTION ========== */
.services {
  padding: 1rem 0;
  background: var(--light-color);
}

.services h2,
.section-intro {
  text-align: center;
}

.section-intro {
  color: #666;
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  perspective: 1000px;
  height: 250px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.service-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.card-front {
  background: var(--text-light);
  color: var(--dark-color);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card-back {
  background: var(--primary-color);
  color: var(--text-light);
  transform: rotateY(180deg);
  text-align: center;
}

.card-back p {
  margin-bottom: 1.5rem;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
  .about-section {
    gap: 3rem;
  }
  
  .about-text h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .about-main {
    padding: 4rem 0;
  }
  
  .about-grid {
    gap: 4rem;
  }
  
  .about-section {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .about-section.reverse {
    direction: ltr;
  }
  
  .about-text h2 {
    font-size: 2rem;
  }
  
  .services-highlights {
    grid-template-columns: 1fr;
  }
  
  .highlight-item:hover {
    transform: translateY(-5px);
  }
  
  .mv-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .about-main {
    padding: 3rem 0;
  }
  
  .about-grid {
    gap: 3rem;
  }
  
  .about-text h2 {
    font-size: 1.8rem;
  }
  
  .mv-card,
  .feature-card {
    padding: 2rem 1.5rem;
  }
  
  .about-cta {
    padding: 4rem 0;
  }
}

/* Animation for scroll-triggered elements */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== FOOTER ========== */
footer {
  background: #1e0425;
  color: var(--text-light);
  padding: 4rem 0 1.5rem; /* Increased top padding for better spacing */
  font-size: 0.9rem; /* Standard base size */
  line-height: 1.6;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem; /* Standard gap between sections */
  margin-bottom: 2.5rem;
}

/* Ensure logo centers nicely */
.footer-logo {
  width: 84px;
  height: auto;
  display: inline-block;
  margin-bottom: 12px;
   /*filter: brightness(0) invert(1); white on dark bg */
}

.footer-section h3,
.footer-section h4 {
  color: var(--text-light);
  margin-bottom: 1.25rem; /* Standard heading margin */
  font-size: 1.1rem; /* Standard heading size */
  font-weight: 600;
}

.footer-section p {
  font-size: 0.9rem; /* Readable paragraph size */
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #ccc;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.75rem; /* Better spacing between list items */
}

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem; /* Standard link size */
  display: block;
  padding: 0.25rem 0;
}

.footer-section ul li a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 1rem; /* Good social icon spacing */
  margin-top: 1rem;
}

.social-links a {
  color: #ccc;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.1rem; /* Better icon size */
  padding: 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.social-links a:hover {
  color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #999;
  font-size: 0.85rem; /* Standard copyright size */
  line-height: 1.5;
}

/* Footer section layout */
.footer-section {
  text-align: left; /* default for desktop */
}

/* Center logo and text properly */
.footer-section:first-child {
  text-align: left; /* Keep left aligned for better flow */
}

.footer-section:first-child p {
  max-width: 300px;
}

/* Make sure all footer sections center on small screens */
@media (max-width: 768px) {
  footer {
    padding: 3rem 0 1rem;
    font-size: 0.85rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer-section:first-child {
    text-align: center;
  }
  
  .footer-section:first-child p {
    max-width: none;
    margin: 0 auto;
  }
  
  .footer-section h3,
  .footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .footer-section p {
    font-size: 0.85rem;
  }
  
  .footer-section ul li a {
    font-size: 0.85rem;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .social-links a {
    font-size: 1rem;
    width: 36px;
    height: 36px;
  }
  
  .footer-bottom {
    font-size: 0.8rem;
    padding-top: 1.5rem;
  }
}

/* Large screens optimization */
@media (min-width: 1200px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr 1fr; /* Better distribution for wide screens */
    gap: 3rem;
  }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .intro .container,
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  header.scrolled {
    padding: 0.8rem 1rem;
  }
  
  .service-grid,
  .portfolio-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .btn {
    padding: 1rem 2rem;
    width: 100%;
  }
}

/* ========== UTILITY CLASSES ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.bg-light {
  background: var(--light-color);
}

.bg-dark {
  background: var(--dark-color);
  color: var(--text-light);
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* ========== PAGE SPECIFIC STYLES ========== */
/* About Page */
.about-page {
  padding: 8rem 0 4rem;
}

.about-page-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-page-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* ===== Mission Section ===== */
/* ===== Mission Section Fix (Remove extra white gaps) ===== */
.mission {
  padding: 2rem 8%;     /* control inside spacing */
  margin-top: 0;        /* remove white gap above (1) */
  margin-bottom: 0;     /* remove white gap below (2) */
  background: #fafafa;  /* keep your preferred bg */
  color: #222;
  line-height: 1.8;
  font-size: 1.05rem;
}

.mission p {
  margin-bottom: 1.5rem;
  text-align: justify;
  color: #333;
}

/* Optionally, you can also reduce the previous section’s bottom margin */
.about, .intro {
  margin-bottom: 0;
  padding-bottom: 0;
}



/* Responsive tweak */
@media (max-width: 768px) {
  .mission {
    padding: 2rem 1.5rem;
    border-left-width: 1px;
  }
}


/* First paragraph slightly bolder */
.mission p:first-of-type {
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .mission {
    padding: 2rem 1.5rem;
    border-left-width: 4px;
  }
  
  .mission p {
    font-size: 0.98rem;
  }
}

/* Services Page */
.services-page {
  padding: 8rem 0 4rem;
}

.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-item {
  background: var(--text-light);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-item:hover {
  transform: translateY(-5px);
}

/* Portfolio Page */
.portfolio-page {
  padding: 8rem 0 4rem;
}

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Blog Page */
.blog-page {
  padding: 8rem 0 4rem;
}

.blog-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--text-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-content {
  padding: 1.5rem;
}

/* Contact Page */
.contact-page {
  padding: 8rem 0 4rem;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-form,
.contact-info {
  background: var(--text-light);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

/* Page Hero */
.page-hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--dark-color) 0%, #222 100%);
  color: var(--text-light);
  text-align: center;
}

.page-hero h1 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: var(--text-light);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form Success/Error States */
.form-success {
  color: #28a745;
  padding: 1rem;
  background: #d4edda;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.form-error {
  color: #dc3545;
  padding: 1rem;
  background: #f8d7da;
  border-radius: 6px;
  margin-bottom: 1rem;
}