/* CoolAir HVAC - Shared Styles */

/* Base styles */
body {
    font-family: 'Inter', sans-serif;
}

/* Material icons settings */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Filled icons variant */
.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Sticky sidebar utility */
.sticky-sidebar {
    top: 6rem;
}

/* ============================================
   ANIMATION KEYFRAMES
   ============================================ */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide up and fade in */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale up animation */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bounce in animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Float animation for icons */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ============================================
   PAGE LOAD ANIMATIONS
   ============================================ */

/* Header animation */
header {
    animation: slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hero section animations */
.hero-badge {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

.hero-title {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero-description {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}

.hero-cta {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.29s both;
}

.hero-trust {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both;
}

.hero-image {
    animation: scaleUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

/* Base state for scroll animations - hidden */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Reveal from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Reveal from right */
.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Reveal with scale */
.reveal-scale {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.3s; }

.stagger-children.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   MOBILE MENU ANIMATIONS
   ============================================ */

/* Mobile menu styles - slides in from right */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: #ffffff !important;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Dark mode mobile menu */
.dark .mobile-menu {
    background-color: #0f172a !important;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease-out, visibility 0.28s ease-out;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Mobile menu items stagger animation */
.mobile-menu nav a,
.mobile-menu nav hr {
    opacity: 0;
    transform: translateX(15px);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

.mobile-menu.open nav a:nth-child(1) { transition-delay: 0.06s; opacity: 1; transform: translateX(0); }
.mobile-menu.open nav a:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateX(0); }
.mobile-menu.open nav a:nth-child(3) { transition-delay: 0.14s; opacity: 1; transform: translateX(0); }
.mobile-menu.open nav a:nth-child(4) { transition-delay: 0.18s; opacity: 1; transform: translateX(0); }
.mobile-menu.open nav a:nth-child(5) { transition-delay: 0.22s; opacity: 1; transform: translateX(0); }
.mobile-menu.open nav hr { transition-delay: 0.26s; opacity: 1; transform: translateX(0); }
.mobile-menu.open nav a:nth-child(7) { transition-delay: 0.3s; opacity: 1; transform: translateX(0); }
.mobile-menu.open nav a:nth-child(8) { transition-delay: 0.34s; opacity: 1; transform: translateX(0); }

/* Mobile menu close button animation */
.mobile-menu #close-menu-button {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.mobile-menu #close-menu-button:hover {
    transform: rotate(90deg);
}

/* ============================================
   SMOOTH SCROLL & NAVIGATION
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* Active navigation link */
.nav-link.active {
    color: #136dec;
    border-bottom: 2px solid #136dec;
}

/* Nav link hover animation */
header nav a {
    position: relative;
    transition: color 0.15s ease;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #136dec;
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

header nav a:hover::after {
    width: 100%;
}

/* ============================================
   FORM ANIMATIONS
   ============================================ */

input,
select,
textarea {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(19, 109, 236, 0.15);
    transform: translateY(-1px);
}

/* Form field label animation */
.form-label {
    transition: color 0.3s ease;
}

input:focus + .form-label,
textarea:focus + .form-label {
    color: #136dec;
}

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */

.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(19, 109, 236, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    transition: transform 0.08s;
}

/* WhatsApp button special animation */
a[href*="wa.me"] {
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

a[href*="wa.me"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}

/* ============================================
   CARD ANIMATIONS
   ============================================ */

.service-card {
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Service card icon animation */
.service-card .material-symbols-outlined {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .material-symbols-outlined {
    transform: scale(1.1);
}

/* Testimonial card animation */
.testimonial-card {
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card:hover {
    transform: translateY(-5px) scale(1.015);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Feature card hover */
.feature-card {
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   ICON ANIMATIONS
   ============================================ */

/* Floating icon animation */
.icon-float {
    animation: float 3s ease-in-out infinite;
}

/* Icon pulse on hover */
.icon-pulse:hover {
    animation: pulse 0.5s ease;
}

/* Rotating icon */
.icon-rotate {
    transition: transform 0.3s ease;
}

.icon-rotate:hover {
    transform: rotate(15deg);
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

.spinner {
    animation: spin 1s linear infinite;
}

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

/* Pulse animation for availability badge */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Skeleton loading shimmer */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ============================================
   MODAL ANIMATIONS
   ============================================ */

#request-modal {
    transition: opacity 0.25s ease;
}

#request-modal > div:last-child {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

#request-modal.hidden > div:last-child {
    transform: scale(0.96) translateY(15px);
    opacity: 0;
}

#request-modal:not(.hidden) > div:last-child {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modal overlay fade */
#modal-overlay {
    transition: opacity 0.25s ease;
}

/* ============================================
   FOOTER ANIMATIONS
   ============================================ */

footer a {
    position: relative;
    transition: color 0.15s ease;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

footer a:hover::after {
    width: 100%;
}

/* ============================================
   SPECIAL EFFECTS
   ============================================ */

/* Gradient text animation */
.gradient-text-animated {
    background: linear-gradient(90deg, #136dec, #25D366, #136dec);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

/* Glow effect on hover */
.glow-hover {
    transition: box-shadow 0.3s ease;
}

.glow-hover:hover {
    box-shadow: 0 0 20px rgba(19, 109, 236, 0.4);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    /* Reduce animation intensity on mobile */
    .reveal,
    .reveal-left,
    .reveal-right {
        transform: translateY(20px);
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
