/* ===================================
   Count Shipping - Enhanced Styles
   MirShipping benzeri modern tasarım
   =================================== */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Primary Color Variables */
:root {
    --color-primary-50: #f0f9ff;
    --color-primary-100: #e0f2fe;
    --color-primary-200: #bae6fd;
    --color-primary-300: #7dd3fc;
    --color-primary-400: #38bdf8;
    --color-primary-500: #0ea5e9;
    --color-primary-600: #023859;
    --color-primary-700: #01293f;
    --color-primary-800: #011d2d;
    --color-primary-900: #00111a;
    --color-secondary: #f97316;
}

/* ===================================
   Button Styles
   =================================== */
.btn-primary {
    background-color: #023859;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-color: #01293f;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(2, 56, 89, 0.3);
}

.btn-secondary {
    background-color: #f97316;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

/* ===================================
   Form Styles
   =================================== */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #023859;
    box-shadow: 0 0 0 4px rgba(2, 56, 89, 0.1);
    outline: none;
    transform: translateY(-1px);
}

/* ===================================
   Card Styles
   =================================== */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #023859, #f97316);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.service-card:hover .card-image img {
    transform: scale(1.1);
}

.card-image {
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 4 / 3) {
    .card-image {
        padding-bottom: 75%; /* 3/4 = 75% */
        height: 0;
    }
    .card-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

.card-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   Navigation Styles
   =================================== */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #023859, #f97316);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ===================================
   WhatsApp Button
   =================================== */
.whatsapp-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 40;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse-green 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn svg {
    width: 32px;
    height: 32px;
    color: white;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8); }
}

/* ===================================
   Sticky Header
   =================================== */
.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-hidden {
    transform: translateY(-100%);
}

/* ===================================
   Hero Section
   =================================== */
.hero-gradient {
    background: linear-gradient(135deg, #023859 0%, #01293f 50%, #00111a 100%);
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(2, 56, 89, 0.95) 0%, rgba(2, 56, 89, 0.8) 40%, rgba(2, 56, 89, 0.4) 70%, transparent 100%);
}

/* Hero Slide Animations */
.hero-slide {
    will-change: opacity;
}

.hero-content.active .slide-animate {
    animation: slideUp 0.8s ease forwards;
}

.slide-delay-1 { animation-delay: 0.2s !important; }
.slide-delay-2 { animation-delay: 0.4s !important; }
.slide-delay-3 { animation-delay: 0.6s !important; }

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

/* Slider Dots */
.slider-dot {
    transition: all 0.3s ease;
}

