/* ==========================================================================
   CSS Variables - Design System
   ========================================================================== */

:root {
    /* Colors - 70:25:5 Rule */
    --color-base: #FAFAFA;
    /* 70% - Background */
    --color-main: #004680;
    /* 25% - Brand */
    --color-accent: #FFD700;
    /* 5% - CTA */
    --color-secondary: #5B9BD5;
    /* Secondary brand color */
    --color-text: #333333;
    /* Text (not pure black) */
    --color-text-light: #666666;
    /* Light text */
    --color-white: #FFFFFF;
    /* White (not pure #FFF) */

    /* Spacing */
    --spacing-unit: 8px;
    --spacing-xs: calc(var(--spacing-unit) * 1);
    /* 8px */
    --spacing-sm: calc(var(--spacing-unit) * 2);
    /* 16px */
    --spacing-md: calc(var(--spacing-unit) * 3);
    /* 24px */
    --spacing-lg: calc(var(--spacing-unit) * 4);
    /* 32px */
    --spacing-xl: calc(var(--spacing-unit) * 6);
    /* 48px */
    --spacing-2xl: calc(var(--spacing-unit) * 8);
    /* 64px */

    /* Typography */
    --font-family-base: "Noto Sans JP", "Helvetica Neue", Arial, "Hiragino Sans", sans-serif;

    /* Z-index */
    --z-index-modal: 1000;
    --z-index-overlay: 999;
    --z-index-header: 100;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Japanese Text Readability (2026 Best Practices) */
    text-autospace: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-break: strict;

    /* Typography */
    font-family: var(--font-family-base);
    font-size: 16px;
    /* Minimum 16px for iOS Safari (prevent auto-zoom) */
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-base);

    /* Performance */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography Scale (Responsive)
   ========================================================================== */

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--color-main);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--color-main);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-main);
}

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.pc-only {
    display: block;
}

.sp-only {
    display: none;
}

@media (max-width: 768px) {
    .pc-only {
        display: none;
    }

    .sp-only {
        display: block;
    }
}

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

/* ==========================================================================
   Glass Morphism Card (UI/UX Improvement)
   ========================================================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 70, 140, 0.08);
    padding: var(--spacing-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    .glass-card:hover {
        box-shadow: 0 12px 40px rgba(0, 70, 140, 0.12);
        transform: translateY(-4px);
    }
}

/* ==========================================================================
   CTA Button (Micro-animation)
   ========================================================================== */

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    min-width: 200px;
    min-height: 56px;
    /* 44px+ for tap target */

    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
    color: var(--color-main);
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    justify-content: center;

    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);

    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    .cta-button:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 12px 24px rgba(255, 200, 0, 0.4);
    }
}

.cta-button:active {
    transform: translateY(0) scale(0.98);
}

.cta-button:focus {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

.cta-button svg {
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .cta-button:hover svg {
        transform: translateX(4px);
    }
}

/* ==========================================================================
   Section Titles
   ========================================================================== */

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    border-radius: 2px;
}

/* ==========================================================================
   Hero Section (with Overlay for Text Visibility)
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;

    /* Real background image */
    background-image: url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark overlay for text readability */
    background: rgba(0, 70, 128, 0.6);
    z-index: 1;
}

.hero-logo {
    position: absolute;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
    z-index: 3;
}

