/* Custom styles for Deluxe Transmission */
:root {
    --primary-color: #1e5ba8;  /* Blue from logo */
    --gold-color: #d4af37;     /* Gold from gear */
    --dark-color: #212529;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Ensure main content is properly positioned */
main {
    position: relative;
    z-index: 1;
}

/* Ensure page content doesn't interfere with navbar dropdown */
.container, .container-fluid {
    position: relative;
    z-index: 1;
}

/* Animated background - fixed positioning */
.animated-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    overflow: hidden;
    pointer-events: none; /* Add this to prevent interaction issues */
}

/* Floating gears animation */
.gear {
    position: absolute;
    opacity: 0.05;
    animation: float-rotate 20s infinite linear;
}

.gear.large {
    width: 300px;
    height: 300px;
    animation-duration: 30s;
}

.gear.medium {
    width: 200px;
    height: 200px;
    animation-duration: 25s;
}

.gear.small {
    width: 100px;
    height: 100px;
    animation-duration: 20s;
}

@keyframes float-rotate {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}

/* Circuit board pattern overlay */
.circuit-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 35px,
            rgba(30, 91, 168, 0.03) 35px,
            rgba(30, 91, 168, 0.03) 70px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 35px,
            rgba(30, 91, 168, 0.03) 35px,
            rgba(30, 91, 168, 0.03) 70px
        );
    pointer-events: none;
}

/* Navigation with logo */
.navbar-brand img {
    height: 50px;
    width: auto;
    max-width: 200px;
    margin-right: 10px;
    object-fit: contain;
}

.navbar {
    background: rgba(33, 37, 41, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1030; /* Bootstrap navbar z-index */
}

.navbar-brand {
    max-width: 300px;
    display: flex;
    align-items: center;
}

/* Dropdown menu z-index fix */
.navbar .dropdown-menu {
    z-index: 1050 !important; /* Higher than navbar */
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

/* Ensure dropdown is visible on mobile */
@media (max-width: 991.98px) {
    .navbar .dropdown-menu {
        position: static !important;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
        z-index: auto;
    }
    
    .navbar .dropdown-menu .dropdown-item {
        padding: 0.5rem 1rem;
        color: rgba(255,255,255,.75);
    }
    
    .navbar .dropdown-menu .dropdown-item:hover {
        color: #fff;
        background-color: rgba(255,255,255,.1);
    }
}

/* Hero Section */
.hero-section {
    min-height: 600px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #163a6b 100%);
    position: relative;
    overflow: hidden;
}

/* Floating gears animation */
.gear {
    position: absolute;
    opacity: 0.1;
    animation: float-rotate 20s infinite linear;
}

.gear svg {
    width: 100%;
    height: 100%;
}

.gear.large {
    width: 300px;
    height: 300px;
    animation-duration: 30s;
}

.gear.medium {
    width: 200px;
    height: 200px;
    animation-duration: 25s;
}

.gear.small {
    width: 100px;
    height: 100px;
    animation-duration: 20s;
}

@keyframes float-rotate {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}

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

/* Service cards with hover effect */
.service-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card.transmission {
    border-top-color: var(--gold-color);
}

.service-card.repair {
    border-top-color: var(--primary-color);
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before {
    transform: scale(1);
}

/* Icon styling */
.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2.5rem;
}

.service-icon.gold {
    background: linear-gradient(135deg, var(--gold-color), #f4e4bc);
    color: white;
}

.service-icon.blue {
    background: linear-gradient(135deg, var(--primary-color), #4a7fc7);
    color: white;
}

/* Stats section */
.stats-section {
    background: var(--primary-color);
    color: white;
    padding: 60px 0;
    position: relative;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--gold-color);
}

/* CTA buttons */
.btn-gold {
    background: linear-gradient(135deg, var(--gold-color), #f4e4bc);
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #f4e4bc, var(--gold-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212,175,55,0.3);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 20px;
    }
    
    .gear {
        display: none; /* Hide floating gears on mobile */
    }
}

/* Form styling improvements */
.form-select {
    position: relative;
}

/* Placeholder Select Styling - ALWAYS show placeholder */
.placeholder-select {
    position: relative;
}

/* Always show placeholder as prominent background text - FORCE DISPLAY */
.placeholder-select::before {
    content: attr(data-placeholder) !important;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d !important;
    font-style: italic !important;
    pointer-events: none;
    z-index: 9999 !important;
    background: white !important;
    padding: 0 4px;
    font-size: 0.9em;
    opacity: 0.9 !important;
    font-weight: 400;
    display: block !important;
    visibility: visible !important;
}

/* When user has selected a value, make placeholder more subtle but still visible */
.placeholder-select[data-has-value="true"]::before {
    opacity: 0.6 !important;
    font-size: 0.75em;
    top: 8px;
    left: 8px;
    transform: none;
    color: #adb5bd !important;
    display: block !important;
    visibility: visible !important;
}

/* Ensure select text is visible and properly positioned */
.placeholder-select {
    color: #212529;
    padding-left: 12px;
}

/* Normal option styling */
.form-select option {
    color: #212529;
    font-style: normal;
    background-color: white;
}

/* Focus state improvements */
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 91, 168, 0.25);
}

/* Disabled state styling */
.form-select:disabled {
    background-color: #e9ecef;
    opacity: 0.65;
}

/* Enhanced Timezone System Styles */

.timezone-search-container {
    position: relative;
    margin-bottom: 1rem;
}

.timezone-search-container input {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.timezone-search-container input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.timezone-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.timezone-option {
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.timezone-option:hover {
    background-color: #f8f9fa;
}

.timezone-option:last-child {
    border-bottom: none !important;
}

/* Enhanced timezone select styling */
.timezone-select {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.timezone-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Auto-detect option styling */
.timezone-select option[value="auto"] {
    font-weight: bold;
    color: #0d6efd;
}

/* Timezone option grouping */
.timezone-select optgroup {
    font-weight: bold;
    color: #6c757d;
}

.timezone-select option {
    padding: 0.25rem 0.5rem;
}

/* Responsive design for timezone search */
@media (max-width: 768px) {
    .timezone-search-results {
        max-height: 200px;
    }
    
    .timezone-option {
        padding: 0.75rem !important;
    }
}

/* Loading state for timezone search */
.timezone-search-loading {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
}

.timezone-search-loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Timezone info tooltip */
.timezone-info {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
    color: #6c757d;
    cursor: help;
}

.timezone-info:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1001;
}

/* Enhanced form validation for timezone */
.timezone-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.timezone-select.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}