.slider-dot.active {
    animation: dotPulse 1.5s infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

/* ===================================
   Stats Section
   =================================== */
.stats-number {
    font-variant-numeric: tabular-nums;
}

.stats-card {
    will-change: transform;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Scroll Animations */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate][data-delay="100"] { transition-delay: 0.1s; }
[data-animate][data-delay="150"] { transition-delay: 0.15s; }
[data-animate][data-delay="200"] { transition-delay: 0.2s; }
[data-animate][data-delay="250"] { transition-delay: 0.25s; }
[data-animate][data-delay="300"] { transition-delay: 0.3s; }
[data-animate][data-delay="350"] { transition-delay: 0.35s; }
[data-animate][data-delay="400"] { transition-delay: 0.4s; }
[data-animate][data-delay="450"] { transition-delay: 0.45s; }
[data-animate][data-delay="500"] { transition-delay: 0.5s; }
[data-animate][data-delay="600"] { transition-delay: 0.6s; }

/* ===================================
   Feature Box
   =================================== */
.feature-box {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #023859, #f97316);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.feature-box:hover::before {
    transform: translateY(0);
}

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

.feature-box:hover .feature-icon {
    background-color: #023859;
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.feature-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   Footer
   =================================== */
.footer-link {
    transition: all 0.3s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: white;
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-link:hover {
    color: white;
    padding-left: 8px;
}

/* Social Icons */
.social-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon:hover {
    background-color: white;
    color: #023859;
    transform: translateY(-4px) rotate(5deg);
}

/* ===================================
   Parallax Effects
   =================================== */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@supports (-webkit-touch-callout: none) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* ===================================
   Text Utilities
   =================================== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-gradient {
    background: linear-gradient(135deg, #023859, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   Scrollbar
   =================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #023859, #01293f);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #01293f, #00111a);
}

/* ===================================
   Loading Spinner
   =================================== */
.spinner {
    border: 3px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   Toast Notification
   =================================== */
.toast {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* ===================================
   Partner Logos Carousel
   =================================== */
.logo-carousel {
    display: flex;
    animation: scroll 30s linear infinite;
}

.logo-carousel:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Mobilde carousel daha yavaş aksın */
@media (max-width: 768px) {
    .logo-carousel {
        animation: scroll 50s linear infinite;
    }
}

/* ===================================
   Quote Form Styling
   =================================== */
.quote-card {
    transition: box-shadow 0.2s ease;
}

.quote-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.quote-select {
    width: 100%;
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    transition: all 0.2s;
    cursor: pointer;
}

.quote-select:hover {
    border-color: #d1d5db;
}

.quote-select:focus {
    outline: none;
    border-color: #023859;
    box-shadow: 0 0 0 3px rgba(2, 56, 89, 0.1);
}

.quote-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background-color: white;
    transition: all 0.2s;
}

.quote-input:hover {
    border-color: #d1d5db;
}

.quote-input:focus {
    outline: none;
    border-color: #023859;
    box-shadow: 0 0 0 3px rgba(2, 56, 89, 0.1);
}

.quote-input::placeholder {
    color: #9ca3af;
}

.quote-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #f97316;
    color: white;
    font-weight: 600;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s;
    margin-top: 1rem;
}

.quote-btn:hover {
    background-color: #ea580c;
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 768px) {
    .hero-overlay {
        background: linear-gradient(180deg, rgba(2, 56, 89, 0.95) 0%, rgba(2, 56, 89, 0.85) 100%);
    }

    .slider-arrow {
        display: none;
    }

    .whatsapp-btn {
        width: 54px;
        height: 54px;
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-btn svg {
        width: 28px;
        height: 28px;
    }
}

/* ===================================
   Hover Effects for Cards
   =================================== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(2, 56, 89, 0.3);
}

/* ===================================
   Selection Style
   =================================== */
::selection {
    background-color: #023859;
    color: white;
}

::-moz-selection {
    background-color: #023859;
    color: white;
}

/* ===================================
   Quote Modal
   =================================== */
#quote-modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#quote-modal.active {
    opacity: 1;
    visibility: visible;
}

#quote-modal .quote-modal-backdrop {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#quote-modal.active .quote-modal-backdrop {
    opacity: 1;
}

#quote-modal .quote-modal-content {
    transform: translateY(-50%) scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#quote-modal.active .quote-modal-content {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* ===================================
   Mobile Slide-in Menu
   =================================== */

/* Overlay - Başlangıçta gizli */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* Panel - Başlangıçta gizli */
.mobile-menu-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    overflow-y: auto;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
}

/* Hide on desktop */
@media (min-width: 1024px) {
    .mobile-menu-overlay,
    .mobile-menu-panel {
        display: none !important;
    }
}

/* ===================================
   Mobile Fixes - Prevent Horizontal Scroll
   =================================== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-overflow-scrolling: touch;
}

* {
    box-sizing: border-box;
}

.max-w-7xl {
    width: 100%;
}

/* iOS Safari fixes */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-text-size-adjust: 100%;
    }

    /* Fix for iOS viewport height issues */
    .min-h-screen {
        min-height: -webkit-fill-available;
    }

    /* Fix backdrop-filter for older iOS */
    .backdrop-blur-sm {
        -webkit-backdrop-filter: blur(4px);
    }
}

@media (max-width: 640px) {
    /* Fix text overflow on small screens */
    h1, h2, h3 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Gallery grid fix for mobile */
    .gallery-item {
        min-height: 150px;
    }

    /* Fix padding on mobile */
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Ensure buttons don't overflow */
    .btn-primary,
    .btn-secondary {
        white-space: nowrap;
        max-width: 100%;
    }

    /* Fix lightbox on mobile */
    #lightbox img {
        max-height: 80vh;
        width: auto;
    }

    /* Fix service cards on mobile */
    .service-card {
        margin-bottom: 1rem;
    }
}
