/* ===================================
   MODERN RESPONSIVE ENHANCEMENTS
   =================================== */

/* CSS Variables for consistent theming */
:root {
  --primary-color: #0066cc;
  --secondary-color: #EBF4FF;
  --text-dark: #585978;
  --text-light: #ffffff;
  --border-radius: 8px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.16);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

/* === GLOBAL STYLES === */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern";
  font-kerning: auto;
  overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

p {
  line-height: 1.6;
  color: var(--text-dark);
}

/* === IMAGES === */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

.img-fluid {
  width: 100%;
  max-width: 100%;
}

/* === BUTTONS === */
.button {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--border-radius);
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.button-lg {
  padding: 14px 40px;
  font-size: 16px;
}

/* === FORMS === */
.form-input,
.form-input::-webkit-input-placeholder {
  font-family: inherit;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e5e5;
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: var(--transition);
  background: #fafafa;
}

.form-input:hover {
  border-color: #d5d5d5;
  background: #ffffff;
}

.form-input:focus {
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
  outline: none;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* === CARDS AND CONTAINERS === */
.single-feature {
  border-radius: 12px;
  padding: 30px 20px;
  transition: var(--transition);
  background: #ffffff;
}

.single-feature:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.single-pricing {
  border-radius: 12px;
  padding: 30px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.single-pricing:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.single-step {
  border-radius: 12px;
  padding: 25px;
  transition: var(--transition);
}

.single-step:hover {
  box-shadow: var(--shadow-md);
}

/* === HEADER/NAVBAR === */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.navbar {
  padding: 12px 0;
}

.navbar-brand {
  max-width: 180px;
  height: auto;
}

.navbar-brand img {
  max-height: 50px;
  width: auto;
}

.navbar-toggler {
  border: none;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: 2px solid var(--primary-color);
  border-radius: 4px;
}

.navbar-collapse {
  margin-top: 20px;
}

.nav-link {
  padding: 10px 16px !important;
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-weight: 500;
}

.nav-link:hover {
  background: var(--secondary-color);
  color: var(--primary-color) !important;
}

.nav-link.active {
  color: var(--primary-color) !important;
  border-bottom: 2px solid var(--primary-color);
}

/* === MODALS === */
.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid #f0f0f0;
}

.modal-footer {
  border-top: 1px solid #f0f0f0;
}

.btn-close {
  padding: 0.5rem;
  opacity: 0.6;
  transition: var(--transition);
}

.btn-close:hover {
  opacity: 1;
}

/* === SECTIONS === */
section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  section {
    padding: 50px 0;
  }
}

/* === UTILITY CLASSES === */
.text-center {
  text-align: center;
}

.text-lg-end {
  text-align: right;
}

@media (max-width: 992px) {
  .text-lg-end {
    text-align: center;
    margin-top: 30px;
  }
}

.text-lg-right {
  text-align: right;
}

@media (max-width: 992px) {
  .text-lg-right {
    text-align: center;
  }
}

.align-self-center {
  align-self: center;
}

.align-self-end {
  align-self: flex-end;
}

@media (max-width: 992px) {
  .align-self-lg-end {
    align-self: center;
  }
}

/* === SCROLL TO TOP === */
.scroll-top {
  width: 45px;
  height: 45px;
  background: var(--secondary-color);
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  color: var(--primary-color);
  border-radius: 50%;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
}

.scroll-top:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

@media (max-width: 576px) {
  .scroll-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
    font-size: 16px;
  }
}

/* === FOOTER === */
footer {
  background: #f8f9fa;
  padding-top: 60px;
  margin-top: 60px;
}

.footer-widget {
  margin-bottom: 30px;
}

.footer-widget h6 {
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 16px;
}

.footer-widget ul li {
  margin-bottom: 10px;
}

.footer-widget a {
  color: var(--text-dark);
  transition: var(--transition);
}

.footer-widget a:hover {
  color: var(--primary-color);
}

.socials {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.socials li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid #e5e5e5;
  color: var(--text-dark);
  transition: var(--transition);
}

.socials li a:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* === RESPONSIVE BREAKPOINTS === */

/* Extra Small Devices (Mobile) */
@media (max-width: 575.98px) {
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 24px;
    line-height: 1.3;
  }

  h2 {
    font-size: 28px;
    line-height: 1.3;
  }

  h3 {
    font-size: 22px;
  }

  h4 {
    font-size: 18px;
  }

  h5 {
    font-size: 16px;
  }

  p {
    font-size: 15px;
  }

  .hero-section {
    padding: 60px 0;
  }

  .hero-content-wrapper h2 {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .hero-content-wrapper p {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .button {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
    text-align: center;
  }

  .button-lg {
    padding: 14px 28px;
  }

  .mb-30 {
    margin-bottom: 20px !important;
  }

  .mb-60 {
    margin-bottom: 30px !important;
  }

  .section-title {
    text-align: center;
  }

  .single-feature {
    padding: 20px 15px;
    margin-bottom: 20px;
  }

  .single-feature .icon {
    margin-bottom: 15px;
  }

  .single-feature h5 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .single-feature p {
    font-size: 14px;
  }

  .single-step {
    margin-bottom: 25px;
    text-align: center;
  }

  .single-step .number {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .row > * {
    margin-bottom: 20px;
  }
}

/* Small Devices (Landscape Mobile, Small Tablet) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .container {
    padding: 0 20px;
  }

  h2 {
    font-size: 32px;
  }

  h3 {
    font-size: 24px;
  }

  .section-title text-center {
    margin-bottom: 30px;
  }

  .single-feature {
    margin-bottom: 25px;
  }
}

/* Medium Devices (Tablet) */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .container {
    padding: 0 30px;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .single-feature {
    margin-bottom: 25px;
  }
}

/* Large Devices (Desktop) */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
  }

  .section-title {
    margin-bottom: 50px;
  }
}

/* Extra Large Devices (Large Desktop) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* === HIGH DPI / RETINA DISPLAYS === */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* === PRINT STYLES === */
@media print {
  body {
    background: white;
    color: black;
  }

  .header,
  .navbar-toggler,
  .scroll-top,
  .preloader,
  footer {
    display: none !important;
  }

  section {
    page-break-inside: avoid;
  }

  a {
    text-decoration: underline;
  }
}

/* === TOUCH DEVICE OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {
  a,
  button,
  .button {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
  }

  .button:hover {
    transform: none;
  }

  .button:active {
    opacity: 0.9;
  }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
  body {
    background: #1a1a1a;
    color: #e0e0e0;
  }

  .form-input {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
  }

  .single-feature {
    background: #2a2a2a;
  }

  footer {
    background: #1a1a1a;
    border-top: 1px solid #404040;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
