/* ===================================
   DARK MODE IMPLEMENTATION - 2025
   Automatic + Manual Theme Switching
   =================================== */

/* CSS Variables for Light Theme (Default) */
:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --primary: #FF6B35;
    --primary-hover: #E85A2A;
    --secondary: #004E89;
    --secondary-hover: #003A6B;
    --accent: #FCBF49;
    
    --card-bg: #FFFFFF;
    --input-bg: #FFFFFF;
    --navbar-bg: #FFFFFF;
    --footer-bg: #1F2937;
    
    --transition-speed: 0.3s;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1F2937;
    --bg-tertiary: #374151;
    
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-tertiary: #9CA3AF;
    
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    
    --primary: #FF8856;
    --primary-hover: #FF9970;
    --secondary: #0066B2;
    --secondary-hover: #0077CC;
    --accent: #FFB84D;
    
    --card-bg: #1F2937;
    --input-bg: #374151;
    --navbar-bg: #1F2937;
    --footer-bg: #0F172A;
}

/* Apply Theme Colors */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease;
}

/* Theme Switcher Button */
.theme-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 4px;
    transition: all var(--transition-speed) ease;
}

.theme-switcher:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.theme-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--bg-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    position: relative;
}

.theme-option:hover {
    transform: scale(1.1);
}

.theme-option.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.theme-option i {
    pointer-events: none;
}

/* Light Mode Icon */
.theme-light {
    color: #F59E0B;
}

.theme-light.active {
    animation: rotate 0.5s ease;
}

/* Dark Mode Icon */
.theme-dark {
    color: #6366F1;
}

.theme-dark.active {
    animation: rotate 0.5s ease;
}

/* Auto Mode Icon */
.theme-auto {
    color: #10B981;
}

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

/* Cards */
.corporate-card,
.card {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
    transition: all var(--transition-speed) ease;
}

/* Navbar */
.navbar {
    background: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.navbar .nav-link {
    color: var(--text-primary) !important;
    transition: color var(--transition-speed) ease;
}

.navbar .nav-link:hover {
    color: var(--primary) !important;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--text-secondary);
}

/* Forms */
.form-control,
.form-select {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition-speed) ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 136, 86, 0.25);
}

/* Tables */
.table {
    color: var(--text-primary);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--bg-secondary);
}

.table-hover > tbody > tr:hover {
    background-color: var(--bg-tertiary);
}

