/**
 * iOS Servis Denizli - Premium Apple-Style CSS
 * Modern Renk Şeması: Space Gray, Silver, White
 * iosservisdenizli.com
 */

/* ═══════════════════════════════════════════════════════════════
   RENK PALETİ - APPLE INSPIRED
   ═══════════════════════════════════════════════════════════════ */
:root {
    /* Apple Colors */
    --apple-space-gray: #1d1d1f;
    --apple-dark-gray: #424245;
    --apple-gray: #86868b;
    --apple-light-gray: #f5f5f7;
    --apple-white: #ffffff;
    --apple-blue: #0071e3;
    --apple-green: #30d158;
    --apple-orange: #ff9500;
    --apple-red: #ff3b30;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.20);
}

/* ═══════════════════════════════════════════════════════════════
   GENEL AYARLAR
   ═══════════════════════════════════════════════════════════════ */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Selection Color - Apple Blue */
::selection {
    background-color: var(--apple-blue);
    color: var(--apple-white);
}

/* Scrollbar Styles - Apple Style */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--apple-gray);
    border-radius: 6px;
    border: 2px solid var(--apple-light-gray);
}

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

/* ═══════════════════════════════════════════════════════════════
   RENK ÖZELLEŞTİRMELERİ - PROPER CONTRAST
   ═══════════════════════════════════════════════════════════════ */

/* Primary Colors - Space Gray */
.text-primary {
    color: var(--apple-space-gray) !important;
}

.hover\:text-primary:hover {
    color: var(--apple-blue) !important;
}

.bg-primary {
    background-color: var(--apple-space-gray) !important;
    color: var(--apple-white) !important;
}

.border-primary {
    border-color: var(--apple-space-gray) !important;
}

.hover\:bg-primary:hover {
    background-color: var(--apple-dark-gray) !important;
    color: var(--apple-white) !important;
}

/* Text Colors - Proper Contrast */
.text-dark {
    color: var(--apple-space-gray) !important;
}

.text-gray-900 {
    color: var(--apple-space-gray) !important;
}

.text-gray-800 {
    color: var(--apple-dark-gray) !important;
}

.text-gray-600 {
    color: var(--apple-gray) !important;
}

.text-gray-500 {
    color: #a1a1a6 !important;
}

.text-gray-400 {
    color: #c7c7cc !important;
}

.text-gray-300 {
    color: #d1d1d6 !important;
}

/* Background Colors */
.bg-dark,
.bg-black,
.bg-gray-900,
.bg-\[#0a0a0a\] {
    background-color: var(--apple-space-gray) !important;
    color: var(--apple-white) !important;
}

.bg-gray-800 {
    background-color: #2c2c2e !important;
    color: var(--apple-white) !important;
}

.bg-gray-50 {
    background-color: var(--apple-light-gray) !important;
}

/* White text on dark backgrounds */
.bg-dark *,
.bg-black *,
.bg-gray-900 *,
.bg-\[#0a0a0a\] * {
    color: inherit;
}

.bg-dark .text-black,
.bg-black .text-black,
.bg-gray-900 .text-black,
.bg-\[#0a0a0a\] .text-black {
    color: var(--apple-white) !important;
}

/* Ensure proper contrast for icons on dark backgrounds */
.bg-dark svg,
.bg-black svg,
.bg-gray-900 svg,
.bg-\[#0a0a0a\] svg {
    color: var(--apple-white);
}

/* ═══════════════════════════════════════════════════════════════
   ANİMASYONLAR - HARIKA & SMOOTH
   ═══════════════════════════════════════════════════════════════ */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Smooth Scale Animation */
@keyframes smoothScale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-smooth-scale {
    animation: smoothScale 3s ease-in-out infinite;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.8s ease-out forwards;
}

/* Bounce Slow */
@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0) rotate(6deg);
    }
    50% {
        transform: translateY(-8px) rotate(6deg);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 2.5s ease-in-out infinite;
}

/* Gradient Animation - Siyah/Gri */
@keyframes gradient {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.animate-gradient {
    background-size: 200% auto;
    animation: gradient 3s linear infinite;
}

/* Mesh Animations */
@keyframes mesh-1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.12;
    }
    25% {
        transform: translate(30px, -20px) scale(1.1);
        opacity: 0.15;
    }
    50% {
        transform: translate(-20px, 30px) scale(0.95);
        opacity: 0.1;
    }
    75% {
        transform: translate(20px, 20px) scale(1.05);
        opacity: 0.13;
    }
}

