/* TailwindCSS CDN loaded in HTML */
/* Custom styles for Çağatay Oto */

:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a8a;
    --secondary: #f59e0b;
    --secondary-light: #fbbf24;
    --dark: #111827;
    --light: #f8fafc;
    --gray: #64748b;

    /* Theme Variables (Light Default) */
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(0, 0, 0, 0.1);
    --text-primary: #111827;
    /* gray-900 */
    --text-secondary: #374151;
    /* gray-800 - stronger for descriptions */
    --text-muted: #4b5563;
    /* gray-700 - for lists/small text */
}

html.dark {
    /* Theme Variables (Dark) */
    --card-bg: rgba(17, 24, 39, 0.8);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    /* gray-300 */
    --text-muted: #9ca3af;
    /* gray-400 */
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* i18n Flash of Content (FOC) Prevention */
.i18n-loading body {
    opacity: 0 !important;
}

body {
    transition: opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease !important;
}

/* Global Text Color Override for Light Mode */
html:not(.dark) body {
    color: var(--text-primary) !important;
}

/* Custom gradient background */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1e40af 100%);
}

.gradient-overlay {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.7) 0%, rgba(17, 24, 39, 0.9) 100%);
}

/* Glassmorphism 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);
}

.glass-dark {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Button animations */
.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
}

.btn-outline {
    border: 2px solid var(--secondary);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--secondary);
    color: var(--dark);
}

/* Navigation styles */
.nav-link {
    position: relative;
    color: #d1d5db;
    /* gray-300 default for transparent header over dark hero */
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--secondary);
    padding-left: 1.5rem;
}

/* Mobile menu animation */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
    background: var(--card-bg);
    /* Adaptive background */
    backdrop-filter: blur(10px);
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Header scroll effect */
.header-scrolled {
    background: rgba(17, 24, 39, 0.95);
    /* Always dark background */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Ensure Logo, Lang, Theme buttons are ALWAYS white */
#header .text-xl.font-bold,
#header .lang-btn,
#header .theme-toggle-btn,
#header .mobile-link,
#header .nav-link,
#header .text-white\/20,
.header-scrolled .text-xl.font-bold,
.header-scrolled .lang-btn,
.header-scrolled .theme-toggle-btn,
.header-scrolled .nav-link,
.header-scrolled .text-white\/20 {
    color: #ffffff !important;
}

#header .nav-link:hover,
#header .lang-btn:hover,
#header .theme-toggle-btn:hover,
.header-scrolled .nav-link:hover,
.header-scrolled .lang-btn:hover,
.header-scrolled .theme-toggle-btn:hover {
    color: var(--secondary) !important;
}

/* Force separators to allow white/20 */
#header .text-white\/20 {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* Accordion styles */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Service card icon */
.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.service-card-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

/* Image overlays */
.bg-image-overlay {
    background-size: cover;
    background-position: center;
    position: relative;
}

.bg-image-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(17, 24, 39, 0.95) 0%, rgba(17, 24, 39, 0.7) 100%);
    z-index: 1;
}

.bg-image-overlay>* {
    position: relative;
    z-index: 2;
}

/* Form styles */
.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    /* Default for dark mode */
    transition: all 0.3s ease;
}

/* Adaptive Form Inputs for Light Mode */
html:not(.dark) .form-input {
    background: #f9fafb;
    /* gray-50 */
    border: 1px solid #d1d5db;
    /* gray-300 */
    color: #111827;
    /* gray-900 */
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

html:not(.dark) .form-input:focus {
    background: #ffffff;
}

/* Testimonial card */
.testimonial-card {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.5) 0%, rgba(45, 90, 138, 0.3) 100%);
}

/* Pulse animation */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
    }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Hero text animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.8s ease forwards;
}

/* Star rating */
.star {
    color: var(--secondary);
}

/* Map container */
.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Footer links */
.footer-link {
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-link:hover {
    color: var(--secondary);
    padding-left: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}