/* Modals */
.modal-content {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.modal-header {
    border-bottom-color: var(--border-color);
}

.modal-footer {
    border-top-color: var(--border-color);
}

/* Buttons */
.btn-light {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-light:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Dropdowns */
.dropdown-menu {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
}

/* Alerts */
.alert {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Badges */
.badge {
    transition: all var(--transition-speed) ease;
}

/* Project Cards */
.corporate-project-card {
    background: var(--card-bg);
    transition: all var(--transition-speed) ease;
}

/* Service Cards */
.corporate-card-icon {
    background: var(--bg-secondary);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .corporate-card-icon {
    background: var(--bg-tertiary);
}

/* Stats */
.corporate-stat-item {
    background: var(--card-bg);
    border-color: var(--border-color);
    transition: all var(--transition-speed) ease;
}

/* Testimonials */
[data-theme="dark"] .testimonial-card {
    background: var(--card-bg);
}

/* Images - Add slight overlay in dark mode */
[data-theme="dark"] img:not(.logo):not([class*="icon"]) {
    opacity: 0.9;
}

[data-theme="dark"] img:not(.logo):not([class*="icon"]):hover {
    opacity: 1;
}

/* Code Blocks */
pre,
code {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* Horizontal Rules */
hr {
    border-top-color: var(--border-color);
}

/* Shadows for Cards in Dark Mode */
[data-theme="dark"] .corporate-card:hover,
[data-theme="dark"] .card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

/* Text Colors */
.text-muted {
    color: var(--text-secondary) !important;
}

/* Border Colors */
.border,
.border-top,
.border-bottom,
.border-left,
.border-right {
    border-color: var(--border-color) !important;
}

/* Background Colors */
.bg-light {
    background-color: var(--bg-secondary) !important;
}

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

/* Corporate Section */
.corporate-section {
    background-color: var(--bg-primary);
    transition: background-color var(--transition-speed) ease;
}

.corporate-section-light {
    background-color: var(--bg-secondary);
}

/* Hero Section Dark Mode Adjustments */
[data-theme="dark"] .hero-video-section .video-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 78, 137, 0.9) 0%,
        rgba(255, 107, 53, 0.8) 100%
    );
}

/* =============================================
   CTA SECTION - LIGHT & DARK MODE (TUM SAYFALAR)
   ============================================= */

/* Light Mode - CTA */
.cta-section-premium {
    background: #f0f4f8 !important;
    color: #1e293b;
}

.cta-section-premium .cta-overlay {
    background: none !important;
}

.cta-section-premium .cta-content h2 {
    color: #1e293b !important;
}

.cta-section-premium .cta-content p {
    color: #64748b !important;
}

.cta-section-premium .btn-premium-cta {
    background: #0066CC !important;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(0,102,204,0.3) !important;
}

.cta-section-premium .btn-premium-cta:hover {
    background: #004C99 !important;
    box-shadow: 0 10px 30px rgba(0,102,204,0.4) !important;
    color: #fff !important;
}

/* Dark Mode - CTA (her iki dark mode selector'u de destekle) */
body.dark-mode .cta-section-premium,
[data-theme="dark"] .cta-section-premium {
    background: #1F2937 !important;
}

body.dark-mode .cta-section-premium .cta-overlay,
[data-theme="dark"] .cta-section-premium .cta-overlay {
    background: radial-gradient(circle at center, rgba(0,102,204,0.1) 0%, transparent 70%) !important;
}

body.dark-mode .cta-section-premium .cta-content h2,
[data-theme="dark"] .cta-section-premium .cta-content h2 {
    color: #fff !important;
}

body.dark-mode .cta-section-premium .cta-content p,
[data-theme="dark"] .cta-section-premium .cta-content p {
    color: rgba(255,255,255,0.6) !important;
}

body.dark-mode .cta-section-premium .btn-premium-cta,
[data-theme="dark"] .cta-section-premium .btn-premium-cta {
    background: #0066CC !important;
    box-shadow: 0 0 30px rgba(0,102,204,0.5) !important;
}

body.dark-mode .cta-section-premium .btn-premium-cta:hover,
[data-theme="dark"] .cta-section-premium .btn-premium-cta:hover {
    background: #fff !important;
    color: #0066CC !important;
}

/* CTA Strip (Detail sayfalari) */
.cta-strip {
    background: #f0f4f8 !important;
}

.cta-strip h3, .cta-strip p {
    color: #1e293b !important;
}

body.dark-mode .cta-strip,
[data-theme="dark"] .cta-strip {
    background: #1F2937 !important;
}

body.dark-mode .cta-strip h3,
body.dark-mode .cta-strip p,
[data-theme="dark"] .cta-strip h3,
[data-theme="dark"] .cta-strip p {
    color: #fff !important;
}

body.dark-mode .btn-white-cta,
[data-theme="dark"] .btn-white-cta {
    background: #0066CC !important;
    color: #fff !important;
}

body.dark-mode .btn-white-cta:hover,
[data-theme="dark"] .btn-white-cta:hover {
    background: #fff !important;
    color: #0066CC !important;
}

/* =============================================
   REFERANSLAR - DARK MODE
   ============================================= */
/* Light mode referanslar */
.references-section-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    --ref-bg: #f8f9fa;
    --ref-card: #fff;
    --ref-border: #e0e0e0;
}

body.dark-mode .references-section-modern,
[data-theme="dark"] .references-section-modern {
    background: linear-gradient(135deg, #111827 0%, #1F2937 100%) !important;
    --ref-bg: #111827;
    --ref-card: #1E293B;
    --ref-border: #334155;
}

body.dark-mode .references-slider-wrapper::before,
[data-theme="dark"] .references-slider-wrapper::before {
    background: linear-gradient(to right, #111827 0%, transparent 100%) !important;
}

body.dark-mode .references-slider-wrapper::after,
[data-theme="dark"] .references-slider-wrapper::after {
    background: linear-gradient(to left, #1F2937 0%, transparent 100%) !important;
}

body.dark-mode .reference-slide,
[data-theme="dark"] .reference-slide {
    background: #1E293B !important;
    border-color: #334155 !important;
}

body.dark-mode .section-title-modern,
[data-theme="dark"] .section-title-modern {
    color: #F1F5F9 !important;
}

body.dark-mode .section-tag-modern,
[data-theme="dark"] .section-tag-modern {
    background: rgba(0, 102, 204, 0.15) !important;
    color: #60a5fa !important;
}

body.dark-mode .reference-placeholder,
[data-theme="dark"] .reference-placeholder {
    color: #94A3B8 !important;
}

/* =============================================
   YORUMLAR (TESTIMONIALS) - DARK MODE
   ============================================= */
body.dark-mode .testimonial-card,
[data-theme="dark"] .testimonial-card {
    background: #1E293B !important;
    border-color: #334155 !important;
}

body.dark-mode .testimonial-card .testimonial-text,
[data-theme="dark"] .testimonial-card .testimonial-text {
    color: #94A3B8 !important;
}

body.dark-mode .testimonial-card .client-name,
[data-theme="dark"] .testimonial-card .client-name {
    color: #F1F5F9 !important;
}

body.dark-mode .testimonial-card .client-role,
[data-theme="dark"] .testimonial-card .client-role {
    color: #64748B !important;
}

/* =============================================
   FOOTER - LIGHT & DARK MODE
   ============================================= */
/* Light mode footer */
.coolsign-footer {
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%) !important;
    color: #475569 !important;
}

.coolsign-footer::before {
    opacity: 0.02 !important;
}

.coolsign-footer-logo-text {
    color: #1e293b !important;
}

.coolsign-footer-logo-highlight {
    color: #0066CC !important;
}

.coolsign-footer-logo-tagline {
    color: #64748b !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

.coolsign-footer-description {
    color: #64748b !important;
}

.coolsign-footer-section h4,
.coolsign-footer-section h5 {
    color: #1e293b !important;
}

.coolsign-footer-section h4::after,
.coolsign-footer-section h5::after {
    background: #0066CC !important;
}

.coolsign-footer a {
    color: #475569 !important;
}

.coolsign-footer a:hover {
    color: #0066CC !important;
}

.coolsign-social-links a {
    background: rgba(0, 102, 204, 0.08) !important;
    color: #0066CC !important;
}

.coolsign-social-links a:hover {
    background: #0066CC !important;
    color: #fff !important;
}

.coolsign-footer-bottom {
    border-top-color: #e2e8f0 !important;
}

.coolsign-footer-bottom,
.coolsign-footer-bottom a,
.coolsign-footer-bottom span {
    color: #94a3b8 !important;
}

.coolsign-contact-item i {
    color: #0066CC !important;
}

.coolsign-contact-item span {
    color: #94a3b8 !important;
}

.coolsign-contact-item a,
.coolsign-contact-item p {
    color: #334155 !important;
}

/* Dark mode footer */
body.dark-mode .coolsign-footer,
[data-theme="dark"] .coolsign-footer {
    background: linear-gradient(135deg, #1A2332 0%, #0F1419 100%) !important;
    color: rgba(255,255,255,0.8) !important;
}

body.dark-mode .coolsign-footer-logo-text,
[data-theme="dark"] .coolsign-footer-logo-text {
    color: #fff !important;
}

body.dark-mode .coolsign-footer-logo-tagline,
[data-theme="dark"] .coolsign-footer-logo-tagline {
    color: rgba(255,255,255,0.7) !important;
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

body.dark-mode .coolsign-footer-description,
[data-theme="dark"] .coolsign-footer-description {
    color: rgba(255,255,255,0.6) !important;
}

body.dark-mode .coolsign-footer-section h4,
body.dark-mode .coolsign-footer-section h5,
[data-theme="dark"] .coolsign-footer-section h4,
[data-theme="dark"] .coolsign-footer-section h5 {
    color: #fff !important;
}

body.dark-mode .coolsign-footer a,
[data-theme="dark"] .coolsign-footer a {
    color: rgba(255,255,255,0.7) !important;
}

body.dark-mode .coolsign-footer a:hover,
[data-theme="dark"] .coolsign-footer a:hover {
    color: #60a5fa !important;
}

body.dark-mode .coolsign-social-links a,
[data-theme="dark"] .coolsign-social-links a {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
}

body.dark-mode .coolsign-social-links a:hover,
[data-theme="dark"] .coolsign-social-links a:hover {
    background: #0066CC !important;
}

body.dark-mode .coolsign-footer-bottom,
[data-theme="dark"] .coolsign-footer-bottom {
    border-top-color: rgba(255,255,255,0.1) !important;
}

body.dark-mode .coolsign-contact-item span,
[data-theme="dark"] .coolsign-contact-item span {
    color: rgba(255,255,255,0.5) !important;
}

body.dark-mode .coolsign-contact-item a,
body.dark-mode .coolsign-contact-item p,
[data-theme="dark"] .coolsign-contact-item a,
[data-theme="dark"] .coolsign-contact-item p {
    color: rgba(255,255,255,0.8) !important;
}

/* =============================================
   NAVBAR CTA BUTTON - TEMA UYUMLU
   ============================================= */
body.dark-mode .coolsign-nav-cta,
[data-theme="dark"] .coolsign-nav-cta {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
    color: #fff !important;
}

body.dark-mode .coolsign-nav-cta:hover,
[data-theme="dark"] .coolsign-nav-cta:hover {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%) !important;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .theme-switcher {
        top: auto;
        bottom: 220px;
        right: 15px;
        flex-direction: column;
    }
    
    .theme-option {
        width: 45px;
        height: 45px;
    }
}

/* Smooth Transition for All Elements */
* {
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
}

/* Preserve Transitions on Interactive Elements */
button,
a,
input,
.btn,
.corporate-card {
    transition: all 0.3s ease !important;
}

/* Loading State */
.theme-switching body {
    pointer-events: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Print Styles - Always Light */
@media print {
    :root {
        --bg-primary: #FFFFFF;
        --bg-secondary: #F9FAFB;
        --text-primary: #1F2937;
        --card-bg: #FFFFFF;
    }
    
    .theme-switcher {
        display: none !important;
    }
}
