/* Custom CSS for DSHS Technologies Inc */

/* Variables */
:root {
    --primary-blue: #1e90ff;
    --dark-blue: #0066cc;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
}

/* Dark mode variables */
[data-theme="dark"] {
    --primary-blue: #ffa500;
    --dark-blue: #ff8c00;
    --text-dark: #ffffff;
    --text-light: #e0e0e0;
    --bg-light: #1a2332;
    --bg-primary: #0f2654;
    --bg-secondary: #1a2332;
    --card-bg: #1e2a3a;
    --border-color: #2d3748;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.4);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--dark-blue);
    border-color: var(--dark-blue);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

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

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    background-color: var(--bg-primary) !important;
    border-bottom: 1px solid var(--border-color);
}

/* Circuit images in navigation */
.navbar .container {
    position: relative;
}

.circuit-left, .circuit-right {
    height: 50px;
    width: auto;
    opacity: 1.0;
    position: fixed;
    z-index: 1000;
}

.circuit-left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.circuit-right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-blue) !important;
    transform: translateY(-2px);
    background: rgba(30, 144, 255, 0.05);
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.navbar-nav .nav-link:hover::before {
    left: 100%;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, var(--primary-blue), var(--dark-blue));
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(30, 144, 255, 0.3);
}

.navbar-nav .nav-link:hover::after {
    width: 85%;
    left: 7.5%;
}

.navbar-nav .nav-link:active {
    transform: translateY(0);
}

/* Mobile menu toggle animations */
.navbar-toggler {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-toggler:hover {
    background: rgba(30, 144, 255, 0.1);
    transform: scale(1.05);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(30, 144, 255, 0.25);
}

.navbar-toggler-icon {
    transition: transform 0.3s ease;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    transform: rotate(90deg);
}

/* Mobile menu slide animation */
.navbar-collapse {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.navbar-collapse.collapsing {
    transition: height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Navigation item stagger animation for mobile */
@media (max-width: 991px) {
    .navbar-nav .nav-item {
        opacity: 0;
        transform: translateX(-20px);
        animation: slideInFromLeft 0.4s ease forwards;
    }
    
    .navbar-nav .nav-item:nth-child(1) { animation-delay: 0.1s; }
    .navbar-nav .nav-item:nth-child(2) { animation-delay: 0.2s; }
    .navbar-nav .nav-item:nth-child(3) { animation-delay: 0.3s; }
    .navbar-nav .nav-item:nth-child(4) { animation-delay: 0.4s; }
    
    .navbar-nav .nav-link {
        border-radius: 8px;
        margin: 0.2rem 0;
        padding: 0.75rem 1rem !important;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(30, 144, 255, 0.1);
        transform: translateX(10px);
    }
}

@keyframes slideInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
}

/* Bottom right gear decoration for all sections */
body {
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    bottom: -150px;
    right: -150px;
    width: 350px;
    height: 350px;
    background-image: url('/static/images/icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 1;
    /*filter: sepia(1) saturate(3) hue-rotate(20deg) brightness(0.8);*/
    animation: rotateGear 35s linear infinite reverse;
    pointer-events: none;
}

/* Background gear decoration */
.hero-section::before {
    content: '';
    position: absolute;
    top: -150px;
    left: -250px;
    width: 550px;
    height: 550px;
    background-image: url('/static/images/gear-bg.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.063;
    z-index: 10;
    filter: sepia(1) saturate(3) hue-rotate(20deg) brightness(0.8);
    animation: rotateGear 50s linear infinite;
}

/* Dark theme gear decoration - use ::after for a different approach */
[data-theme="dark"] .hero-section::before {
    display: none;
}

[data-theme="dark"] .hero-section::after {
    content: '';
    position: absolute;
    top: -150px;
    left: -250px;
    width: 550px;
    height: 550px;
    background-image: url('/static/images/gear-bg.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
    z-index: 10;
    animation: rotateGear 50s linear infinite;
    /*filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)) brightness(2) saturate(0);*/
}

/* Dark theme bottom right gear - hide light theme version and show dark theme version */
[data-theme="dark"] body::before {
    display: none;
}

[data-theme="dark"] body::after {
    content: '';
    position: fixed;
    bottom: -150px;
    right: -150px;
    width: 350px;
    height: 350px;
    background-image: url('/static/images/icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 1;
    animation: rotateGear 35s linear infinite reverse;
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 20;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 400;
}

.hero-buttons {
    margin-top: 2rem;
}

.hero-image {
    position: relative;
    text-align: center;
    animation: fadeInRight 1s ease;
}

.render-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    transform: rotate(1deg);
    transition: transform 0.3s ease;
}

.render-image:hover {
    transform: rotate(0deg) scale(1.05);
}

.sketch-image {
    position: absolute;
    top: 100px;
    right: -100px;
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
    opacity: 0.35;
    z-index: 2;
}

.sketch-image:hover {
    transform: rotate(0deg) scale(1.02);
    opacity: 0.5;
}

.floating-card {
    background: var(--card-bg);
    color: var(--text-dark);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: inline-block;
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 1;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.floating-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, var(--primary-blue), var(--dark-blue));
    border-radius: 25px;
    z-index: -1;
    opacity: 0.1;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--dark-blue));
    border-radius: 2px;
}

/* Feature Cards */
.feature-card {
    background: var(--card-bg);
    color: var(--text-dark);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-blue), var(--dark-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

/* Service Cards */
.service-card {
    background: var(--card-bg);
    color: var(--text-dark);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--dark-blue));
    transition: all 0.3s ease;
}

.service-card:hover::before {
    left: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--primary-blue), var(--dark-blue));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 2.5rem;
    color: white;
}

