/* ---------- Global ---------- */
:root {
  --primary-color: #0066CC;
  --secondary-color: #FF6B35;
  --dark-bg: #0f1419;
  --dark-text: #e0e0e0;
  --card-dark: #1a1f2e;
  --accent-color: #00D4FF;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  color: #1F2937;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

body.dark-mode header {
  background: rgba(15, 20, 25, 0.95);
  border-bottom-color: rgba(0, 212, 255, 0.1);
}

body.dark-mode nav a {
  color: var(--dark-text);
}

body.dark-mode .menu-btn, body.dark-mode .logo {
  color: var(--primary-color);
}

h1, h2, h3 {
  margin: 0;
}

a { text-decoration: none; color: inherit; }
section { padding: 5rem 2rem; }

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOut 0.6s ease-out forwards;
  animation-delay: 1s;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

/* ---------- Navbar ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.logo {
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Navbar links */
nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  font-weight: 600;
  color: #1F2937;
  position: relative;
  padding: 0.2rem 0;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--secondary-color);
}

nav a:hover::after {
  width: 100%;
}

nav a.active {
  color: var(--secondary-color);
}

nav a.active::after {
  width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 1.2rem;
  cursor: pointer;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle:hover {
  background: var(--primary-color);
  color: white;
  transform: rotate(20deg);
}

/* ---------- Mobile Menu ---------- */
.menu-btn {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #1F2937;
  transition: color 0.3s ease;
}

@media (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 70px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    z-index: 999;
  }

  nav.active {
    display: flex;
  }

  .menu-btn {
    display: block;
  }

  .theme-toggle {
    margin-left: 0;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 102, 204, 0.65),
    rgba(255, 107, 53, 0.55),
    rgba(0, 51, 102, 0.65)
  );
  background-size: 300% 300%;
  animation: gradientMove 14s ease infinite;
}

.parallax-bg {
  position: absolute;
  inset: 0;
  background-image: url("https://source.unsplash.com/random/1600x900/?technology,ai,coding,futuristic");
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  opacity: 0.3;
  z-index: 0;
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 800px;
  animation: slideUp 1s ease-out;
}

