/* ====================================
   Darwin Cleaning Services - Main CSS
   ==================================== */

:root {
    --primary-color: #0077be;
    --primary-dark: #00509d;
    --secondary-color: #00a86b;
    --accent-teal: #06b6d4;
    --light-gray: #f0f9ff;
    --dark-gray: #1f2937;
    --text-muted: #6b7280;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 119, 190, 0.1);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 119, 190, 0.15);
}

/* ====================================
   Global Styles
   ==================================== */

* {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    overflow-x: hidden;
    padding-top: 70px;
}

/* Sticky Navbar */
.navbar {
    margin-bottom: 0;
}

a {
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none !important;
}

/* ====================================
   Typography
   ==================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-gray);
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
}

/* ====================================
   Buttons
   ==================================== */

.btn {
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 102, 204, 0.4);
}

.btn-outline-light:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white !important;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
}

/* ====================================
   Navbar
   ==================================== */

.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
}

.navbar-nav .nav-link {
    margin: 0 0.5rem;
    font-weight: 600;
    color: var(--dark-gray) !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar.sticky-top {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1100 !important;
    width: 100% !important;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1100 !important;
    width: 100% !important;
}

/* ====================================
   Hero Section
   ==================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2" x="0" y="0" width="100" height="100"/><rect fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2" x="200" y="200" width="100" height="100"/><rect fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2" x="400" y="400" width="100" height="100"/></svg>');
    pointer-events: none;
    opacity: 0.1;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    color: white;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Hero Stats */
.hero-section .text-light-50 {
    opacity: 0.7;
}

/* ====================================
   Cards & Sections
   ==================================== */

.card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-5px);
}

.hover-shadow-lg:hover {
    box-shadow: 0 1rem 3rem rgba(0, 119, 190, 0.15) !important;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Service Icons */
.service-icon {
    display: inline-block;
    padding: 0.5rem 0;
}

.service-icon i {
    color: var(--primary-color);
}

/* ====================================
   Why Choose Us Section
   ==================================== */

.h-12 {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background-color: var(--primary-color);
    color: white;
}

.w-12 {
    width: 3rem;
}

/* ====================================
   Contact & Form Section
   ==================================== */

.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 119, 190, 0.15);
    background-color: #f0f9ff;
}

.form-label {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ====================================
   Responsive Images
   ==================================== */

img {
    max-width: 100%;
    height: auto;
}

/* ====================================
   Backgrounds
   ==================================== */

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #0077be 0%, #00a86b 100%);
}

.bg-gradient-teal {
    background: linear-gradient(135deg, #00a86b 0%, #06b6d4 100%);
}

.bg-light {
    background-color: var(--light-gray) !important;
}

/* ====================================
   Footer
   ==================================== */

footer {
    background-color: var(--dark-gray);
    color: white;
}

footer h5, footer h6 {
    color: white;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

footer a:hover {
    color: white;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ====================================
   Loading & Animation
   ==================================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====================================
   Alert Messages
   ==================================== */

.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--secondary-color);
}

.alert-danger {
    background-color: #fee2e2;
    color: #7f1d1d;
}

.alert-info {
    background-color: #cffafe;
    color: #164e63;
    border-left: 4px solid var(--accent-teal);
}

/* ====================================
   Utility Classes
   ==================================== */

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-success-light {
    background-color: #d1fae5 !important;
}

.bg-teal-light {
    background-color: #ccfbf1 !important;
}

.badge-primary {
    background-color: var(--primary-color) !important;
}

.badge-success {
    background-color: var(--secondary-color) !important;
}

.badge-teal {
    background-color: var(--accent-teal) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.border-success {
    border-color: var(--secondary-color) !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: var(--box-shadow) !important;
}

.shadow-lg {
    box-shadow: var(--box-shadow-lg) !important;
}

.rounded-3 {
    border-radius: 1rem;
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .navbar-nav {
        text-align: center;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section {
        min-height: 60vh;
    }

    .card {
        margin-bottom: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .py-5 {
        padding: 2rem 0 !important;
    }
}

/* ====================================
   Accessibility
   ==================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====================================
   Print Styles
   ==================================== */

@media print {
    .navbar,
    footer,
    .btn {
        display: none;
    }

    body {
        background-color: white;
    }
}

/* ====================================
   Logo Styling
   ==================================== */

.logo-header {
    display: inline-block;
    max-width: 180px;
    height: auto;
    vertical-align: middle;
    border: none;
    background: none;
}

.navbar-brand .logo-header {
    transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-header {
    transform: scale(1.05);
}

.navbar-brand .site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 0.5rem;
    white-space: nowrap;
}

.logo-footer {
    display: block;
    max-width: 150px;
    height: auto;
    margin-bottom: 1rem;
    border: none;
    background: none;
}

/* Responsive logo sizing */
@media (max-width: 992px) {
    .logo-header {
        max-width: 150px;
    }
    
    .navbar-brand .site-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .logo-header {
        max-width: 120px;
    }
    
    .logo-footer {
        max-width: 120px;
    }
    
    .navbar-brand .site-title {
        font-size: 1rem;
    }
}
