/* Professional theme for Kochedu - Modern Color Palette & Design */
:root {
  /* Modern Color Palette */
  --primary: #1976d2; /* Modern vibrant blue */
  --primary-light: #42a5f5;
  --primary-dark: #0052cc;
  --secondary: #ff9800; /* Orange for CTAs */
  --secondary-light: #ffb74d;
  --secondary-dark: #f57c00;
  --success: #4caf50; /* Green alternative */
  --success-light: #81c784;
  --success-dark: #388e3c;

  /* Neutral Colors */
  --bg-primary: #f9fafb; /* Very light gray background */
  --bg-secondary: #ffffff; /* Pure white sections */
  --surface: #ffffff;
  --text-primary: #333333; /* Dark gray for readability */
  --text-secondary: #6c757d;
  --text-light: #8e8e93;
  --border-light: #e5e7eb;

  /* Glass and Effects */
  --glass: rgba(255, 255, 255, 0.95);
  --glass-dark: rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  --gradient-secondary: linear-gradient(
    135deg,
    var(--secondary) 0%,
    var(--secondary-light) 100%
  );
  --gradient-hero: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
}

/* Typography & Base Styles */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings - Responsive sizing */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}

/* Mobile heading adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }
  h4 {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.25rem;
  }
  h4 {
    font-size: 1.1rem;
  }
}

/* Container tweaks */
.container {
  max-width: 1140px;
}

/* Top wrapper */
.top-wrapper {
  font-size: 0.875rem;
  background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.top-wrapper i {
  opacity: 0.9;
}

/* Modern Navbar */
.navbar {
  padding: 0.75rem 0;
  background: var(--glass) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  min-height: 70px;
}

/* Ensure navbar sits above hero overlays and other fixed widgets */
.navbar {
  position: relative;
  z-index: 1100;
  pointer-events: auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary) !important;
  /* allow brand to take most available space */
  max-width: 95%;
}

/* Brand text: single line, no scrollbar, full visible text */
.navbar-brand .brand-text,
.navbar-brand [data-i18n="nav.brand"] {
  display: inline-block;
  white-space: nowrap; /* single line */
  overflow: visible; /* show all text */
  text-overflow: clip; /* no ellipsis */
  max-width: calc(100% - 56px); /* leave space for logo */
}

.navbar-brand .brand-short {
  display: none;
}

.navbar-light .navbar-nav {
  align-items: center;
}

