/* ============================================
   MediaPix — Global Stylesheet
   ============================================ */

/* ===== BASE ===== */
html, body { overflow-x: hidden; }
html { scroll-behavior: auto; }
body {
  font-family: 'DM Sans', sans-serif;
  background: #0a0a0a;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== SELECT DARK THEME ===== */
select {
  background-color: #141414 !important;
  color: #fff !important;
  -webkit-appearance: none;
}
select option {
  background-color: #1a1a1a !important;
  color: #fff !important;
  padding: 8px 12px;
}
select option:hover, select option:checked {
  background-color: #E02F4B !important;
  color: #fff !important;
}
select.form-input, select.form-control {
  background-color: rgba(255,255,255,0.04) !important;
  color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
select.form-input option, select.form-control option {
  background-color: #1a1a1a !important;
  color: #fff !important;
  padding: 8px 12px;
}

/* ===== MAP CONTAINER ===== */
.map-container iframe {
  width: 100%; height: 100%; border: 0;
  filter: grayscale(1) invert(1) contrast(1.1);
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-overlay img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain; border-radius: 0.75rem;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.lightbox-overlay.active img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.1); border: none; border-radius: 50%;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.1); border: none; border-radius: 50%;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* ===== AURORA GRADIENT BG ===== */
.aurora-bg::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    radial-gradient(ellipse 700px 700px at 15% 40%, rgba(224,47,75,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 85% 25%, rgba(99,102,241,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 450px 450px at 55% 85%, rgba(168,85,247,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: auroraFloat 25s ease-in-out infinite alternate;
}
@keyframes auroraFloat {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
  33%  { transform: translate(40px, -30px) scale(1.05) rotate(1deg); }
  66%  { transform: translate(-30px, 40px) scale(0.97) rotate(-1deg); }
  100% { transform: translate(15px, 15px) scale(1.02) rotate(0.5deg); }
}

/* ===== PAGE TRANSITION ===== */
.page-transition {
  position: fixed; inset: 0; z-index: 9999;
  background: #0a0a0a;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
  will-change: transform;
}
.transitioning .page-transition {
  transform: scaleY(1);
  transform-origin: top;
}

/* ===== PRELOADER ===== */
#preloader {
  position: fixed; inset: 0; z-index: 9990;
  background: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
}
.preloader-content {
  display: flex; flex-direction: column; align-items: center;
}
.preloader-bar { width: 200px; height: 2px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.preloader-bar-inner { width: 0%; height: 100%; background: #E02F4B; border-radius: 2px; transition: width 0.1s linear; }

/* ===== CUSTOM CURSOR ===== */
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 8px; height: 8px;
  background: #E02F4B; border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s;
}
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 40px; height: 40px;
  border: 1px solid rgba(224,47,75,0.4); border-radius: 50%;
  pointer-events: none; z-index: 9997;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1), height 0.4s cubic-bezier(0.16,1,0.3,1), border-color 0.3s;
}
.cursor-dot.hovering { width: 0; height: 0; }
.cursor-ring.hovering { width: 70px; height: 70px; border-color: rgba(224,47,75,0.7); }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }
@media (max-width: 1024px) { .cursor-dot, .cursor-ring { display: none; } }

/* ===== HERO ===== */
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
}
.slide-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.18;
  pointer-events: none;
}
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.7) 50%, rgba(10,10,10,0.92) 100%);
  z-index: 1;
}

/* ===== SWIPER CUSTOM ===== */
.hero-swiper { height: 100vh; width: 100%; position: relative; z-index: 2; }
.hero-swiper .swiper-slide { display: flex; align-items: center; overflow: hidden; }
.hero-swiper .swiper-pagination {
  bottom: 40px !important; z-index: 10;
  left: 40px !important;
  text-align: left !important;
  width: auto !important;
}
.hero-swiper .swiper-pagination-bullet {
  width: 32px !important; height: 3px !important;
  border-radius: 2px !important;
  background: rgba(255,255,255,0.25) !important;
  opacity: 1 !important;
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1) !important;
}
.hero-swiper .swiper-pagination-bullet-active {
  width: 56px !important;
  background: #E02F4B !important;
}

/* ===== CLIENTS SWIPER ===== */
.clients-swiper .swiper-slide {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 80px;
}

/* ===== SLIDE CONTENT ANIMATION ===== */
.slide-el { opacity: 0; transform: translateY(50px); }

