/*
 * ═══════════════════════════════════════════════════════════════
 * Coşkun Elektromekanik — Custom Styles
 * Tailwind CSS ile birlikte çalışan ek stiller
 * ═══════════════════════════════════════════════════════════════
 */

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

body {
    overflow-x: hidden;
}

/* ─── Custom Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #061B35;
}
::-webkit-scrollbar-thumb {
    background: #E30613;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #cc0510;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #E30613 #061B35;
}

/* ─── Selection ─────────────────────────────────────────────── */
::selection {
    background: rgba(227, 6, 19, 0.3);
    color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS — Keyframes
   ═══════════════════════════════════════════════════════════════ */

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    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 scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%      { transform: translateY(-15px) rotate(2deg); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(227, 6, 19, 0.4); }
    50%      { box-shadow: 0 0 25px 8px rgba(227, 6, 19, 0); }
}

@keyframes shimmer {
    0%   { background-position: -1000px 0; }
    100% { background-position:  1000px 0; }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes lineGrow {
    from { width: 0; }
    to   { width: 100%; }
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATION CLASSES
   ═══════════════════════════════════════════════════════════════ */

.animate-fade-in-up    { animation: fadeInUp    0.8s ease-out forwards; }
.animate-fade-in-down  { animation: fadeInDown  0.8s ease-out forwards; }
.animate-fade-in-left  { animation: fadeInLeft  0.8s ease-out forwards; }
.animate-fade-in-right { animation: fadeInRight 0.8s ease-out forwards; }
.animate-scale-in      { animation: scaleIn    0.6s ease-out forwards; }
.animate-slide-down    { animation: slideDown  0.5s ease-out forwards; }
.animate-float         { animation: float      4s ease-in-out infinite; }
.animate-pulse-glow    { animation: pulseGlow  2s ease-in-out infinite; }
.animate-rotate-slow   { animation: rotateSlow 20s linear infinite; }

/* Delay Utilities */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Scroll-triggered animation base */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-on-scroll.visible:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll.visible:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll.visible:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll.visible:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll.visible:nth-child(5) { transition-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════════════
   GLASSMORPHISM
   ═══════════════════════════════════════════════════════════════ */

.glass {
    background: rgba(0, 42, 77, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-dark {
    background: rgba(6, 27, 53, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */

.navbar {
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.navbar.scrolled {
    background: rgba(6, 27, 53, 0.97) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3),
                0 1px 0 rgba(227, 6, 19, 0.1);
}

/* Hamburger Animation */
.hamburger span {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.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.6s ease;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(227, 6, 19, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   SERVICE CARDS
   ═══════════════════════════════════════════════════════════════ */

.service-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #E30613, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35),
                0 0 40px rgba(227, 6, 19, 0.08);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card .card-icon {
    transition: all 0.4s ease;
}

.service-card:hover .card-icon {
    transform: scale(1.1) rotate(-5deg);
    background: rgba(227, 6, 19, 0.15);
    border-color: rgba(227, 6, 19, 0.4);
}

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

.service-card:hover .card-arrow {
    transform: translateX(5px);
    color: #E30613;
}

/* ═══════════════════════════════════════════════════════════════
   FEATURE ICONS
   ═══════════════════════════════════════════════════════════════ */

.feature-icon {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feature-icon:hover {
    transform: scale(1.1) translateY(-3px);
    background: rgba(227, 6, 19, 0.12) !important;
    border-color: rgba(227, 6, 19, 0.3) !important;
    box-shadow: 0 8px 25px rgba(227, 6, 19, 0.15);
}

/* ═══════════════════════════════════════════════════════════════
   PROCESS TIMELINE
   ═══════════════════════════════════════════════════════════════ */

.process-step {
    position: relative;
}

.process-connector {
    position: absolute;
    top: 32px;
    left: calc(50% + 32px);
    width: calc(100% - 64px);
    height: 2px;
    background: linear-gradient(90deg, #E30613, rgba(227, 6, 19, 0.15));
}

.process-number {
    transition: all 0.3s ease;
}

.process-step:hover .process-number {
    background: #E30613;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(227, 6, 19, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   GRADIENT TEXT
   ═══════════════════════════════════════════════════════════════ */

.gradient-text {
    background: linear-gradient(135deg, #E30613 0%, #ff4d4d 50%, #E30613 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-blue {
    background: linear-gradient(135deg, #002A4D, #0066cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */

.hero-gradient {
    background: linear-gradient(135deg,
        rgba(6, 27, 53, 0.97) 0%,
        rgba(0, 42, 77, 0.9) 40%,
        rgba(6, 27, 53, 0.8) 100%
    );
}

.hero-pattern {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(227, 6, 19, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 42, 77, 0.1) 0%, transparent 50%);
}

/* ═══════════════════════════════════════════════════════════════
   MAP CONTAINER
   ═══════════════════════════════════════════════════════════════ */

.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.map-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(227, 6, 19, 0.2);
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
    transition: border-color 0.3s ease;
}

.map-container:hover::after {
    border-color: rgba(227, 6, 19, 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.footer-gradient {
    background: linear-gradient(180deg, #061B35 0%, #030d1c 100%);
}

/* ═══════════════════════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════════════════════ */

.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #E30613 !important;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.15),
                0 0 20px rgba(227, 6, 19, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   SHIMMER / LOADING
   ═══════════════════════════════════════════════════════════════ */

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2.5s infinite linear;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION DIVIDERS
   ═══════════════════════════════════════════════════════════════ */

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(227, 6, 19, 0.3), transparent);
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════════ */

.admin-sidebar {
    transition: width 0.3s ease;
}

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

.admin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
    }

    .process-connector {
        display: none;
    }

    .section-title {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   COUNTER NUMBER
   ═══════════════════════════════════════════════════════════════ */

.counter-number {
    font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════
   TOOLTIP
   ═══════════════════════════════════════════════════════════════ */

.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: #1F2329;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
