/* NAMONAKI Website - UI/UX Enhancement Styles */

/* =====================================
   1. Scroll Progress Bar
   ===================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(107, 93, 84, 0.1);
    z-index: 10000;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-bronze), var(--color-sage));
    width: 0%;
    transition: width 0.1s ease;
}

/* =====================================
   2. Enhanced Shadows & Depth
   ===================================== */
.service-card,
.area-card,
.pricing-card,
.testimonial-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover,
.area-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.cta-button,
.btn-primary,
.floating-cta-main {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1),
                0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button:hover,
.btn-primary:hover,
.floating-cta-main:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.15),
                0 3px 6px rgba(0,0,0,0.10);
}

/* =====================================
   3. Form Validation Styles
   ===================================== */
input.valid,
textarea.valid {
    border-color: #06C755;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2306C755'%3E%3Cpath d='M13.5 3L6 10.5 2.5 7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

input.invalid,
textarea.invalid {
    border-color: #FF4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FF4444'%3E%3Cpath d='M3 3L13 13M13 3L3 13'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--color-bronze);
    outline-offset: 2px;
    border-color: var(--color-bronze);
}

/* =====================================
   4. Trust Badges Section
   ===================================== */
.trust-badges {
    padding: 3rem 0;
    background: var(--color-sand);
    text-align: center;
}

.trust-badges h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-charcoal);
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.badge img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.badge p {
    font-size: 0.85rem;
    color: var(--color-slate);
}

/* =====================================
   5. Stats Counter Section
   ===================================== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    padding: 4rem 3rem;
    background: linear-gradient(135deg, var(--color-slate) 0%, var(--color-charcoal) 100%);
    color: white;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-family: var(--font-serif-en);
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1;
    color: var(--color-bronze);
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

.stat-unit {
    font-size: 1.5rem;
    margin-left: 0.3rem;
}

/* =====================================
   6. Price Calculator
   ===================================== */
.price-calculator {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 3rem auto;
}

.price-calculator h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-charcoal);
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--color-slate);
    font-size: 0.95rem;
}

.form-group select,
.form-group input[type="range"] {
    padding: 0.8rem;
    border: 2px solid rgba(107, 93, 84, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group select:focus {
    border-color: var(--color-bronze);
}

.form-group input[type="range"] {
    cursor: pointer;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.calculator-result {
    background: var(--color-sand);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}

.result-label {
    font-size: 0.9rem;
    color: var(--color-slate);
    margin-bottom: 0.5rem;
}

.result-price {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-bronze);
    font-family: var(--font-serif-en);
}

.result-note {
    font-size: 0.8rem;
    color: var(--color-slate);
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* =====================================
   7. Scroll to Top Button
   ===================================== */
#scrollToTop {
    position: fixed;
    bottom: 120px;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--color-walnut);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
}

#scrollToTop:hover {
    background: var(--color-bronze);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

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

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin: 0.5em 0;
    border-radius: 4px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
}

/* =====================================
   9. Improved Accessibility
   ===================================== */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-charcoal);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10001;
    border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
    top: 0;
}

*:focus-visible {
    outline: 3px solid var(--color-bronze);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card,
    .area-card {
        border: 2px solid var(--color-charcoal);
    }
}

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

/* =====================================
   10. Enhanced Micro-interactions
   ===================================== */
.btn-primary,
.cta-button {
    position: relative;
    overflow: hidden;
}

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

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

/* =====================================
   11. Expandable Content
   ===================================== */
.expandable-content {
    margin: 2rem 0;
}

.content-full {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.expand-btn {
    background: none;
    border: none;
    color: var(--color-bronze);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.expand-btn:hover {
    color: var(--color-walnut);
}

/* =====================================
   12. Section Dividers
   ===================================== */
section + section::before {
    content: '';
    display: block;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-bronze) 50%, 
        transparent 100%);
    margin: 0 auto 4rem;
}

section:first-of-type::before {
    display: none;
}

/* =====================================
   13. Mobile Optimizations
   ===================================== */
@media (max-width: 768px) {
    .stats-section {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .price-calculator {
        padding: 2rem 1.5rem;
        margin: 2rem 1rem;
    }
    
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    #scrollToTop {
        bottom: 90px;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* =====================================
   14. Print Styles
   ===================================== */
@media print {
    .floating-cta,
    .mobile-menu-btn,
    #scrollToTop,
    .scroll-progress {
        display: none !important;
    }
    
    .service-card,
    .area-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* =====================================
   15. Dark Mode Preparation
   ===================================== */
@media (prefers-color-scheme: dark) {
    /* Currently using light theme only */
    /* Uncomment to enable dark mode support */
    /*
    :root {
        --color-ivory: #2C2C2C;
        --color-sand: #3A3A3A;
        --color-charcoal: #F5F1E8;
    }
    */
}