/* ===== MARQUEE ===== */
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.marquee-track { animation: marquee 40s linear infinite; display: flex; white-space: nowrap; }
.marquee-track:hover { animation-play-state: paused; }

/* ===== NAV LINK ===== */
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: #E02F4B;
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: #fff; }

/* ===== SERVICE ROW ===== */
.service-row {
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  border-left: 2px solid transparent;
}
.service-row:hover {
  padding-left: 1.5rem;
  border-left-color: #E02F4B;
  background: rgba(224,47,75,0.03);
}

/* ===== WORK CARD ===== */
.work-card { transition: all 0.6s cubic-bezier(0.16,1,0.3,1); }
.work-card:hover { transform: translateY(-8px); }
.work-card .work-overlay { opacity: 0; transition: opacity 0.5s cubic-bezier(0.16,1,0.3,1); }
.work-card:hover .work-overlay { opacity: 1; }
.work-card .work-number { transition: all 0.5s cubic-bezier(0.16,1,0.3,1); }
.work-card:hover .work-number { transform: scale(1.1); color: rgba(224,47,75,0.1); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #E02F4B; color: #fff; font-weight: 600;
  padding: 1rem 2rem; border-radius: 9999px;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.btn-primary:hover { background: #FF4D6A; transform: translateY(-3px); box-shadow: 0 20px 40px rgba(224,47,75,0.3); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.9); font-weight: 500;
  padding: 1rem 2rem; border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.25);
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.6); transform: translateY(-3px); }
.magnetic { transition: transform 0.3s cubic-bezier(0.16,1,0.3,1); }

/* ===== SCROLL INDICATOR ===== */
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(8px); opacity: 1; }
}
.scroll-indicator-line { animation: scrollBounce 2s ease-in-out infinite; }

/* ===== TEXT REVEAL ===== */
.line-wrapper { overflow: hidden; display: block; }
.reveal-line { display: block; transform: translateY(100%); opacity: 0; }

/* ===== STAT COUNTER ===== */
.stat-card { position: relative; transition: all 0.4s cubic-bezier(0.16,1,0.3,1); }
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: #E02F4B;
  transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}
.stat-card:hover::before { width: 60px; }

