/* CSS Variables for Themes */
:root {
  --primary: #4a6fa5;
  --primary-dark: #166088;
  --accent: #4fc3f7;
  --light: #ffffff;
  --dark: #1e1e1e;
  --text-light: #333333;
  --text-dark: #f0f0f0;
  --card-light: #f8f9fa;
  --card-dark: #2d2d2d;
  --border-light: #e0e0e0;
  --border-dark: #444;
  --shadow: rgba(0,5 0, 0, 0.1);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: background 0.5s ease, color 0.5s ease;
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--light);
  color: var(--text-light);
}

[data-theme="dark"] body {
  background-color: var(--dark);
  color: var(--text-dark);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

/* Loader Styles */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--light);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

[data-theme="dark"] #loader {
  background-color: var(--dark);
}

.loader-content {
  text-align: center;
  animation: fadeIn 1s ease;
}

.loader-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 2rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  position: relative;
}

.loader-icon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

[data-theme="dark"] .loader-icon::after {
  border-top-color: var(--accent);
}

.loader-text {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 2px;
  animation: pulse 2s infinite;
}

[data-theme="dark"] .loader-text {
  color: var(--accent);
}

/* Navigation */
nav {
  background-color: var(--primary);
  padding: 1.2rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

[data-theme="dark"] nav {
  background-color: var(--primary-dark);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2.2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  padding: 0.5rem 0.3rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--accent);
  transition: width 0.4s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  color: white;
  font-size: 1.8rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  border: none;
  outline: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Sections */
section {
  padding: 6rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.5s ease;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title h2 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.4s ease;
}

[data-theme="dark"] .section-title h2::after {
  background: var(--accent);
}

.section-title p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Home Section */
#home {
  padding-top: 10rem;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  position: relative;
  overflow: hidden;
}

.home-content {
  flex: 1;
  animation: fadeInLeft 1s ease;
}

.home-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.home-content h1 span {
  color: var(--primary);
  position: relative;
}

[data-theme="dark"] .home-content h1 span {
  color: var(--accent);
}

.home-content p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
}

.home-media {
  flex: 1;
  display: flex;
  justify-content: center;
  animation: fadeInRight 1s ease;
} 

.home-video-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform 0.5s ease;
}

.home-video-container:hover {
  transform: perspective(1000px) rotateY(0);
}

.home-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(74, 111, 165, 0.3), rgba(79, 195, 247, 0.3));
  z-index: 1;
}

/* Features Section */
.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background-color: var(--card-light);
  border-radius: 15px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

[data-theme="dark"] .feature-card {
  background-color: var(--card-dark);
  border-color: var(--border-dark);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transition: height 0.5s ease;
  z-index: -1;
}

.feature-card:hover::before {
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-card:hover .feature-icon,
.feature-card:hover h3,
.feature-card:hover p {
  color: white;
}

.feature-icon {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
}

[data-theme="dark"] .feature-icon {
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  transition: all 0.4s ease;
}

.feature-card p {
  opacity: 0.85;
  transition: all 0.4s ease;
}

/* Stats Section */
#stats {
  background: linear-gradient(135deg, rgba(74, 111, 165, 0.1), rgba(79, 195, 247, 0.1));
  position: relative;
}

[data-theme="dark"] #stats {
  background: linear-gradient(135deg, rgba(25, 118, 210, 0.1), rgba(13, 71, 161, 0.1));
}

.stats-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3.5rem;
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.stat-item {
  text-align: center;
  min-width: 200px;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  transition: all 0.5s ease;
}

[data-theme="dark"] .stat-number {
  color: var(--accent);
}

.stat-label {
  font-size: 1.3rem;
  font-weight: 500;
}

.stats-media {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.stats-image {
  width: 100%;
  max-width: 500px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  transform: perspective(1000px) rotateX(5deg);
  transition: transform 0.5s ease;
}

.stats-image:hover {
  transform: perspective(1000px) rotateX(0);
}

/* Testimonials Section */
.testimonials-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  height: 400px;
}

