@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  --bg-dark: transparent;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-hover: rgba(47, 95, 167, 0.4);
  
  --accent-cyan: #2f5fa7;
  --accent-blue: #1f4478;
  --accent-purple: #7c3aed;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
}

html {
  margin: 0 !important;
  padding: 0 !important;
}

body {
  background: url("tausta3.png") center center / cover no-repeat fixed !important;
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden !important;
  width: 100% !important;
}

/* Glowing background ambient spots */
body::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, rgba(47, 95, 167, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  bottom: 10%;
  right: -100px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.03) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glassmorphism navigation - Dark midnight-blue header */
.navbar {
  background: rgba(7, 11, 25, 0.9) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 18px 0;
  transition: var(--transition-smooth);
}

.navbar-brand img {
  height: 38px;
  width: auto;
  transition: var(--transition-smooth);
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  margin: 0 10px;
  transition: var(--transition-smooth) !important;
}

.nav-link:hover, .nav-item.active .nav-link {
  color: #00f2fe !important;
  text-shadow: 0 0 15px rgba(0, 242, 254, 0.6);
}

/* Hero Section */
.hero-section {
  padding-top: 100px;
  padding-bottom: 60px;
  position: relative;
}

.hero-section .logo {
  text-align: left;
  margin-top: -25px;
  margin-bottom: 25px;
  padding-left: 10px;
}

.hero-section .logo img {
  max-height: 120px;
  height: auto;
  width: auto;
  transition: var(--transition-smooth);
}

/* Premium CSS-based Hero Carousel */
#heroCarousel, #aboutCarousel {
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 1200px !important;
}

.carousel-inner {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
}

.carousel-item {
  height: 480px;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Custom CSS Gradient Slides - Kept dark to ensure slide text is highly legible */
.slide-gradient-1 {
  background-image: linear-gradient(135deg, rgba(7, 11, 25, 0.65), rgba(7, 11, 25, 0.85)), url("slide1.png");
  background-size: cover;
  background-position: center;
}

.slide-gradient-2 {
  background-image: linear-gradient(135deg, rgba(7, 11, 25, 0.65), rgba(7, 11, 25, 0.85)), url("slide2.png");
  background-size: cover;
  background-position: center;
}

.slide-gradient-3 {
  background-image: linear-gradient(135deg, rgba(7, 11, 25, 0.65), rgba(7, 11, 25, 0.85)), url("slide3.png");
  background-size: cover;
  background-position: center;
}

.slide-gradient-4 {
  background-image: linear-gradient(135deg, rgba(7, 11, 25, 0.65), rgba(7, 11, 25, 0.85)), url("slide4.png");
  background-size: cover;
  background-position: center;
}

.carousel-caption-custom {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  max-width: 600px;
  text-align: left;
}

.carousel-caption-custom h2 {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.carousel-caption-custom p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Section styling */
.section {
  padding: 100px 0;
}

.section-title h2 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 15px;
  text-align: center;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  text-align: center;
  margin-bottom: 50px;
}

/* Premium Card Glassmorphism */
.feature-card, .about-card, .contact-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  box-shadow: 0 15px 35px rgba(47, 95, 167, 0.1);
}

.feature-icon {
  width: 65px;
  height: 65px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(47, 95, 167, 0.1), rgba(47, 95, 167, 0.05));
  border: 1px solid rgba(47, 95, 167, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(47, 95, 167, 0.08);
  transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(47, 95, 167, 0.2), rgba(47, 95, 167, 0.15));
  border-color: rgba(47, 95, 167, 0.5);
  box-shadow: 0 8px 25px rgba(47, 95, 167, 0.2);
}

.feature-card h4 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.98rem;
}

/* Forms & Inputs */
.form-control, .form-select {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: var(--text-primary) !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
  transition: var(--transition-smooth) !important;
}

.form-control:focus, .form-select:focus {
  background: #ffffff !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 15px rgba(47, 95, 167, 0.15) !important;
  color: var(--text-primary) !important;
  outline: none;
}

.form-label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Modern premium buttons */
.btn-primary, .btn-submit {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)) !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 14px 32px !important;
  border-radius: 12px !important;
  transition: var(--transition-smooth) !important;
  letter-spacing: -0.01em;
}

.btn-primary:hover, .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(47, 95, 167, 0.25);
}

.btn-dark {
  background: rgba(0, 0, 0, 0.05) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  padding: 14px 32px !important;
  border-radius: 12px !important;
  transition: var(--transition-smooth) !important;
}

.btn-dark:hover {
  background: rgba(0, 0, 0, 0.1) !important;
  border-color: var(--text-secondary) !important;
}

/* Footer styling - Dark midnight-blue footer */
.site-footer {
  background: #070b19 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.7) !important;
  width: 100% !important;
}

.site-footer p {
  margin: 0;
  font-size: 0.95rem;
}

/* Custom indicator dots for carousel */
.carousel-indicators [button] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 6px;
  background-color: var(--text-muted);
  opacity: 0.5;
  transition: var(--transition-smooth);
}

.carousel-indicators .active {
  background-color: var(--accent-cyan);
  width: 25px;
  border-radius: 10px;
  opacity: 1;
}

/* Admin Panel Dark Midnight Blue Styling */
.admin-body {
  background: #070b19 !important;
  color: #f8fafc !important;
}

.admin-body::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.08) 0%, rgba(79, 172, 254, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.admin-body .feature-card, 
.admin-body .contact-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}

.admin-body .feature-card:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(0, 242, 254, 0.35) !important;
  box-shadow: 0 15px 45px rgba(0, 242, 254, 0.12) !important;
}

.admin-body .feature-card h4 {
  color: #ffffff !important;
}

.admin-body .feature-card p {
  color: #94a3b8 !important;
}