@keyframes mesh-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.08;
    }
    33% {
        transform: translate(-40px, 20px) scale(1.15);
        opacity: 0.1;
    }
    66% {
        transform: translate(30px, -30px) scale(0.9);
        opacity: 0.06;
    }
}

@keyframes mesh-3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate(40px, -40px) scale(1.2);
        opacity: 0.12;
    }
}

.animate-mesh-1 {
    animation: mesh-1 20s ease-in-out infinite;
}

.animate-mesh-2 {
    animation: mesh-2 25s ease-in-out infinite;
}

.animate-mesh-3 {
    animation: mesh-3 18s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════
   BUTON STİLLERİ - APPLE STYLE
   ═══════════════════════════════════════════════════════════════ */

/* Primary Buttons - Space Gray */
.bg-black,
.bg-dark,
.bg-gray-900,
.bg-\[#0a0a0a\] {
    background-color: var(--apple-space-gray) !important;
    color: var(--apple-white) !important;
}

.bg-black:hover,
.bg-dark:hover,
.bg-gray-900:hover {
    background-color: var(--apple-dark-gray) !important;
    color: var(--apple-white) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* White Buttons */
.bg-white {
    background-color: var(--apple-white) !important;
    color: var(--apple-space-gray) !important;
}

.bg-white:hover {
    background-color: var(--apple-light-gray) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Blue Accent Buttons */
.btn-blue {
    background-color: var(--apple-blue) !important;
    color: var(--apple-white) !important;
}

.btn-blue:hover {
    background-color: #0077ED !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.3);
}

/* Button Shine Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

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

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

/* Apple-style Button */
.apple-button {
    background: var(--apple-blue);
    color: white;
    border-radius: 980px;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.022em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-button:hover {
    background: #0077ED;
    transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER & NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   KOYU TEMA İYİLEŞTİRMELERİ
   ═══════════════════════════════════════════════════════════════ */

/* Dark Section Text Improvements */
.bg-\[#0a0a0a\] h3,
.bg-\[#0a0a0a\] p,
.bg-\[#0a0a0a\] span {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Better contrast for white text on dark backgrounds */
.text-white {
    color: #ffffff !important;
}

.text-gray-300 {
    color: #e5e7eb !important;
}

.text-gray-400 {
    color: #d1d5db !important;
}

/* ═══════════════════════════════════════════════════════════════
   CARD & HOVER EFFECTS
   ═══════════════════════════════════════════════════════════════ */

.card-hover {
    transition: all 0.3s ease;
}

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

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   MOBİL OPTİMİZASYON
   ═══════════════════════════════════════════════════════════════ */

/* Mobile Menu Animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobileMenu.active {
    max-height: 100vh;
}

/* Mobile Dropdown Animation */
.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-dropdown-content.active {
    max-height: 500px;
}

/* Mobile Touch Optimization */
@media (max-width: 768px) {
    /* Daha büyük dokunma alanları */
    button, a, .apple-btn, .apple-button, .btn-blue, .contact-btn {
        min-height: 48px !important;
        min-width: 48px !important;
    }

    /* Mobilde butonlar daha kolay tıklanabilir */
    .apple-btn {
        padding: 14px 20px !important;
        font-size: 15px !important;
    }

    /* Mobilde daha iyi animasyonlar */
    .hover\:-translate-y-1:hover,
    .hover\:-translate-y-2:hover {
        transform: translateY(-4px) !important;
    }

    /* Mobilde gölgeler daha hafif */
    .shadow-xl {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    }

    /* Prevent text overflow in cards */
    .service-panel,
    .why-card,
    .process-card,
    .plus-card,
    .review-card,
    .contact-panel {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }

    /* Ensure cards don't overflow viewport */
    .review-card,
    .service-card,
    .iphone-series-card {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Prevent horizontal scroll from animations */
    * {
        max-width: 100vw !important;
    }

    /* Improve card text readability on mobile */
    .service-panel h3,
    .why-card h3,
    .process-card h3,
    .plus-card h3 {
        font-size: clamp(1rem, 4vw, 1.3rem) !important;
        line-height: 1.2 !important;
    }

    /* Mobile card padding */
    .service-panel,
    .why-card,
    .process-card {
        padding: 16px !important;
        border-radius: 20px !important;
    }

    /* Prevent floating elements from causing horizontal scroll */
    .hero-image-wrap img,
    .service-visual-float,
    .floating-badge {
        max-width: 100% !important;
    }
}

@media (max-width: 640px) {
    /* Küçük ekranlarda yazı boyutları */
    h1 {
        font-size: clamp(1.8rem, 8vw, 2rem) !important;
        letter-spacing: -0.03em !important;
    }

    h2 {
        font-size: clamp(1.5rem, 6vw, 1.75rem) !important;
        letter-spacing: -0.02em !important;
    }

    h3 {
        font-size: clamp(1.2rem, 5vw, 1.4rem) !important;
    }

    p {
        font-size: clamp(0.9rem, 3vw, 1rem) !important;
        line-height: 1.6 !important;
    }

    /* Mobilde padding'ler */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Mobilde daha büyük dokunma alanları */
    button, a, .apple-btn {
        min-height: 48px !important;
        min-width: 48px !important;
    }

    /* Kart ve panel metin taşmasını önle */
    .review-card p,
    .why-card p,
    .process-card p,
    .plus-card p,
    .service-panel p {
        overflow-wrap: break-word;
        word-wrap: break-word;
        -webkit-word-wrap: break-word;
        hyphens: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION SYSTEM
   ═══════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 320px;
    max-width: 420px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #000000;
}

.toast.success::before {
    background: linear-gradient(180deg, #10B981 0%, #059669 100%);
}

.toast.error::before {
    background: linear-gradient(180deg, #EF4444 0%, #DC2626 100%);
}

.toast.warning::before {
    background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
}

.toast.info::before {
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
}

/* Toast Animations */
@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.toast.slide-out {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Mobile Toast */
@media (max-width: 640px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PERFORMANS OPTİMİZASYONU
   ═══════════════════════════════════════════════════════════════ */

/* GPU Acceleration */
.transform,
.transition-transform,
.animate-float,
.animate-bounce,
.animate-pulse {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.page-iphone-repair .bg-premium-dark {
    background: radial-gradient(1200px 700px at 20% 0%, rgba(0, 113, 227, 0.18), transparent 60%),
        radial-gradient(900px 600px at 80% 10%, rgba(191, 90, 242, 0.16), transparent 58%),
        radial-gradient(900px 600px at 60% 110%, rgba(255, 149, 0, 0.10), transparent 55%),
        linear-gradient(180deg, #0a0a0c 0%, #0a0a0a 100%) !important;
}

.page-iphone-repair .model-card {
    background: rgba(22, 22, 24, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 28px !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55) !important;
    transform: translateZ(0);
}

.page-iphone-repair .model-card::before {
    opacity: 1 !important;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 113, 227, 0.16) 0%, transparent 70%) !important;
}

.page-iphone-repair .model-card:hover {
    transform: translateY(-12px) scale(1.035) translateZ(0) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.10) !important;
}

.page-iphone-repair .model-card .bottom-line {
    height: 3px !important;
    opacity: 1 !important;
    background: linear-gradient(90deg, transparent, rgba(0, 113, 227, 0.95), transparent) !important;
}

.page-iphone-repair .service-card {
    border-radius: 28px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06) !important;
}

.page-iphone-repair .service-card:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(0, 113, 227, 0.45) !important;
    box-shadow: 0 22px 55px rgba(0, 113, 227, 0.14) !important;
}

.page-iphone-repair .service-card.selected {
    border-color: rgba(0, 113, 227, 0.9) !important;
    box-shadow: 0 24px 60px rgba(0, 113, 227, 0.18) !important;
}

.page-iphone-repair .text-gradient-gold {
    background: linear-gradient(135deg, #73BDED 0%, #0071E3 55%, #BF5AF2 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.page-iphone-repair .floating-summary-mobile {
    z-index: 1000 !important;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.2) !important;
}

@media (max-width: 768px) {
    html {
        scroll-behavior: auto;
    }

    .glass,
    .page-iphone-repair .floating-summary-mobile,
    [class*="backdrop-blur"],
    [style*="backdrop-filter"],
    [style*="-webkit-backdrop-filter"] {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    [style*="filter: blur"],
    [style*="filter:blur"] {
        filter: none !important;
        opacity: 0.18 !important;
    }

    .card-hover:hover,
    .bg-black:hover,
    .bg-dark:hover,
    .bg-gray-900:hover,
    .bg-white:hover,
    .btn-blue:hover,
    .apple-button:hover {
        transform: none !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .shadow-xl,
    .shadow-2xl {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
    }

    .page-iphone-repair .model-card:hover,
    .page-iphone-repair .service-card:hover,
    .page-iphone-repair .service-card.selected {
        transform: none !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16) !important;
    }

    .angled-card,
    .angled-card-right {
        transform: none !important;
    }

    .why-shell,
    .why-hero,
    .why-card,
    .why-note,
    .why-metric,
    .why-marquee {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}