.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 1s ease, transform 1s ease;
  transform: translateX(50px);
}

.testimonial-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.testimonial-card {
  background-color: var(--card-light);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 800px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  position: relative;
  border: 1px solid var(--border-light);
}

[data-theme="dark"] .testimonial-card {
  background-color: var(--card-dark);
  border-color: var(--border-dark);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 6rem;
  color: var(--primary);
  opacity: 0.2;
  font-family: serif;
  line-height: 1;
}

[data-theme="dark"] .testimonial-card::before {
  color: var(--accent);
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.user-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.2rem;
  border: 4px solid var(--primary);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .user-avatar {
  border-color: var(--accent);
}

.user-name {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.user-position {
  font-size: 1.1rem;
  opacity: 0.8;
}

.testimonial-text {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.rating {
  color: #ffc107;
  font-size: 1.4rem;
  margin-top: 1rem;
}

.testimonial-nav {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  gap: 1rem;
}

.testimonial-nav button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: #ddd;
  cursor: pointer;
  transition: var(--transition);
}

.testimonial-nav button.active {
  background-color: var(--primary);
  transform: scale(1.2);
}

[data-theme="dark"] .testimonial-nav button.active {
  background-color: var(--accent);
}

/* Contact Section */
.contact-form {
  max-width: 700px;
  margin: 0 auto;
  background-color: var(--card-light);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-light);
  animation: fadeInUp 1s ease;
}

[data-theme="dark"] .contact-form {
  background-color: var(--card-dark);
  border-color: var(--border-dark);
}

.form-group {
  margin-bottom: 1.8rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 1.1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background-color: var(--light);
  color: var(--text-light);
  font-size: 1rem;
  transition: var(--transition);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background-color: #252525;
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
}

.form-group textarea {
  min-height: 180px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 1.1rem;
  font-size: 1.1rem;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.submit-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.7s ease;
}

.submit-btn:hover::after {
  left: 100%;
}

/* Footer */
footer {
  background-color: var(--primary);
  color: white;
  padding: 4rem 0 0;
}

[data-theme="dark"] footer {
  background-color: var(--primary-dark);
}

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

.footer-section {
  text-align: left;
}

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.8rem;
  position: relative;
  padding-bottom: 0.8rem;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--accent);
}

.footer-section p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.9;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-links a i {
  width: 25px;
  text-align: center;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent);
  transform: translateX(5px);
}

.social-icons {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.3rem;
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--accent);
  transform: translateY(-5px);
}

.copyright {
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.8;
}

/* Mode Toggle */
#mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1100;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  font-size: 1.4rem;
}

#mode-toggle:hover {
  background-color: var(--primary-dark);
  transform: rotate(15deg) scale(1.1);
}

[data-theme="dark"] #mode-toggle {
  background-color: var(--primary-dark);
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  font-size: 1.3rem;
}

[data-theme="dark"] #back-to-top {
  background-color: var(--primary-dark);
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background-color: var(--accent);
  transform: translateY(-5px);
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

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

/* Responsive Design */
@media (max-width: 992px) {
  #home {
    flex-direction: column;
    padding-top: 8rem;
  }
  
  .home-content {
    text-align: center;
    margin-bottom: 3rem;
  }
  
  .home-content p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .section-title h2 {
    font-size: 2.4rem;
  }
  
  .feature-card {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--primary);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3rem;
    transition: left 0.5s ease;
  }
  
  [data-theme="dark"] .nav-links {
    background-color: var(--primary-dark);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links li {
    margin: 1.5rem 0;
  }
  
  section {
    padding: 5rem 1.5rem;
  }
  
  .section-title h2 {
    font-size: 2.2rem;
  }
  
  .testimonial-card {
    padding: 2rem;
  }
  
  .contact-form {
    padding: 2rem;
  }
}

@media (max-width: 576px) {
  .home-content h1 {
    font-size: 2.8rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .stats-container {
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
  }
  
  .stat-item {
    width: 100%;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* Accessibility */
.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;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}