.hero h1 { 
  font-size: 3.5rem; 
  margin-bottom: 1rem; 
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p { 
  font-size: 1.3rem; 
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.btn-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  padding: 0.9rem 2rem;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  font-size: 1rem;
  text-align: center;
}

.btn-primary {
  background: var(--secondary-color);
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
  background: #E55A1F;
  box-shadow: 0 0 24px rgba(255, 107, 53, 0.7);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--secondary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* ---------- Stats Section ---------- */
.stats {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  padding: 5rem 2rem;
}

.stats h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: white;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.95;
}

/* ---------- Services ---------- */
.services { 
  text-align: center;
  background: white;
  transition: background 0.3s ease;
}

body.dark-mode .services {
  background: var(--dark-bg);
}

.services h2 {
  color: var(--primary-color);
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.service-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: #F3F4F6;
  padding: 2.5rem;
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

body.dark-mode .service-card {
  background: var(--card-dark);
  color: var(--dark-text);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.service-card:hover::before {
  left: 100%;
}

.service-card:hover {
  transform: translateY(-12px) scale(1.05);
  background: var(--primary-color);
  color: white;
  box-shadow: 0 20px 40px rgba(0, 102, 204, 0.3);
  border-color: var(--secondary-color);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  transition: all 0.3s ease;
  color: var(--secondary-color);
}

.service-card:hover .service-icon {
  color: white;
  transform: rotate(10deg) scale(1.2);
}

.service-card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.service-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

.service-card:hover .service-link {
  color: white;
  transform: translateX(5px);
}

/* ---------- Portfolio Section ---------- */
.portfolio {
  background: #F9FAFB;
  text-align: center;
  transition: background 0.3s ease;
}

body.dark-mode .portfolio {
  background: var(--dark-bg);
}

.portfolio h2 {
  color: var(--primary-color);
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16/10;
}

.portfolio-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover img {
  transform: scale(1.1) rotate(2deg);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.9), rgba(255, 107, 53, 0.9));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h4 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ---------- Testimonials Section ---------- */
.testimonials {
  background: white;
  text-align: center;
  transition: background 0.3s ease;
}

body.dark-mode .testimonials {
  background: var(--dark-bg);
}

.testimonials h2 {
  color: var(--primary-color);
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.testimonials-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonial-card {
  background: #F3F4F6;
  padding: 2rem;
  border-radius: 12px;
  border-left: 4px solid var(--secondary-color);
  transition: all 0.3s ease;
  text-align: left;
}

body.dark-mode .testimonial-card {
  background: var(--card-dark);
  color: var(--dark-text);
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  background: var(--primary-color);
  color: white;
}

.testimonial-card:hover .testimonial-author {
  color: white;
}

.stars {
  color: #FFB81C;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #4B5563;
  font-style: italic;
}

.testimonial-card:hover .testimonial-text {
  color: white;
}

.testimonial-author {
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: color 0.3s ease;
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
}

.author-info {
  text-align: left;
}

.author-name {
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.author-role {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ---------- About ---------- */
.about {
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
  text-align: center;
  transition: background 0.3s ease;
}

body.dark-mode .about {
  background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
}

.about h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

.about p {
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.8;
  color: #4B5563;
  font-size: 1.1rem;
}

body.dark-mode .about p {
  color: var(--dark-text);
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.feature-item i {
  font-size: 2rem;
  color: var(--secondary-color);
}

.feature-item span {
  font-weight: 600;
  color: #1F2937;
}

body.dark-mode .feature-item span {
  color: var(--dark-text);
}

/* ---------- FAQ Section ---------- */
.faq {
  background: white;
  text-align: center;
  transition: background 0.3s ease;
}

body.dark-mode .faq {
  background: var(--dark-bg);
}

.faq h2 {
  color: var(--primary-color);
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #F3F4F6;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

body.dark-mode .faq-item {
  background: var(--card-dark);
}

.faq-question {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.faq-question i {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
  text-align: left;
  color: #4B5563;
  line-height: 1.6;
  margin: 0;
}

body.dark-mode .faq-answer p {
  color: var(--dark-text);
}

/* ---------- Contact / Feedback ---------- */
.feedback-btn {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  padding: 1rem 1.5rem;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.4);
  transition: all 0.3s ease;
}

.feedback-btn:hover {
  background: #E55A1F;
  box-shadow: 0 0 24px rgba(255, 107, 53, 0.7);
  transform: scale(1.08) translateY(-3px);
}

.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.feedback-overlay.active {
  opacity: 1;
  visibility: visible;
}

.feedback-panel {
  position: fixed;
  right: 2rem;
  bottom: 7rem;
  width: 380px;
  height: auto;
  background: white;
  border: 1px solid rgba(0, 102, 204, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  z-index: 1000;
  overflow-y: auto;
  transform: scale(0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  max-height: 600px;
}

body.dark-mode .feedback-panel {
  background: var(--card-dark);
  border-color: rgba(0, 212, 255, 0.1);
}

.feedback-panel.active {
  transform: scale(1);
  opacity: 1;
  visibility: visible;
}

.feedback-panel h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  margin-top: 0;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #1F2937;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

body.dark-mode .close-btn {
  color: var(--dark-text);
}

.close-btn:hover {
  color: var(--secondary-color);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea {
  padding: 1rem;
  border: 2px solid #E5E7EB;
  border-radius: 6px;
  background: #F3F4F6;
  color: #1F2937;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

body.dark-mode input, body.dark-mode textarea {
  background: #2a3142;
  border-color: rgba(0, 212, 255, 0.2);
  color: var(--dark-text);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

input::placeholder, textarea::placeholder {
  color: #9CA3AF;
}

body.dark-mode input::placeholder, body.dark-mode textarea::placeholder {
  color: #6b7280;
}

textarea { 
  resize: none; 
  height: 130px;
  font-family: 'Inter', sans-serif;
}

button { 
  cursor: pointer; 
}

.form-message {
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  display: none;
  animation: slideDown 0.3s ease;
}

.form-message.show {
  display: block;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .feedback-panel {
    width: calc(100% - 2rem);
    right: 1rem;
    bottom: 5rem;
  }
  
  .feedback-btn {
    right: 1rem;
    bottom: 1rem;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .btn-group .btn {
    width: 100%;
    max-width: 300px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* ---------- Footer ---------- */
footer {
  background: #121212;
  color: #9CA3AF;
  padding: 3rem 2rem 1rem;
  transition: background 0.3s ease;
}

body.dark-mode footer {
  background: #0a0d12;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section p {
  line-height: 1.6;
  font-size: 0.9rem;
}

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

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section ul li a {
  color: #9CA3AF;
  transition: color 0.3s ease;
}

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

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--secondary-color);
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-links a:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: white;
}

/* ---------- Animations ---------- */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal animations */
.animate {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideUp 0.8s ease-out forwards;
}

.animate[data-delay="0"] { animation-delay: 0s; }
.animate[data-delay="1"] { animation-delay: 0.15s; }
.animate[data-delay="2"] { animation-delay: 0.3s; }
.animate[data-delay="3"] { animation-delay: 0.45s; }
.animate[data-delay="4"] { animation-delay: 0.6s; }

.animate.show {
  opacity: 1;
  transform: translateY(0);
}

