/**
 * Cleaner Surrey - Custom Styles
 * Additional styles and animations
 */

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

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-on-scroll.animated:nth-child(1) { transition-delay: 0.1s; }
.animate-on-scroll.animated:nth-child(2) { transition-delay: 0.2s; }
.animate-on-scroll.animated:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll.animated:nth-child(4) { transition-delay: 0.4s; }
.animate-on-scroll.animated:nth-child(5) { transition-delay: 0.5s; }
.animate-on-scroll.animated:nth-child(6) { transition-delay: 0.6s; }
.animate-on-scroll.animated:nth-child(7) { transition-delay: 0.7s; }
.animate-on-scroll.animated:nth-child(8) { transition-delay: 0.8s; }

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

/* ===== Header Scroll Effect ===== */
.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.site-header.scrolled .header-main {
    padding: 8px 0;
}

/* ===== Hero Overlay Pattern ===== */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15,90,132,0.92) 0%, rgba(26,26,46,0.85) 100%);
    z-index: 1;
}

.hero .container {
    z-index: 2;
}

.service-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15,90,132,0.88) 0%, rgba(26,26,46,0.82) 100%);
    z-index: 1;
}

.service-hero .container {
    position: relative;
    z-index: 2;
}

/* ===== Focus States for Accessibility ===== */
a:focus,
button:focus,
.btn:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ===== Skip to Content (Accessibility) ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    z-index: 10000;
    border-radius: var(--radius);
    font-weight: 600;
}

.skip-link:focus {
    top: 10px;
}

/* ===== Service card hover effects ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* ===== Feature icon hover ===== */
.feature-icon {
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

/* ===== Value card hover ===== */
.value-card {
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--secondary);
}

/* ===== Testimonial card hover ===== */
.testimonial-card {
    transition: var(--transition);
}

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

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(26,115,167,0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== Print Styles ===== */
@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .cta-section,
    .menu-toggle {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .hero {
        background: #f0f0f0 !important;
        color: #000;
        padding: 30px 0;
    }

    .hero h1,
    .hero p {
        color: #000;
    }
}

/* ===== WordPress Core Alignments ===== */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1em;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    padding: 5px 0;
}

/* ===== Entry Content ===== */
.entry-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.entry-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

/* ===== Mobile menu active states ===== */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}