.navbar-light .navbar-nav .nav-link {
  color: var(--text-primary) !important;
  margin: 0 0.25rem;
  padding: 0.5rem 0.75rem !important;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.navbar-light .navbar-nav .nav-link:hover {
  background: var(--glass-dark);
  color: var(--primary) !important;
  transform: translateY(-1px);
}

.navbar-light .navbar-nav .nav-link.active {
  background: var(--primary);
  color: white !important;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Dropdown adjustments */
.navbar .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

/* Make sure dropdown appears above sticky CTAs and overlays */
.navbar .dropdown-menu {
  z-index: 1200;
  pointer-events: auto;
}

.navbar .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.navbar .dropdown-item:hover {
  background: var(--glass-dark);
  color: var(--primary);
}

.navbar .navbar-toggler {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-width: 44px; /* Touch-friendly */
  min-height: 44px;
}

.navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

/* Modern Hero Section */
.hero {
  background: var(--gradient-hero);
  color: #fff;
  padding: 6rem 0;

  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../images/hero-bg.jpg") center/cover no-repeat;
  opacity: 0.1;
  z-index: -1; /* keep background behind navbar */
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero .display-4 {
  font-weight: 800;
  font-size: 3rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Helper: make elements full-width on xs, auto width on small and up */
@media (min-width: 576px) {
  .w-sm-auto {
    width: auto !important;
  }
}

/* Ensure stacked buttons have spacing when wrapped */
.card .d-flex.flex-wrap .btn {
  /* when buttons wrap, keep them readable */
  min-height: 40px;
}

/* Ensure toasts appear above modals and other overlays */
.toast-container,
#globalToast,
#sessionToast {
  z-index: 13000 !important;
}

/* Inline form alerts placed by JS should appear above everything nearby */
.inline-form-alert {
  position: relative; /* allow z-index to work */
  z-index: 14000 !important;
  width: 100%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* If the alert is injected into a modal, make sure it doesn't get clipped */
.modal-body .inline-form-alert {
  position: relative;
  z-index: 14000 !important;
}

.hero .lead {
  opacity: 0.95;
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
}

.hero .btn {
  min-width: 180px;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

/* Hero logo - responsive sizing */
.hero-logo {
  height: 290px;
  width: 330px;
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
}

/* Modern Cards & Components */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-light);
}

.card .card-body h5,
.card .card-body h4 {
  font-weight: 700;
  color: var(--text-primary);
}

.card .card-text {
  color: var(--text-secondary);
}

/* Services Section */
.services {
  background: var(--bg-secondary);
  padding: 5rem 0;
}

.services .card {
  padding: 2rem;
  height: 100%;
}

.services .card-title {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.services .list-unstyled li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
}

.services .alert-light {
  background: rgba(25, 118, 210, 0.05);
  border-color: rgba(25, 118, 210, 0.1);
  color: var(--text-secondary);
}

/* Testimonials */
.testimonials {
  background: var(--bg-primary);
  padding: 5rem 0;
}

.testimonials .col-md-4 img {
  max-height: 70px;
  opacity: 0.95;
}

/* Modern Button System - Touch-friendly sizing */
.btn {
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.95rem;
  min-height: 44px; /* Touch-friendly minimum */
  min-width: 44px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-outline-light {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  color: white;
  transform: translateY(-2px);
}

.btn-outline-primary {
  color: var(--primary);
  border: 2px solid var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* CTA Button Differentiation */
.btn-cta-primary {
  background: var(--gradient-primary);
  color: white;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-lg);
}

.btn-cta-secondary {
  background: var(--gradient-secondary);
  color: white;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-lg);
}

/* Modern Forms - Touch-friendly */
.form-control {
  border-radius: var(--radius);
  border: 2px solid var(--border-light);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: var(--surface);
  min-height: 44px; /* Touch-friendly minimum */
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
  background: var(--surface);
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Modern Footer */
.site-footer {
  background: linear-gradient(135deg, #0b1426 0%, #1a365d 100%);
  color: white;
}

.site-footer .footer-heading {
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.site-footer .footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.3s ease;
}

.site-footer .footer-links a:hover {
  color: var(--secondary);
  text-decoration: underline;
  transform: translateX(4px);
}

.site-footer .form-control-sm {
  background: var(--surface);
  border: 1px solid var(--border-light);
}

.site-footer .invalid-feedback {
  color: #ffc9c9;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
  .navbar-brand {
    max-width: 250px;
    font-size: 0.95rem;
  }

  .navbar-light .navbar-nav .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem !important;
    margin: 0 0.1rem;
  }

  /* Improve container padding */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 992px) {
  .navbar-brand {
    max-width: 200px;
    font-size: 0.9rem;
  }

  .navbar-collapse {
    margin-top: 1rem;
  }

  .navbar-light .navbar-nav .nav-link {
    margin: 0.25rem 0;
    text-align: center;
  }

  .navbar-nav .dropdown-menu {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }

  .hero .display-4 {
    font-size: 2.2rem;
  }

  .hero .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    min-height: 48px; /* Touch-friendly */
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-brand {
    max-width: 180px;
    font-size: 0.85rem;
  }

  .navbar-brand .brand-text {
    display: none;
  }

  .navbar-brand .brand-short {
    display: inline;
  }

  .navbar .d-none.d-lg-flex {
    display: none !important;
  }

  .top-wrapper .col-md-6 {
    text-align: center !important;
  }

  .top-wrapper .justify-content-md-end {
    justify-content: center !important;
  }

  .services .card {
    margin-bottom: 2rem;
  }

  /* Hide sticky CTAs on tablets and mobile */
  .sticky-ctas {
    display: none !important;
  }

  /* Better form spacing */
  .form-control {
    margin-bottom: 1rem;
    min-height: 46px;
  }

  /* Improve touch targets */
  .navbar-toggler {
    min-width: 48px;
    min-height: 48px;
    padding: 0.5rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }

  .hero .display-4 {
    font-size: 1.9rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .navbar-brand {
    max-width: 150px;
    font-size: 0.8rem;
  }

  /* Hero logo mobile optimization */
  .hero-logo {
    height: 200px;
    width: 230px;
    max-width: 90%;
    max-height: 180px;
  }

  /* Improve button spacing on mobile */
  .hero .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    min-height: 48px;
  }

  /* Better card spacing */
  .card {
    margin-bottom: 1.5rem;
  }

  /* Touch-friendly form elements */
  .form-control {
    min-height: 48px;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  /* Improve sticky CTA positioning for tablets */
  .sticky-ctas {
    right: 10px;
    top: 50%;
  }

  .sticky-ctas .btn {
    width: 140px;
    margin-bottom: 0.5rem;
    min-height: 48px;
  }
}

/* Accessibility focus */
a:focus,
button:focus,
.form-control:focus {
  outline: 3px solid rgba(13, 110, 253, 0.18);
  outline-offset: 2px;
}

/* Validation states (bootstrap compatible but themed) */
.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.08rem rgba(220, 53, 69, 0.12);
}
.form-control.is-valid {
  border-color: #198754;
  box-shadow: 0 0 0 0.08rem rgba(25, 135, 84, 0.08);
}
.invalid-feedback {
  display: block;
}

/* Loading button style */
.btn-loading {
  position: relative;
  opacity: 0.9;
}
.btn-loading::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-top-color: transparent;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  margin-left: 8px;
  vertical-align: middle;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Toast small adjustment to match theme */
.toast {
  border-radius: 10px;
}

/* Small utilities */
.mini-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Smooth reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Accordion tweak */
.accordion-button:not(.collapsed) {
  color: var(--primary);
  font-weight: 600;
}

/* Small screens spacing */
@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }

  /* Footer mobile optimizations */
  .site-footer {
    padding: 2rem 0 1rem; /* reduce vertical padding */
  }

  .site-footer .footer-card {
    padding: 1.5rem 1rem; /* reduce padding significantly on mobile */
    width: 100%; /* full width, remove fixed width */
    margin: 0; /* remove any margin */
    box-shadow: 0 6px 20px rgba(2, 6, 23, 0.35); /* lighter shadow */
  }

  .site-footer .footer-inner {
    max-width: 100%; /* full width */
    padding: 0;
  }

  .site-footer .row {
    margin: 0; /* remove row margin */
  }

  .site-footer .col-lg-4,
  .site-footer .col-md-6 {
    padding: 0 0.5rem; /* reduce column padding */
    margin-bottom: 1.5rem; /* add spacing between sections */
  }

  .site-footer .footer-heading {
    font-size: 1rem; /* smaller heading */
    margin-bottom: 0.75rem;
  }

  .site-footer .footer-links {
    font-size: 0.9rem; /* smaller link text */
  }

  .site-footer .footer-bottom {
    margin-top: 1rem; /* reduce top margin */
    padding-top: 1rem;
    text-align: center; /* center align on mobile */
  }
}

/* Footer styles */
.site-footer {
  background: #061221;
}
.site-footer .footer-heading {
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.site-footer .footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.site-footer .footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.site-footer .form-control-sm {
  background: #fff;
}
.site-footer .invalid-feedback {
  color: #ffc9c9;
}

/* Card-like footer container - responsive width */
.site-footer .footer-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border-radius: 14px;
  padding: 3rem;
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.04);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.site-footer .footer-accent {
  height: 6px;
  width: 80px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  margin-bottom: 1rem;
}

.site-footer .footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* Footer bottom section styling */
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.site-footer .footer-bottom .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

.site-footer .footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.site-footer .footer-bottom a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .site-footer .row > div {
    text-align: left;
  }
}

/* Enhanced Sticky CTA widgets */
.sticky-ctas {
  position: fixed;
  right: 20px;
  top: 40%;
  transform: translateY(-50%);
  z-index: 1050;
}

.sticky-ctas .btn {
  width: 160px;
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.sticky-ctas .btn-primary {
  background: var(--gradient-primary);
}

.sticky-ctas .btn-outline-primary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.sticky-ctas .btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 992px) {
  .sticky-ctas {
    right: 15px;
    top: 45%;
  }

  .sticky-ctas .btn {
    width: 150px;
    font-size: 0.9rem;
    min-height: 46px;
  }
}

/* Additional Utility Classes */
.text-gradient-primary {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-secondary {
  background: var(--gradient-secondary);
}

/* Icon improvements */
.bi-check-circle-fill {
  color: var(--success);
}

/* Language flag images (used instead of CSS flag icons) */
.lang-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  border-radius: 2px;
}

/* Content card for articles and long-form pages */
.content-card {
  max-width: 900px;
  margin: 32px auto;
  padding: 1.75rem;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(250, 250, 252, 0.98)
  );
  border: 1px solid var(--border-light);
}

.content-card h1 {
  margin-top: 0;
}

.content-card .tag {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.03);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Loading animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}
