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

/* ============================================ */
/* CROSS-BROWSER COMPATIBILITY */
/* ============================================ */

:root {
  --primary: #ff0000;
  --dark: #ffffff;
  --accent: #ff4d4d;
  --bg-light: #f8f8f8;
  --font-main:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-heading:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* Universal box-sizing for all browsers */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  /* Prevent browser zoom inconsistencies */
  zoom: 1;
  -ms-zoom: 1;
}

body {
  background-color: #faf8f6;
  color: #000000;
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  /* Ensure consistent sizing */
  min-height: 100vh;
  width: 100%;
}

/* Force same font for all languages - prevents different fonts per language */
html[lang="uz"]
  *:not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(
    [class*="fa-"]
  ),
html[lang="ru"]
  *:not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(
    [class*="fa-"]
  ),
html[lang="en"]
  *:not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(
    [class*="fa-"]
  ) {
  font-family: var(--font-main) !important;
}

html[lang="uz"] .syncopate,
html[lang="ru"] .syncopate,
html[lang="en"] .syncopate {
  font-family: var(--font-heading) !important;
}

/* Restore Font Awesome icons */
.fa,
.fas,
.far,
.fab,
.fal,
.fad,
[class*="fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

.syncopate {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.85;
  text-transform: uppercase;
  font-weight: 700;
}

.outline-text {
  color: transparent;
  -webkit-text-stroke: 2px #000000;
  -moz-text-stroke: 2px #000000;
  text-stroke: 2px #000000;
  text-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
  /* Fallback for browsers without text-stroke */
  paint-order: stroke fill;
}

.glow-text {
  text-shadow:
    0 0 5px rgba(255, 0, 0, 0.3),
    0 0 10px rgba(255, 0, 0, 0.2);
}

.premium-card {
  height: auto;
  min-height: 480px;
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  -webkit-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  -moz-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  -o-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  -webkit-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  -moz-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.premium-card:hover {
  border-color: rgba(220, 38, 38, 0.3);
  -webkit-transform: translateY(-6px);
  -moz-transform: translateY(-6px);
  -ms-transform: translateY(-6px);
  -o-transform: translateY(-6px);
  transform: translateY(-6px);
  -webkit-box-shadow: 0 20px 40px rgba(220, 38, 38, 0.1);
  -moz-box-shadow: 0 20px 40px rgba(220, 38, 38, 0.1);
  box-shadow: 0 20px 40px rgba(220, 38, 38, 0.1);
}

.premium-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.6s;
  transform-origin: left;
}

.premium-card:hover::before {
  transform: scaleX(1);
}

.card-number {
  font-size: 8rem;
  position: absolute;
  right: -20px;
  top: -20px;
  opacity: 0.03;
  font-weight: 900;
}

.scroller {
  white-space: nowrap;
  overflow: hidden;
  background: var(--primary);
  padding: 20px 0;
}

.scroller-inner {
  display: inline-block;
  -webkit-animation: scroll 20s linear infinite;
  -moz-animation: scroll 20s linear infinite;
  -o-animation: scroll 20s linear infinite;
  animation: scroll 20s linear infinite;
}

@-webkit-keyframes scroll {
  from {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
  to {
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
  }
}

@-moz-keyframes scroll {
  from {
    -moz-transform: translateX(0);
    transform: translateX(0);
  }
  to {
    -moz-transform: translateX(-50%);
    transform: translateX(-50%);
  }
}

@keyframes scroll {
  from {
    -webkit-transform: translateX(0);
    -moz-transform: translateX(0);
    transform: translateX(0);
  }
  to {
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    transform: translateX(-50%);
  }
}

.neon-border {
  box-shadow:
    0 0 30px rgba(255, 0, 0, 0.4),
    0 0 60px rgba(255, 0, 0, 0.2);
}

.section-title {
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.contact-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border: 1px solid rgba(255, 0, 0, 0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 0, 0, 0.1),
    transparent
  );
  transition: left 0.6s;
}

.contact-card:hover::before {
  left: 100%;
}

.contact-card:hover {
  border-color: var(--primary);
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(255, 0, 0, 0.3);
}

.about-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-left: 5px solid var(--primary);
  transition: all 0.5s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

.about-card:hover {
  background: linear-gradient(135deg, #fafafa 0%, #fff5f5 100%);
  transform: translateX(8px);
  box-shadow: -8px 0 20px rgba(255, 0, 0, 0.12);
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
  }
}

.pulse-animation {
  animation: pulse-glow 2s infinite;
}

.hero-bg {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 50%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero-bg::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(255, 0, 0, 0.08) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-30px) translateX(20px);
  }
}