.company-logo {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
    /* White logo */
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

@media (hover: hover) {
    .company-logo:hover {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .hero-logo {
        top: var(--spacing-md);
        left: var(--spacing-md);
    }

    .company-logo {
        height: 40px;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: var(--spacing-2xl) var(--spacing-md);
}

.hero-title {
    color: var(--color-white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    /* Enhanced text shadow */
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    color: var(--color-white);
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--spacing-xl);
}

/* ==========================================================================
   Problems Section (2x2 Grid)
   ========================================================================== */

.problems-section {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    max-width: 800px;
    margin: 0 auto;
}

.problem-card {
    padding: var(--spacing-lg);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 70, 140, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-text {
    font-size: 1.125rem;
    color: var(--color-main);
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
}

@media (hover: hover) {
    .problem-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 70, 140, 0.12);
    }
}

@media (max-width: 768px) {
    .problem-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ==========================================================================
   Reasons Section (Zigzag Layout)
   ========================================================================== */

.reasons-section {
    padding: var(--spacing-2xl) 0;
    position: relative;
    background-color: #ffffff;
    overflow: hidden;
}

.reasons-grid {
    display: flex;
    flex-direction: column;
    gap: 80px;
    max-width: 1000px;
    margin: 0 auto;
}

.reason-card {
    display: flex;
    align-items: center;
    gap: 60px;
    text-align: left;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
}

.reason-card:nth-child(even) {
    flex-direction: row-reverse;
}

.reason-card::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.reason-image-wrapper {
    flex: 1;
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.reason-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 70, 140, 0.15);
    background-color: #f0f7ff;
    transition: transform 0.4s ease;
}

@media (hover: hover) {
    .reason-card:hover .reason-image {
        transform: scale(1.02);
    }
}

.reason-content {
    flex: 1;
    width: 50%;
    position: relative;
    z-index: 1;
}

.reason-number {
    display: inline-block;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(0, 70, 140, 0.1);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.reason-title {
    margin-bottom: var(--spacing-md);
    font-size: 1.75rem;
    color: var(--color-main);
    line-height: 1.4;
}

.reason-title span {
    background: linear-gradient(180deg, transparent 65%, rgba(255, 215, 0, 0.4) 65%);
}

.reason-description {
    color: var(--color-text);
    font-size: 1.125rem;
    line-height: 1.8;
}

@media (max-width: 768px) {

    .reason-card,
    .reason-card:nth-child(even) {
        flex-direction: column;
        gap: var(--spacing-lg);
        text-align: center;
    }

    .reason-image-wrapper,
    .reason-content {
        width: 100%;
    }

    .reasons-grid {
        gap: var(--spacing-xl);
    }
}

/* ==========================================================================
   Services Section (3-Column Grid)
   ========================================================================== */

.services-section {
    padding: var(--spacing-2xl) 0;
    background-color: #f8fafc;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.service-card {
    padding: var(--spacing-xl);
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 70, 140, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, var(--color-main) 0%, var(--color-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 70, 140, 0.2);
}

.service-icon svg {
    width: 40px;
    height: 40px;
}

.service-title {
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-main);
}

.service-description {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.7;
}

@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 70, 140, 0.15);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* ==========================================================================
   Testimonial Section
   ========================================================================== */

.testimonial-section {
    padding: var(--spacing-2xl) 0;
}

.testimonial-card {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.testimonial-image-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 70, 140, 0.15);
}

.testimonial-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-content {
    flex: 1;
}

.testimonial-text {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-left: var(--spacing-md);
    border-left: 4px solid var(--color-accent);
}

.testimonial-author {
    color: var(--color-text-light);
    font-weight: 500;
}

@media (max-width: 768px) {
    .testimonial-card {
        flex-direction: column;
        text-align: center;
    }

    .testimonial-text {
        border-left: none;
        padding-left: 0;
        border-top: 4px solid var(--color-accent);
        padding-top: var(--spacing-sm);
    }
}

/* ==========================================================================
   Profile Section (Horizontal Layout)
   ========================================================================== */

.profile-section {
    padding: calc(var(--spacing-2xl) * 1.5) 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
}

.profile-card-horizontal {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-2xl);
    align-items: flex-start;
    background: white;
    padding: var(--spacing-2xl);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 70, 140, 0.12);
}

.profile-left {
    flex-shrink: 0;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.profile-image-frame {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 70, 140, 0.2);
    position: relative;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

@media (hover: hover) {
    .profile-image-frame:hover .profile-image {
        transform: scale(1.05);
    }
}

.profile-licenses-compact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.license-badge-small {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    border: 2px solid rgba(0, 70, 140, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .license-badge-small:hover {
        transform: translateX(4px);
        border-color: var(--color-accent);
        box-shadow: 0 4px 12px rgba(0, 70, 140, 0.1);
    }
}

.license-icon-small {
    font-size: 1.5rem;
    line-height: 1;
}

.license-text-small {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-main);
    line-height: 1.4;
}

.profile-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.profile-name {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-main);
    letter-spacing: 0.03em;
    margin: 0;
}

