/* CSS Variables */
:root {
  --primary-blue: #1e3a8a;
  --secondary-blue: #3b82f6;
  --light-blue: #dbeafe;
  --dark-gray: #374151;
  --medium-gray: #6b7280;
  --light-gray: #f3f4f6;
  --white: #ffffff;
  --gold: #f59e0b;
  --gradient-primary: linear-gradient(135deg, #1e3a8a, #3b82f6);
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.2);
  --border-radius: 8px;
}

/* Global 3-Column Grid Class for Card Lists */
.card-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 100%;
}

@media (max-width: 992px) {
  .card-grid-3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .card-grid-3col {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure all images are responsive */
img[src],
img[data-src] {
  max-width: 100%;
  height: auto;
}

/* Responsive containers */
.container,
.container-fluid {
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

/* Laptop screens - Reduce content width for better readability */
@media (min-width: 1024px) and (max-width: 1920px) {
  .container {
    max-width: 1100px;
  }

  /* Keep container-fluid full width for headers/footers */
  .container-fluid {
    max-width: 100%;
  }
}

/* Hero container styles are defined in home.css */

/* Prevent horizontal scrolling - Consolidated */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .container,
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }

  .container-fluid.px-4 {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

@media (max-width: 576px) {
  .container,
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .container-fluid.px-4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 480px) {
  .container,
  .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
  }

  .container-fluid.px-4 {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

@media (max-width: 360px) {
  .container,
  .container-fluid {
    padding-left: 8px;
    padding-right: 8px;
  }

  .container-fluid.px-4 {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* Reduce repaints and reflows */
.animate-on-scroll {
  will-change: transform, opacity;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: touch;
  max-width: 100vw;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Font loading optimization - prevent invisible text */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: local('Inter');
}

/* Smooth Animations for Cards and Elements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation classes */
.animate-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-left {
  opacity: 0;
  animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-right {
  opacity: 0;
  animation: slideInRight 0.6s ease-out forwards;
}

.animate-scale {
  opacity: 0;
  animation: scaleIn 0.5s ease-out forwards;
}

/* Stagger animation delays for multiple cards */
.animate-on-scroll:nth-child(1) { animation-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { animation-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { animation-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { animation-delay: 0.4s; }
.animate-on-scroll:nth-child(5) { animation-delay: 0.5s; }
.animate-on-scroll:nth-child(6) { animation-delay: 0.6s; }
.animate-on-scroll:nth-child(7) { animation-delay: 0.7s; }
.animate-on-scroll:nth-child(8) { animation-delay: 0.8s; }
.animate-on-scroll:nth-child(9) { animation-delay: 0.9s; }

/* Optimized global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Smooth scroll for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--medium-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-gray);
}

/* ============================================
   HEADER STYLES MOVED TO css/header.css
   ============================================ */
/* All header, navbar, and top-header styles have been moved to css/header.css */
/* This file now only contains global styles */

/* Global Section Styles */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: 20px;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.2;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--primary-blue);
  border-radius: 2px;
}

.section-description {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: var(--medium-gray);
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.6;
  font-weight: 400;
  margin-top: 20px;
}

/* Button Styles */
.btn {
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--primary-blue);
  color: var(--white);
  border: 2px solid var(--primary-blue);
}

.btn-primary:hover {
  background: var(--secondary-blue);
  border-color: var(--secondary-blue);
  color: var(--white);
}

.btn-outline-primary {
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
  background: var(--white);
}

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

.btn-light {
  background: var(--white);
  color: var(--dark-gray);
  border: 2px solid #e5e7eb;
}

.btn-light:hover {
  background: var(--light-gray);
  border-color: var(--medium-gray);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #fbbf24);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #f59e0b, var(--gold));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
  color: var(--white);
}


/* Form Styles */
.form-control,
.form-select {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 8px;
}

/* Floating Phone Button */
#floating-phone-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.phone-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
  transition: all 0.3s ease;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.phone-btn:hover {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(30, 58, 138, 0.5);
  color: white;
  text-decoration: none;
}

.phone-btn i {
  font-size: 16px;
  animation: phoneRing 1.5s infinite;
}

.phone-text {
  font-size: 13px;
  font-weight: 600;
}

/* Phone button animations */
@keyframes phonePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes phoneRing {
  0%, 100% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(-10deg);
  }
  20% {
    transform: rotate(10deg);
  }
  30% {
    transform: rotate(-10deg);
  }
  40% {
    transform: rotate(10deg);
  }
  50% {
    transform: rotate(0deg);
  }
}

/* Footer placeholder - will be populated by shared.js */
#footer-placeholder {
  width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .container-fluid {
    padding-left: 20px;
    padding-right: 20px;
  }

  .logo-image-enhanced {
    width: 120px;
    height: 120px;
  }

  .brand-name {
    font-size: 1.6rem;
  }
}

@media (max-width: 992px) {
  .section-title {
    font-size: 1.9rem;
  }

  .section-description {
    font-size: 1rem;
  }

  /* Additional mobile responsiveness improvements */
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .card {
    margin-bottom: 20px;
  }

  .section {
    padding: 40px 0;
  }

  .lead-text {
    font-size: 1rem;
    line-height: 1.6;
  }

  .form-control {
    padding: 12px 16px;
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.5rem;
  }

  /* Enhanced mobile responsiveness for very small screens */
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 480px) {
  /* Header styles moved to css/header.css */
}

@media (max-width: 360px) {
  /* Very small mobile devices */
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

/* Mobile responsiveness for phone button */
@media (max-width: 768px) {
  #floating-phone-btn {
    bottom: 15px;
    right: 15px;
  }

  .phone-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .phone-btn i {
    font-size: 14px;
  }

  .phone-text {
    font-size: 12px;
  }

  .card-body {
    padding: 20px 15px;
  }

  .form-control {
    padding: 10px 14px;
    font-size: 16px;
  }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE ENHANCEMENTS
   ============================================ */

/* Prevent horizontal scroll globally */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive tables */
@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.9rem;
  }

  table th,
  table td {
    padding: 8px 4px;
  }
}

/* Responsive buttons on mobile */
@media (max-width: 576px) {
  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
    border-radius: 8px !important;
    margin-bottom: 10px;
  }
}

/* Touch-friendly targets */
@media (max-width: 768px) {
  a, button, .btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Responsive containers */
@media (max-width: 576px) {
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Fix overflow issues */
@media (max-width: 768px) {
  .overflow-hidden {
    overflow: visible !important;
  }

  [style*="width"] {
    max-width: 100% !important;
  }
}

/* Responsive text */
@media (max-width: 576px) {
  .lead {
    font-size: 1rem;
  }

  .display-1 { font-size: 2.5rem !important; }
  .display-2 { font-size: 2rem !important; }
  .display-3 { font-size: 1.75rem !important; }
  .display-4 { font-size: 1.5rem !important; }
}

