/* Custom CSS for All In One Handyman Services */

/* Color Variables */
:root {
    --navy: #1A2A4A;
    --orange: #E07A5F;
    --orange-dark: #D16A4F;
    --light-grey: #F4F4F9;
    --charcoal: #333333;
    --white: #FFFFFF;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-dark: rgba(0, 0, 0, 0.25);
}

/* Typography */
.font-heading {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.025em;
}

.font-body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
}

/* Enhanced Typography Hierarchy */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

p {
    line-height: 1.7;
    color: #4a5568;
}

/* Custom Colors */
.text-navy { color: var(--navy); }
.text-orange { color: var(--orange); }
.text-charcoal { color: var(--charcoal); }
.bg-navy { background-color: var(--navy); }
.bg-orange { background-color: var(--orange); }
.bg-orange-dark { background-color: var(--orange-dark); }
.bg-light-grey { background-color: var(--light-grey); }
.bg-charcoal { background-color: var(--charcoal); }
.border-orange { border-color: var(--orange); }

/* Enhanced Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation Delays */
.fade-in:nth-child(1) { transition-delay: 0.1s; }
.fade-in:nth-child(2) { transition-delay: 0.2s; }
.fade-in:nth-child(3) { transition-delay: 0.3s; }
.fade-in:nth-child(4) { transition-delay: 0.4s; }
.fade-in:nth-child(5) { transition-delay: 0.5s; }

/* Testimonial Carousel */
.testimonial-container {
    position: relative;
}

.testimonial {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.testimonial.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* FAQ Styles */
.faq-question:hover {
    background-color: var(--light-grey);
}

.faq-question[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* Enhanced Header Styles */
header {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(26, 42, 74, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation Enhancements */
nav a {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--orange);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

nav a:hover::before {
    width: 80%;
}

nav a:hover {
    background-color: rgba(224, 122, 95, 0.05);
    transform: translateY(-1px);
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

#mobile-menu.show {
    display: block !important;
}

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

section {
    scroll-margin-top: 100px;
}

/* Enhanced Button Styles */
button, .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px var(--shadow-light);
}

button::before, .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover::before, .btn:hover::before {
    left: 100%;
}

button:hover, .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

button:active, .btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-light);
}

/* Button Focus States */
button:focus, .btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.3), 0 8px 25px var(--shadow-medium);
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* High contrast for accessibility */
@media (prefers-contrast: high) {
    .bg-orange { background-color: #CC5500; }
    .text-orange { color: #CC5500; }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    button,
    .btn,
    .transition-all,
    .transition-colors,
    .transition-transform,
    .transition-shadow {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Enhanced Service Tiles */
.service-tile {
    position: relative;
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.80);
    border-radius: 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.service-tile > * {
    position: relative;
    z-index: 2;
}

.service-tile:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-dark);
}

.service-tile:hover::before {
    background: rgba(255, 255, 255, 0.9);
}

.service-tile:hover .fa-arrow-right {
    transform: translateX(4px);
}

/* Modern Card Styles */
.card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
    box-shadow: 0 8px 30px var(--shadow-medium);
    transform: translateY(-2px);
}

/* Enhanced Testimonial Styles */
.testimonial {
    border-radius: 20px;
    border: 1px solid rgba(26, 42, 74, 0.05);
    backdrop-filter: blur(8px);
}

/* Modern Section Spacing */
section {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

/* Form Submit Button Styles */
.form-submit { 
    background-color: #E07A5F; 
    color: white; 
    border: none; 
    padding: 10px 15px; 
    border-radius: 4px; 
    cursor: pointer; 
}

.form-submit:hover { 
    background-color: #D16A4F; 
}

/* Enhanced FAQ Styles */
.faq-question {
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-question:hover {
    background: linear-gradient(135deg, var(--light-grey), rgba(224, 122, 95, 0.05));
    transform: translateX(4px);
}

/* Modern Footer Styling */
footer {
    background: linear-gradient(135deg, var(--charcoal) 0%, #2d3748 100%);
}

/* Mobile optimizations */

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    /* Mobile Navigation Enhancement */
    #mobile-menu {
        backdrop-filter: blur(16px);
        background: rgba(255, 255, 255, 0.95);
        border-radius: 12px;
        margin: 0.5rem;
        box-shadow: 0 8px 30px var(--shadow-medium);
    }
}
