/* Enhanced Modern Effects - Marmara Lojistik Petrol */

/* ========== ADVANCED TRANSITIONS ========== */

/* Smooth page transitions */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Hero section parallax optimization */
.hero-bg {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Navbar glassmorphism transitions */
.navbar {
  will-change: background, box-shadow, border-color;
}

/* ========== HOVER EFFECTS ========== */

/* Enhanced button hover with ripple-like effect */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

/* Card hover enhancement */
.card, .camp-card, .feat-tile {
  will-change: transform, box-shadow;
}

/* ========== SCROLL ANIMATIONS ========== */

/* Fade in on scroll with stagger */
[data-reveal] {
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skeleton loading animation */
@keyframes skeleton-loading {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%, #f0f0f0 100%);
  background-size: 1000px 100%;
  animation: skeleton-loading 2s infinite;
}

/* Enhanced scroll reveal with fade and scale */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
              transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: opacity, transform;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered animation delays */
[data-reveal]:nth-child(1) { animation-delay: 0.1s; }
[data-reveal]:nth-child(2) { animation-delay: 0.2s; }
[data-reveal]:nth-child(3) { animation-delay: 0.3s; }
[data-reveal]:nth-child(4) { animation-delay: 0.4s; }
[data-reveal]:nth-child(5) { animation-delay: 0.5s; }

/* Blur-in effect on scroll */
@keyframes blurIn {
  from {
    opacity: 0;
    filter: blur(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.blur-reveal {
  animation: blurIn 0.8s ease-out forwards;
}

/* ========== ABOUT PAGE RESPONSIVE ========== */

/* About page content grids */
.section > .container > div[style*="grid-template-columns:1fr 1fr"] {
  display: grid !important;
}

@media (max-width: 768px) {
  /* Convert about content grids to single column */
  .section > .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Gallery grid responsive */
  div[style*="grid-template-columns:1fr 1fr;gap:2rem"] {
    grid-template-columns: 1fr !important;
  }

  /* Ensure padding on mobile sections */
  .section {
    padding: 2.5rem 0;
  }
}

/* ========== SERVICE CONTENT RESPONSIVE ========== */

.service-content {
  display: block;
}

.service-content > div[style*="display:grid"] {
  display: grid !important;
}

@media (max-width: 768px) {
  /* Force responsive grid for service content */
  .service-content > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  /* Adjust order property on mobile if needed */
  .service-content > div[style*="order"] {
    order: unset !important;
  }
  
  /* Ensure padding and spacing on mobile */
  .service-content {
    margin-top: 1.5rem;
  }
}

/* ========== MOBILE OPTIMIZATIONS ========== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== TYPEWRITER CURSOR ========== */

.typewriter-text {
  position: relative;
}

/* Blinking cursor */
@keyframes typewriterBlink {
  0%, 49% {
    border-right-color: currentColor;
  }
  50%, 100% {
    border-right-color: transparent;
  }
}

/* ========== FLOATING & LEVITATION ========== */

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Apply float to specific elements */
.loader-logo {
  animation: float 3s ease-in-out infinite;
}

/* ========== IMAGE GALLERY & MODAL ========== */

/* Gallery image hover with depth */
.gallery-image {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-image:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25) !important;
}

.gallery-image img {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 100%;
}

.gallery-image:hover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* Lightbox/Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalZoom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalZoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
}

.modal-caption {
  color: #fff;
  margin-top: 1.5rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 2001;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 50px;
  cursor: pointer;
  padding: 0 20px;
  user-select: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2001;
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

/* Counter for modal */
.modal-counter {
  position: absolute;
  bottom: 20px;
  right: 30px;
  color: #fff;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
}

/* ========== GRADIENT TEXT ANIMATIONS ========== */

.gradient-text {
  background: linear-gradient(135deg, #e4001b, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ========== MICRO-INTERACTIONS ========== */

/* Link hover effects */
a:not(.btn) {
  position: relative;
  transition: color 0.3s ease;
}

/* Underline animation on hover */
.nav-link {
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ========== GLASSMORPHISM CARDS ========== */

.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== LOADING SPINNER ========== */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========== SPLASH OVERLAY ANIMATIONS ========== */

@keyframes splashScaleIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes splashScaleOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.splash-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a1e 0%, #2a1010 100%);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: splashScaleIn 0.4s cubic-bezier(0.34, 0.1, 0.68, 1) forwards;
  pointer-events: none;
}

.splash-overlay.closing {
  animation: splashScaleOut 0.4s cubic-bezier(0.34, 0.1, 0.68, 1) forwards;
}

.splash-content {
  text-align: center;
  color: #fff;
  max-width: 700px;
  padding: 2rem;
}

.splash-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(228, 0, 27, 0.12);
  border: 1px solid rgba(228, 0, 27, 0.22);
  color: #ff8080;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.splash-title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.7s ease-out 0.4s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.splash-desc {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.65);
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
  opacity: 0;
}

/* ========== HERO SECTION ANIMATIONS ========== */

/* Hero title - normal display after splash */
.hero-title {
  opacity: 1;
  transform: scale(1);
}

/* Hero eyebrow fade in */
.hero-eyebrow {
  animation: fadeInDown 0.8s ease-out forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero subtitle - normal display */
.hero-sub {
  opacity: 1;
}

/* Hero actions - normal display */
.hero-actions {
  opacity: 1;
  transform: none;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero stats - normal display */
.hero-stats {
  opacity: 1;
  transform: none;
}

/* ========== LIVE INDICATORS ========== */

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
  margin-right: 6px;
}

/* ========== SKELETON LOADING ========== */

@keyframes skeleton-loading {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 1000px 100%;
  animation: skeleton-loading 2s infinite;
}

/* ========== PAGE TRANSITION ========== */

@keyframes pageEnter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: pageEnter 0.5s ease-out;
}

/* ========== FORM INTERACTIONS ========== */

.form-control {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(228, 0, 27, 0.15);
}

/* ========== SUCCESS/ERROR ANIMATIONS ========== */

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.alert {
  animation: slideIn 0.3s ease-out;
}

.alert.dismissing {
  animation: slideOut 0.3s ease-out;
}

/* ========== PRINT OPTIMIZATION ========== */

@media print {
  .navbar, .footer, .wa-float, .preloader {
    display: none !important;
  }

  body {
    animation: none;
  }
}