.hero-image {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.hero-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 0, 0, 0.1) 0%,
    transparent 100%
  );
  z-index: 1;
}

.hero-feature {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.hero-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.3);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.12);
}

.animate-slide-up {
  animation: slideUp 1s ease-out;
}

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

.stats-bg {
  background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
  position: relative;
}

.stats-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&q=80&w=2000");
  background-size: cover;
  background-position: center;
  opacity: 0.05;
  z-index: 0;
}

.pattern-dots {
  background-image: radial-gradient(
    circle,
    rgba(255, 0, 0, 0.1) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
}

/* Grayscale to color transition */
.grayscale {
  filter: grayscale(100%);
}

.group-hover\:grayscale-0:hover {
  filter: grayscale(0%);
}
/* New About Card Styling */
.about-card-compact {
  position: relative;
  overflow: hidden;
}

.about-card-compact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff0000, #ff6666);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.about-card-compact:hover::before {
  transform: scaleX(1);
}

.about-card-compact:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(255, 0, 0, 0.1);
}

/* Additional Design Elements */
.shape-circle {
  animation: float 6s ease-in-out infinite;
}

.shape-square {
  animation: rotate-slow 20s linear infinite;
}

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

/* Gradient Text Decorations */
.gradient-underline {
  position: relative;
  display: inline-block;
}

.gradient-underline::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff0000, #ff6666, transparent);
  border-radius: 2px;
}

/* ============================================ */
/* MOBILE RESPONSIVE - Tailwind breakpoints */
/* ============================================ */

/* Tablet - 768px - 1024px */
@media (max-width: 1024px) {
  .premium-card {
    height: auto !important;
    min-height: 450px;
  }

  .premium-card h3 {
    font-size: 1.5rem !important;
  }

  .section-title {
    font-size: clamp(2rem, 5vw, 3rem) !important;
  }
}

/* Mobile - max 768px */
@media (max-width: 768px) {
  /* Navigation */
  nav {
    padding: 0.5rem 0 !important;
  }

  nav .flex.justify-between {
    padding: 0.75rem 1rem !important;
  }

  nav a .text-2xl {
    font-size: 1.25rem !important;
  }

  nav .w-16 {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }

  nav .h-12 {
    height: 1.75rem !important;
    width: 1.75rem !important;
  }

  /* Sections */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  #asosiy {
    padding-top: 5rem !important;
    min-height: auto !important;
  }

  /* Hero Title */
  h1,
  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
    line-height: 1.2 !important;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    line-height: 1.2 !important;
  }

  /* Hero Grid */
  .grid.lg\:grid-cols-2 {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Hero images grid */
  .grid.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .hero-image {
    height: 120px !important;
    margin-top: 0 !important;
  }

  .hero-image.h-56 {
    height: 120px !important;
  }

  .hero-image.mt-6,
  .hero-image.-mt-6 {
    margin-top: 0 !important;
  }

  /* Grid Fixes */
  .md\:grid-cols-2,
  .lg\:grid-cols-2,
  .lg\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }

  .md\:grid-cols-4,
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Spacing */
  .gap-12 {
    gap: 1.5rem !important;
  }

  .gap-8 {
    gap: 1rem !important;
  }

  .gap-6 {
    gap: 0.75rem !important;
  }

  .px-6,
  .px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .p-10,
  .p-12 {
    padding: 1.25rem !important;
  }

  .py-40 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .py-32,
  .py-28 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* Premium Cards */
  .premium-card {
    height: auto !important;
    min-height: auto !important;
    padding: 1.25rem !important;
  }

  .premium-card .h-2\/3 {
    height: 180px !important;
  }

  .premium-card h3 {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }

  .premium-card p {
    font-size: 0.875rem !important;
    margin-bottom: 0.75rem !important;
  }

  .card-number {
    font-size: 4rem !important;
  }

  /* Marketing Card */
  .premium-card.lg\:p-24 {
    padding: 1.5rem !important;
    flex-direction: column !important;
  }

  .premium-card h3.text-6xl,
  .premium-card h3.lg\:text-8xl {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }

  .premium-card .h-\[400px\] {
    height: 200px !important;
  }

  .premium-card .px-16 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  .premium-card .py-6 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  /* Margin/padding */
  .mb-20,
  .mb-32 {
    margin-bottom: 1.5rem !important;
  }

  .mt-20,
  .mt-24 {
    margin-top: 1.5rem !important;
  }

  /* Stats section */
  #yutuqlar .text-6xl {
    font-size: 2.5rem !important;
  }

  #yutuqlar .text-lg {
    font-size: 0.875rem !important;
  }

  #yutuqlar p {
    font-size: 0.75rem !important;
  }

  /* About section cards */
  #biz-haqimizda .p-10 {
    padding: 1rem !important;
  }

  #biz-haqimizda .h-32 {
    height: 100px !important;
  }

  #biz-haqimizda h3 {
    font-size: 1rem !important;
  }

  #biz-haqimizda p {
    font-size: 0.8rem !important;
  }

  /* Contact section */
  #boglanish .text-6xl {
    font-size: 2.5rem !important;
  }

  #boglanish .p-8 {
    padding: 1rem !important;
  }

  /* Scroller */
  .scroller {
    padding: 10px 0 !important;
  }

  .scroller-inner {
    font-size: 1rem !important;
  }

  /* Footer */
  footer {
    padding: 2rem 1rem !important;
  }

  footer .text-3xl {
    font-size: 1.25rem !important;
  }

  footer .gap-8 {
    gap: 1.5rem !important;
  }

  /* Decorative elements hide on mobile */
  .absolute.w-40,
  .absolute.w-56,
  .absolute.w-72,
  .absolute.w-96 {
    display: none !important;
  }

  /* Hero 98% badge */
  .absolute.-bottom-4.-left-4 {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    margin-top: 1rem !important;
    display: inline-block !important;
    padding: 0.75rem 1rem !important;
  }

  .absolute.-bottom-4.-left-4 .text-3xl {
    font-size: 1.5rem !important;
  }

  /* Hero features */
  .hero-feature {
    padding: 0.5rem !important;
  }

  .hero-feature .text-2xl {
    font-size: 1.25rem !important;
  }

  .hero-feature .text-\[10px\] {
    font-size: 8px !important;
  }

  /* Buttons */
  .px-8 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .py-3 {
    padding-top: 0.625rem !important;
    padding-bottom: 0.625rem !important;
  }

  /* Modal responsive */
  #loginModal > div,
  #registerModal > div {
    margin: 1rem !important;
    padding: 1.5rem !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
}

