/* Page transitions – seamless, professional feel */
@media (prefers-reduced-motion: no-preference) {
    .page-transition {
        opacity: 0;
        transition: opacity 0.4s ease-out;
    }

    .page-transition.page-loaded {
        opacity: 1;
    }

    .reveal-section {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    }

    .reveal-section.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .component-placeholder {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.45s ease-out, transform 0.45s ease-out;
    }

    .component-placeholder.component-loaded {
        opacity: 1;
        transform: translateY(0);
    }

    /* Hero text & image smooth motion – staggered reveal */
    .hero-motion {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.55s ease-out, transform 0.55s ease-out;
    }

    .reveal-section.revealed .hero-motion {
        opacity: 1;
        transform: translateY(0);
    }

    .hero-title { transition-delay: 0.08s; }
    .hero-desc { transition-delay: 0.22s; }
    .hero-btns { transition-delay: 0.36s; }

    .hero-image {
        transform: translateY(20px) translateX(24px);
        transition: opacity 0.55s ease-out, transform 0.6s ease-out;
        transition-delay: 0.12s;
    }

    .reveal-section.revealed .hero-image {
        transform: translateY(0) translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-transition { opacity: 1; }
    .reveal-section { opacity: 1; transform: none; }
    .component-placeholder { opacity: 1; transform: none; }
    .hero-motion { opacity: 1; transform: none; }
}

/* Typography and base styles */
:where([class^="ri-"])::before {
    content: "\f3c2";
}

body {
    font-family: 'Roboto', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

.logo {
    font-family: 'Pacifico', serif;
}

/* ========== Section backgrounds – visually appealing & professional ========== */

/* Hero: warm gradient with soft blobs */
.section-hero {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fc 40%, #dcedf9 100%);
    position: relative;
    overflow: hidden;
}
.section-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 50%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(33, 150, 243, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.section-hero::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -5%;
    width: 40%;
    height: 50%;
    background: radial-gradient(ellipse, rgba(33, 150, 243, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Services: clean with subtle grid pattern */
.section-services {
    background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
    position: relative;
}
.section-services::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(33, 150, 243, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Pricing: soft blue-gray with dot pattern */
.section-pricing {
    background: linear-gradient(180deg, #f8fafc 0%, #eef5fc 50%, #f2f7fc 100%);
    position: relative;
}
.section-pricing::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(33, 150, 243, 0.08) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    pointer-events: none;
}

/* Why Choose Us: warm cream with wave accent */
.section-why {
    background: linear-gradient(180deg, #fefefe 0%, #f8f9fc 50%, #f0f4fa 100%);
    position: relative;
}
.section-why::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

/* Process: crisp white with diagonal accent */
.section-process {
    background: linear-gradient(180deg, #ffffff 0%, #f7fafd 100%);
    position: relative;
}
.section-process::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 100%;
    background: linear-gradient(105deg, rgba(33, 150, 243, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

/* Contact: soft gradient with subtle pattern */
.section-contact {
    background: linear-gradient(180deg, #fafcfd 0%, #f0f6fb 50%, #e8f2fa 100%);
    position: relative;
}
.section-contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
    pointer-events: none;
}

/* Testimonials: warm tone with soft circles */
.section-testimonials {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f5f8 50%, #edf1f6 100%);
    position: relative;
}
.section-testimonials::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 5%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.04) 0%, transparent 70%);
    pointer-events: none;
}
.section-testimonials::after {
    content: '';
    position: absolute;
    bottom: 15%;
    left: 8%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* CTA: vibrant gradient with depth */
.section-cta {
    background: linear-gradient(135deg, #1976D2 0%, #2196F3 50%, #42A5F5 100%);
    position: relative;
    overflow: hidden;
}
.section-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
}
.section-cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 40%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Footer: dark gradient */
.section-footer {
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    position: relative;
}
.section-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    pointer-events: none;
}

/* Ensure section content stays above decorative layers */
.section-hero > *,
.section-services > *,
.section-pricing > *,
.section-why > *,
.section-process > *,
.section-contact > *,
.section-testimonials > *,
.section-cta > *,
.section-footer > * {
    position: relative;
    z-index: 1;
}

/* Custom checkbox */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #2196F3;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
}

.custom-checkbox:checked {
    background-color: #2196F3;
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Focus states */
input:focus,
textarea:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

/* Service cards */
/* Service cards – professional motion effects */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease,
                border-color 0.3s ease;
    border: 2px solid transparent;
}

@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(28px);
        transition: opacity 0.5s ease-out,
                    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    box-shadow 0.4s ease,
                    border-color 0.3s ease;
    }

    .reveal-section.revealed .service-card {
        opacity: 1;
        transform: translateY(0);
    }

    .service-card-1 { transition-delay: 0.08s; }
    .service-card-2 { transition-delay: 0.16s; }
    .service-card-3 { transition-delay: 0.24s; }
    .service-card-4 { transition-delay: 0.32s; }

    .reveal-section.revealed .service-card:hover {
        transition-delay: 0s;
    }
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(33, 150, 243, 0.15),
                0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(33, 150, 243, 0.2);
}

.service-card-icon {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.3s ease;
}

.service-card:hover .service-card-icon {
    transform: scale(1.08);
    background-color: rgba(33, 150, 243, 0.15);
}

.service-card a {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover a {
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .service-card {
        opacity: 1;
        transform: none;
    }
    .reveal-section.revealed .service-card { transform: none; }
    .service-card:hover { transform: none; }
    .service-card:hover .service-card-icon { transform: none; }
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

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

@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }
}

/* Contact grid – Hotline & Zalo parallel and balanced */
.contact-grid {
    align-items: stretch;
}

.contact-grid .contact-item {
    min-width: 0;
}

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

@keyframes ping {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes floating-ping {
    0% { transform: scale(1); opacity: 0.8; }
    75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* Floating Contact Buttons – parallel & balanced */
.floating-buttons-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
}

.floating-buttons-container > * {
    pointer-events: auto;
}

.floating-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.04);
}

.floating-btn-icon {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    transition: transform 0.3s ease;
}

.floating-btn:hover .floating-btn-icon {
    transform: scale(1.08);
}

.floating-ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: -1;
}

.zalo-icon {
    background: linear-gradient(135deg, #0068FF 0%, #0052CC 100%);
    box-shadow: 0 4px 14px rgba(0, 104, 255, 0.45);
}

.zalo-ping {
    background: rgba(0, 104, 255, 0.5);
    animation: floating-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.phone-icon {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.45);
}

.phone-ping {
    background: rgba(59, 130, 246, 0.5);
    animation: floating-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite 0.5s;
}

.zalo-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 50%;
    z-index: 2;
    position: relative;
}

.phone-icon-symbol {
    font-size: 26px;
    color: white;
    z-index: 2;
    position: relative;
}

.floating-btn-label {
    padding: 6px 14px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.zalo-btn .floating-btn-label {
    background: linear-gradient(135deg, #0068FF 0%, #0052CC 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 104, 255, 0.35);
}

.phone-btn .floating-btn-label {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.floating-btn-label span {
    display: block;
}

.floating-btn-number {
    font-size: 10px;
    opacity: 0.92;
    font-weight: 500;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 480px) {
    .floating-buttons-container {
        flex-direction: column;
        bottom: 20px;
        right: 16px;
        gap: 10px;
    }

    .floating-btn {
        flex-direction: row;
    }

    .floating-btn-icon {
        width: 50px;
        height: 50px;
    }

    .zalo-logo-img {
        width: 32px;
        height: 32px;
    }

    .phone-icon-symbol {
        font-size: 22px;
    }

    .floating-btn-label {
        font-size: 11px;
        padding: 5px 12px;
    }

    .floating-btn-number {
        font-size: 9px;
    }
}