.profile-badge-gold {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: var(--color-main);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.profile-title-sub {
    font-size: 1rem;
    font-weight: 600;
    color: #8B7500;
    margin: 0;
    padding-left: var(--spacing-sm);
    border-left: 4px solid #FFD700;
}

.profile-intro-text {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--color-text);
    margin: 0;
}

.profile-motto {
    background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
    padding: var(--spacing-lg);
    border-radius: 12px;
    border-left: 4px solid #FFD700;
    position: relative;
}

.motto-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-main);
    font-weight: 600;
    font-style: italic;
    margin: 0 0 var(--spacing-xs) 0;
    font-family: serif;
}

.motto-caption {
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-align: right;
    margin: 0;
    font-style: italic;
}

.profile-favorites-box {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: #fff9e6;
    border-radius: 8px;
}

.favorite-item-inline {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.favorite-icon-inline {
    font-size: 1.25rem;
}

.favorite-text-inline {
    font-size: 0.875rem;
    color: var(--color-text);
    font-weight: 500;
}

.profile-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(135deg, #004680 0%, #0066b3 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.125rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 70, 140, 0.3);
    align-self: flex-start;
}

@media (hover: hover) {
    .profile-cta-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 70, 140, 0.4);
    }

    .profile-cta-btn:hover svg {
        transform: translateX(4px);
    }
}

.profile-cta-btn svg {
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .profile-card-horizontal {
        flex-direction: column;
        padding: var(--spacing-xl) var(--spacing-lg);
    }

    .profile-left {
        width: 100%;
    }

    .profile-name {
        font-size: 1.875rem;
    }

    .motto-text {
        font-size: 1.125rem;
    }

    .profile-favorites-box {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .profile-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Flow Section
   ========================================================================== */

.flow-section {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.flow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.flow-step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 70, 140, 0.05);
}

.flow-number {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--color-main);
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: var(--spacing-sm);
}

.flow-title {
    margin-bottom: var(--spacing-xs);
    font-size: 1.25rem;
}

.flow-description {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.flow-arrow {
    font-size: 2rem;
    color: var(--color-accent);
    font-weight: 700;
}

@media (max-width: 768px) {
    .flow-arrow {
        display: none;
    }

    .flow-step {
        min-width: 100%;
    }
}

/* ==========================================================================
   Contact Section (Form with Enhanced UX)
   ========================================================================== */

.contact-section {
    padding: var(--spacing-2xl) 0;
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: 500;
    color: var(--color-main);
}

.required {
    color: #d32f2f;
    margin-left: 4px;
}

.form-group input,
.form-group textarea {
    padding: var(--spacing-sm);
    font-size: 16px;
    /* Minimum 16px for iOS Safari */
    font-family: var(--font-family-base);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border: 2px solid var(--color-accent);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15);
    transform: scale(1.01);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0a0a0;
    font-style: italic;
}

.submit-button {
    margin-top: var(--spacing-sm);
    align-self: center;
}

/* Form Response */
.success-message {
    text-align: center;
    padding: var(--spacing-lg);
    background: rgba(76, 175, 80, 0.1);
    border-radius: 12px;
    border: 2px solid #4CAF50;
}

.success-message svg {
    margin-bottom: var(--spacing-sm);
}

.success-message h3 {
    color: #4CAF50;
    margin-bottom: var(--spacing-xs);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    padding: var(--spacing-lg) 0;
    background: var(--color-main);
    color: var(--color-white);
    text-align: center;
}

.footer-text {
    margin: 0;
    opacity: 0.8;
}

/* ==========================================================================
   Animations
   ========================================================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-main) 0%, var(--color-secondary) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0, 70, 140, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (hover: hover) {
    .back-to-top:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 70, 140, 0.4);
    }
}

.back-to-top:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        width: 48px;
        height: 48px;
    }
}