.admin-body .form-control {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.admin-body .form-control::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
  opacity: 1;
}

.admin-body .form-control:focus {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: #00f2fe !important;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2) !important;
  color: #ffffff !important;
}

.admin-body .form-label {
  color: #94a3b8 !important;
}

.admin-body .table {
  color: #f8fafc !important;
}

.admin-body .table td, .admin-body .table th {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.admin-body .table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #00f2fe !important;
}

.admin-body .btn-dark {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

.admin-body .btn-dark:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #94a3b8 !important;
}

/* Media Queries for Responsive Design */
@media (max-width: 991.98px) {
  .carousel-caption-custom h2 {
    font-size: 2.4rem;
  }
  .section {
    padding: 80px 0;
  }
}

@media (max-width: 767.98px) {
  body {
    background-attachment: scroll !important;
    background-size: cover !important;
    background-position: center top !important;
  }
  
  #heroCarousel {
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  
  .hero-section {
    padding-top: 110px;
    padding-bottom: 40px;
  }
  
  .carousel-item {
    height: 360px;
  }
  
  .carousel-caption-custom {
    left: 5%;
    right: 5%;
    max-width: 90%;
    text-align: center;
  }
  
  .carousel-caption-custom h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }
  
  .carousel-caption-custom p {
    font-size: 0.95rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .section-title p {
    font-size: 1rem;
    margin-bottom: 30px;
  }
  
  .feature-card, .about-card, .contact-card {
    padding: 24px;
    border-radius: 18px;
  }
  
  .feature-icon {
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  
  /* Mobile navbar spacing adjustments */
  .navbar-nav {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  
  .nav-link {
    padding: 8px 0 !important;
    margin: 0 !important;
  }

  /* Left align page logo on mobile */
  .hero-section .logo {
    text-align: left !important;
    margin-top: -20px !important;
    padding-left: 5px !important;
  }
  
  .hero-section .logo img {
    margin: 10px auto 0 !important;
    display: inline-block !important;
    max-height: 80px !important;
    height: auto !important;
    width: auto !important;
  }
}

/* Ensure navbar containers have equal horizontal padding across all devices to prevent left-shift */
.navbar .container, 
.navbar .container-fluid {
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* Dedicated Mobile Web-App Styles */
.mobile-app-body {
  background: url("tausta3.png") center top / cover no-repeat scroll !important;
  padding-bottom: 90px !important; /* Prevent text hiding behind bottom tab bar */
  overflow-x: hidden;
}

.mobile-app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(7, 11, 25, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.mobile-app-header img {
  height: 36px;
  width: auto;
}

.mobile-app-content {
  padding: 95px 15px 30px; /* 70px header height + 25px top padding */
}

.mobile-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75px;
  background: rgba(7, 11, 25, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  background: transparent;
  border: none;
  outline: none;
  width: 25%;
  height: 100%;
}

.mobile-nav-item .icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
  transition: var(--transition-smooth);
}

.mobile-nav-item.active {
  color: #00f2fe;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.mobile-nav-item.active .icon {
  transform: translateY(-2px);
}

.mobile-section {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.mobile-app-footer {
  text-align: center;
  padding: 30px 0 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 40px;
}

.mobile-app-footer a {
  color: #2f5fa7;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.mobile-app-footer a:hover {
  color: #00f2fe;
}

/* Dedicated mobile carousel caption styling (centers text across all resolutions) */
.mobile-carousel-caption {
  position: absolute;
  left: 15px !important;
  right: 15px !important;
  top: 54% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  text-align: center !important;
  max-width: none !important;
  z-index: 10;
}

.mobile-carousel-caption p {
  font-size: 0.85rem !important;
  color: rgba(255, 255, 255, 0.85) !important;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  text-align: center !important;
  display: block !important;
  width: 100% !important;
}

.mobile-carousel-caption h3 {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8) !important;
  text-align: center !important;
  margin: 0 !important;
  width: 100% !important;
  display: block !important;
}

/* Force mobile carousel and items to match slide image height so captions float correctly on top */
#mobileCarousel,
#mobileCarousel .carousel-item {
  height: 240px !important;
}

#mobileCarousel .carousel-item > div {
  height: 100% !important;
}

/* Premium Navbar Search Input Styles */
.nav-search-form {
  margin-left: 15px;
}

.nav-search-input {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  font-size: 0.85rem !important;
  border-radius: 20px 0 0 20px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  width: 140px !important;
  padding: 5px 12px !important;
}

.nav-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

.nav-search-input:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(0, 242, 254, 0.4) !important;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.2) !important;
  width: 190px !important;
  color: #ffffff !important;
}

.nav-search-btn {
  border-radius: 0 20px 20px 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: none !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.85rem !important;
  padding: 5px 12px !important;
  transition: var(--transition-smooth) !important;
}

.nav-search-btn:hover {
  background: rgba(0, 242, 254, 0.12) !important;
  color: #00f2fe !important;
  border-color: rgba(0, 242, 254, 0.3) !important;
}

/* Statistics Counters Cards */
.stats-card {
  background: transparent !important;
  border: none !important;
  border-radius: 16px !important;
  transition: var(--transition-smooth) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.stats-card:hover {
  transform: translateY(-5px) !important;
}

@media (max-width: 767.98px) {
  .nav-search-form {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
  }
  .nav-search-input {
    width: 100% !important;
  }
}

/* Social Media Links */
.social-link {
  color: var(--text-secondary) !important;
  font-size: 1.3rem;
  transition: var(--transition-smooth) !important;
  display: inline-block;
  text-decoration: none;
}

.social-link:hover {
  color: var(--accent-cyan) !important;
  transform: translateY(-3px) scale(1.1) !important;
}