/* ===== LANG SWITCH ===== */
.lang-btn { transition: all 0.3s; cursor: pointer; background: none; border: none; }
.lang-btn.active { color: #fff; }

/* ===== MOBILE MENU ===== */
.mobile-nav {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.mobile-nav.open { transform: translateX(0); }

/* ===== FOOTER ===== */
.footer-link {
  color: rgba(255,255,255,0.4);
  transition: color 0.3s, transform 0.3s;
  display: inline-block;
}
.footer-link:hover { color: #E02F4B; transform: translateX(4px); }

/* ===== PAGE HERO (Inner Pages) ===== */
.page-hero {
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224,47,75,0.3), transparent);
}
.breadcrumb a { transition: color 0.3s; }
.breadcrumb a:hover { color: #E02F4B; }

/* ===== BLOG CARD ===== */
.blog-card {
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}
.blog-card:hover { transform: translateY(-6px); border-color: rgba(224,47,75,0.3); }
.blog-card .blog-img {
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.blog-card:hover .blog-img { transform: scale(1.05); }

/* ===== CONTACT FORM ===== */
.form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  transition: all 0.3s;
  width: 100%;
  outline: none;
}
.form-input:focus {
  border-color: rgba(224,47,75,0.5);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(224,47,75,0.1);
}
.form-input::placeholder { color: rgba(255,255,255,0.3); }

/* ===== TEAM CARD ===== */
.team-card {
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}
.team-card:hover { transform: translateY(-6px); }
.team-card .team-img {
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
  filter: grayscale(0.3);
}
.team-card:hover .team-img { filter: grayscale(0); }

/* ===== PROJECT DETAIL ===== */
.project-gallery img {
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.project-gallery img:hover { transform: scale(1.02); }

/* ===== CHATBOT ===== */
.chatbot-btn {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 56px; height: 56px;
  background: #E02F4B;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 90;
  box-shadow: 0 8px 30px rgba(224,47,75,0.4);
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  border: none; color: #fff;
}
.chatbot-btn:hover { transform: scale(1.1); box-shadow: 0 12px 40px rgba(224,47,75,0.5); }
.chatbot-btn.active { background: #3F4448; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.chatbot-btn.active .chatbot-icon-chat { display: none; }
.chatbot-btn.active .chatbot-icon-close { display: block; }
.chatbot-icon-close { display: none; }

.chatbot-window {
  position: fixed;
  bottom: 6rem; right: 1.5rem;
  width: 380px; max-width: calc(100vw - 2rem);
  height: 520px; max-height: calc(100vh - 10rem);
  background: #141414;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.25rem;
  z-index: 89;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.chatbot-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.chatbot-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 0.75rem;
  flex-shrink: 0;
}
.chatbot-messages {
  flex: 1; overflow-y: auto !important;
  overscroll-behavior: contain;
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  -webkit-overflow-scrolling: touch;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
.chatbot-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.chat-msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: chatMsgIn 0.3s ease-out;
}
@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: #E02F4B;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chatbot-input {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; gap: 0.75rem;
  flex-shrink: 0;
}
.chatbot-input input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.3s;
}
.chatbot-input input:focus { border-color: rgba(224,47,75,0.5); }
.chatbot-input input::placeholder { color: rgba(255,255,255,0.3); }
.chatbot-input button {
  width: 40px; height: 40px;
  background: #E02F4B; color: #fff;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}
.chatbot-input button:hover { background: #FF4D6A; }

/* ===== CTA SECTION (Inner pages) ===== */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(224,47,75,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== CHATBOT ENHANCEMENTS ===== */
.typing-indicator { display: flex; gap: 5px; padding: 0.75rem 1rem; align-items: center; min-height: 40px; }
.typing-indicator .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: typingDot 1.4s ease-in-out infinite;
}
.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* Suggestion buttons */
.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.5rem 0; animation: chatMsgIn 0.3s ease-out;
}
.chat-suggestion-btn {
  background: rgba(224,47,75,0.08);
  border: 1px solid rgba(224,47,75,0.2);
  color: #E02F4B; font-size: 0.8125rem; font-weight: 500;
  padding: 0.5rem 0.875rem; border-radius: 9999px;
  cursor: pointer; transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.chat-suggestion-btn:hover {
  background: rgba(224,47,75,0.15);
  border-color: rgba(224,47,75,0.4);
  transform: translateY(-1px);
}

/* Bot message links */
.chat-msg.bot a { color: #E02F4B; text-decoration: underline; }
.chat-msg.bot a:hover { color: #FF4D6A; }
.chat-msg.bot strong { color: #fff; font-weight: 600; }

/* Send button animation */
.chatbot-input button.sending {
  opacity: 0.5; pointer-events: none;
}

/* Chatbot notification badge */
.chatbot-btn .chat-badge {
  position: absolute; top: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #10b981; border: 2px solid #0a0a0a;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* ===== PROSE (Rich Text Content) ===== */
.prose { line-height: 1.75; }
.prose p { margin-bottom: 1.25em; }
.prose h2 { font-size: 1.5em; font-weight: 700; margin-top: 2em; margin-bottom: 0.75em; color: #fff; }
.prose h3 { font-size: 1.25em; font-weight: 600; margin-top: 1.6em; margin-bottom: 0.6em; color: #fff; }
.prose h4 { font-size: 1.1em; font-weight: 600; margin-top: 1.4em; margin-bottom: 0.5em; color: #fff; }
.prose strong { color: #fff; font-weight: 600; }
.prose a { color: #E02F4B; text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: #FF4D6A; }
.prose ul, .prose ol { margin: 1em 0; padding-left: 1.5em; }
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li { margin-bottom: 0.5em; }
.prose blockquote { border-left: 3px solid #E02F4B; padding-left: 1em; margin: 1.5em 0; font-style: italic; color: rgba(255,255,255,0.6); }
.prose code { background: rgba(255,255,255,0.06); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.875em; }
.prose pre { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 0.75rem; padding: 1em; overflow-x: auto; margin: 1.5em 0; }
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; height: auto; border-radius: 0.75rem; margin: 1.5em 0; }
.prose-invert { color: rgba(255,255,255,0.7); }
.prose-base { font-size: 1rem; }
.prose-lg { font-size: 1.125rem; }

/* ===== SCROLL REVEAL INITIAL STATE ===== */
[data-scroll-reveal] {
  opacity: 0;
  transform: translateY(40px);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
  .aurora-bg::before { animation: none; }
  [data-scroll-reveal] { opacity: 1; transform: none; }
}