.service-features {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.service-features li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.service-features li i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

/* Contact Section */
.contact-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.contact-icon i {
    font-size: 2rem;
    color: white;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(30, 144, 255, 0.25);
}

/* Social Links */
.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(30, 144, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-blue);
    color: white !important;
    transform: translateY(-3px);
}

/* Footer specific styling */
footer .social-links a {
    background: rgba(30, 144, 255, 0.1);
    border: 1px solid rgba(30, 144, 255, 0.2);
}

footer .social-links a:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        margin-left: -4rem;
    }
    
    .navbar-brand img {
        transform: scale(0.65);
    }
    
    .navbar-toggler {
        position: absolute;
        right: 1rem;
        margin-right: 0;
    }
    
    .theme-toggle {
        top: auto !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card,
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .floating-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading states */
.fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }

/* Utility classes */
.bg-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-blue), var(--dark-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Dark mode specific styles */
.bg-light {
    background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .contact-form .form-control {
    background: var(--card-bg) !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .contact-form .form-control::placeholder {
    color: #b0b0b0 !important;
    opacity: 1;
}

/* Dark mode icon contrast fixes */
[data-theme="dark"] .feature-card i,
[data-theme="dark"] .service-card i {
    color: #ffe3bf !important; /* Cream color for icons */
}

[data-theme="dark"] .feature-card .fas,
[data-theme="dark"] .service-card .fas {
    color: #ffe3bf !important;
}

/* Dark mode icon background colors */
[data-theme="dark"] .feature-icon,
[data-theme="dark"] .service-icon {
    background: #946930 !important; /* Custom brown background */
}

[data-theme="dark"] .contact-icon {
    background: #946930 !important;
}

/* All icons and badges in dark mode */
[data-theme="dark"] .contact-card i,
[data-theme="dark"] .service-features li i,
[data-theme="dark"] .badge,
[data-theme="dark"] .btn i,
[data-theme="dark"] .alert i {
    color: #ffe3bf !important;
}

/* Social icons - force same appearance in both themes */
[data-theme="dark"] .social-links a {
    background: rgba(30, 144, 255, 0.1) !important;
    border: 1px solid rgba(30, 144, 255, 0.2) !important;
    color: #1e90ff !important;
}

[data-theme="dark"] .social-links a:hover {
    background: #1e90ff !important;
    border-color: #1e90ff !important;
    color: white !important;
    transform: translateY(-3px);
}

[data-theme="dark"] footer .social-links a {
    background: rgba(30, 144, 255, 0.1) !important;
    border: 1px solid rgba(30, 144, 255, 0.2) !important;
}

[data-theme="dark"] footer .social-links a:hover {
    background: #1e90ff !important;
    border-color: #1e90ff !important;
}

/* Light theme - ensure all icons are white */
.feature-icon i,
.service-icon i,
.contact-icon i,
.feature-card i,
.service-card i,
.contact-card i,
.service-features li i,
.badge i,
.btn i,
.alert i {
    color: white !important;
}



/* Dark mode toggle button */
.theme-toggle {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--primary-blue);
    color: #ffe3bf;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.60;
}

/* Dark mode theme toggle background */
[data-theme="dark"] .theme-toggle {
    background: #946930 !important;
}

/* Header background - white in both themes to match logo */
.navbar {
    background-color: white !important;
}

[data-theme="dark"] .navbar {
    background-color: white !important;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--dark-blue);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Circuit pattern for dark mode */
[data-theme="dark"] .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 165, 0, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 165, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, transparent 49%, rgba(255, 165, 0, 0.03) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(255, 165, 0, 0.03) 50%, transparent 51%);
    background-size: 100px 100px, 120px 120px, 50px 50px, 50px 50px;
    opacity: 0.5;
    pointer-events: none;
}

[data-theme="dark"] .floating-card::before {
    background: linear-gradient(45deg, var(--primary-blue), var(--dark-blue));
}

/* Dark mode contact section */
[data-theme="dark"] #contact {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%) !important;
}