/* Small Mobile - max 480px */
@media (max-width: 480px) {
  section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  #asosiy {
    padding-top: 4.5rem !important;
  }

  h1,
  .hero-title {
    font-size: clamp(1.5rem, 8vw, 2rem) !important;
  }

  .section-title {
    font-size: clamp(1.25rem, 6vw, 1.5rem) !important;
  }

  /* Two column grids become single on very small screens */
  .grid-cols-3,
  .md\:grid-cols-4,
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .text-base {
    font-size: 0.875rem !important;
  }

  .text-sm {
    font-size: 0.8rem !important;
  }

  .gap-12,
  .gap-8,
  .gap-6 {
    gap: 0.5rem !important;
  }

  .p-10,
  .p-12 {
    padding: 1rem !important;
  }

  .px-6,
  .px-8 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Premium cards on small screens */
  .premium-card .h-2\/3 {
    height: 150px !important;
  }

  /* Stats */
  #yutuqlar .text-6xl {
    font-size: 2rem !important;
  }

  /* Contact icons */
  #boglanish .text-6xl {
    font-size: 2rem !important;
  }

  /* Hero images */
  .hero-image {
    height: 100px !important;
  }
}

/* Modal Animations */
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scale-in 0.3s ease-out;
}

/* Modal styling */
#loginModal.hidden,
#registerModal.hidden {
  display: none !important;
}

#loginModal:not(.hidden),
#registerModal:not(.hidden) {
  display: flex !important;
}

/* Form input animations */
input:focus {
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* Button loading state */
button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Auth form styling */
.auth-modal-overlay {
  animation: fadeIn 0.3s ease-in;
}

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

/* Success and error messages */
.success-message {
  animation: slideIn 0.3s ease-out;
}

.error-message {
  animation: shake 0.4s ease-in;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* ============================================ */
/* LANGUAGE SWITCHER STYLES */
/* ============================================ */

#langDropdown {
  animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-option:hover {
  background-color: #fef2f2;
}

.lang-option:first-child {
  border-radius: 0.5rem 0.5rem 0 0;
}

.lang-option:last-child {
  border-radius: 0 0 0.5rem 0.5rem;
}

#langArrow {
  transition: transform 0.2s ease;
}

#langArrow.rotate-180 {
  transform: rotate(180deg);
}

/* Mobile language buttons active state */
.mobile-lang-btn.active {
  background-color: rgba(255, 255, 255, 0.3) !important;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
