/* ========================================
   TurnFile 360 - M3 Homepage Styles
   Professional Modern Design
   ======================================== */

/* ========================================
   HEADER / NAVIGATION
   ======================================== */

.m3-header {
    position: sticky;
    top: 0;
    z-index: var(--m3-z-sticky);

    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 64px;
    padding: 0 var(--m3-space-6);

    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--m3-outline-variant);

    transition: background-color var(--m3-duration-normal) var(--m3-ease-standard);
}

.m3-header__logo {
    display: flex;
    align-items: center;
    gap: var(--m3-space-3);
    text-decoration: none;
}

.m3-header__logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.m3-header__logo-text {
    font-family: var(--m3-font-display);
    font-size: var(--m3-title-large);
    font-weight: var(--m3-weight-bold);
    color: var(--m3-on-surface);
    letter-spacing: var(--m3-tracking-tight);
}

.m3-header__nav {
    display: flex;
    align-items: center;
    gap: var(--m3-space-1);
}

.m3-header__nav-link {
    padding: var(--m3-space-2) var(--m3-space-4);

    font-size: var(--m3-label-large);
    font-weight: var(--m3-weight-medium);
    color: var(--m3-on-surface-variant);
    text-decoration: none;

    border-radius: var(--m3-shape-full);
    transition:
        background-color var(--m3-duration-fast) var(--m3-ease-standard),
        color var(--m3-duration-fast) var(--m3-ease-standard);
}

.m3-header__nav-link:hover {
    background: var(--m3-surface-container);
    color: var(--m3-on-surface);
}

.m3-header__nav-link--active {
    background: var(--m3-primary-container);
    color: var(--m3-on-primary-container);
}

/* Mobile menu toggle */
.m3-header__menu-toggle {
    display: none;
    padding: var(--m3-space-2);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--m3-on-surface);
}

@media (max-width: 768px) {
    .m3-header__nav {
        display: none;
    }

    .m3-header__menu-toggle {
        display: flex;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */

.m3-hero {
    position: relative;
    padding: var(--m3-space-24) var(--m3-space-6) var(--m3-space-16);
    text-align: center;
    overflow: hidden;

    /* Sophisticated gradient - deep indigo with subtle variation */
    background:
        linear-gradient(135deg,
            var(--m3-primary-20) 0%,
            var(--m3-primary-30) 40%,
            var(--m3-primary-40) 100%);

    /* Subtle noise texture for depth */
    background-size: 100% 100%;
}

/* Subtle decorative shapes */
.m3-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 100%;

    background: radial-gradient(ellipse at center,
            rgba(255, 255, 255, 0.06) 0%,
            transparent 70%);

    pointer-events: none;
}

.m3-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 50%;
    height: 80%;

    background: radial-gradient(ellipse at center,
            rgba(68, 149, 149, 0.1) 0%,
            transparent 70%);

    pointer-events: none;
}

.m3-hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/* Trust badges */
.m3-hero__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--m3-space-2);
    margin-bottom: var(--m3-space-6);
}

.m3-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--m3-space-2);

    padding: var(--m3-space-2) var(--m3-space-4);

    font-size: var(--m3-label-medium);
    font-weight: var(--m3-weight-medium);
    color: rgba(255, 255, 255, 0.95);

    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--m3-shape-full);
}

.m3-hero__badge-icon {
    font-size: 1rem;
}

/* Main headline */
.m3-hero__title {
    font-family: var(--m3-font-display);
    font-size: clamp(2.5rem, 5vw, var(--m3-display-large));
    font-weight: var(--m3-weight-bold);
    line-height: 1.1;
    letter-spacing: var(--m3-tracking-tight);

    color: white;
    margin-bottom: var(--m3-space-4);

    /* Subtle text shadow for depth */
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}

.m3-hero__title-highlight {
    /* Gradient text effect */
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(200, 210, 254, 1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtitle */
.m3-hero__subtitle {
    font-size: var(--m3-body-large);
    font-weight: var(--m3-weight-regular);
    line-height: var(--m3-leading-relaxed);

    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    margin: 0 auto var(--m3-space-8);
}

/* CTA Buttons */
.m3-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--m3-space-4);
}

.m3-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--m3-space-2);

    padding: var(--m3-space-4) var(--m3-space-8);

    font-family: var(--m3-font-family);
    font-size: var(--m3-body-large);
    font-weight: var(--m3-weight-semibold);
    text-decoration: none;

    border-radius: var(--m3-shape-full);
    border: none;
    cursor: pointer;

    transition:
        transform var(--m3-duration-fast) var(--m3-ease-spring-soft),
        box-shadow var(--m3-duration-fast) var(--m3-ease-standard);
}

.m3-hero__cta:active {
    transform: scale(0.98);
}

.m3-hero__cta--primary {
    background: white;
    color: var(--m3-primary-30);
    box-shadow: var(--m3-elevation-2);
}

.m3-hero__cta--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--m3-elevation-4);
}

.m3-hero__cta--secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.m3-hero__cta--secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ========================================
   TOOLS SECTION
   ======================================== */

.m3-tools-section {
    padding: var(--m3-space-16) var(--m3-space-6);
    background: var(--m3-surface);
}

.m3-tools-section__header {
    text-align: center;
    margin-bottom: var(--m3-space-10);
}

.m3-tools-section__title {
    font-family: var(--m3-font-display);
    font-size: var(--m3-headline-large);
    font-weight: var(--m3-weight-semibold);
    color: var(--m3-on-surface);
    margin-bottom: var(--m3-space-2);
}

.m3-tools-section__subtitle {
    font-size: var(--m3-body-large);
    color: var(--m3-on-surface-variant);
}

/* Tools Grid */
.m3-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--m3-space-4);
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 1200px) {
    .m3-tools-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 600px) {
    .m3-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--m3-space-3);
    }
}

/* Tool Card */
.m3-tool-card {
    display: flex;
    flex-direction: column;
    padding: var(--m3-space-5);

    background: var(--m3-surface-container-low);
    border: 1px solid transparent;
    border-radius: var(--m3-shape-lg);

    text-decoration: none;

    transition:
        transform var(--m3-duration-normal) var(--m3-ease-spring-soft),
        box-shadow var(--m3-duration-normal) var(--m3-ease-standard),
        border-color var(--m3-duration-fast) var(--m3-ease-standard),
        background-color var(--m3-duration-fast) var(--m3-ease-standard);
}

.m3-tool-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--m3-elevation-3);
    background: var(--m3-surface);
    border-color: var(--m3-outline-variant);
}

.m3-tool-card:active {
    transform: translateY(-2px);
}

.m3-tool-card:focus-visible {
    outline: 2px solid var(--m3-primary);
    outline-offset: 2px;
}

.m3-tool-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--m3-primary-container);
    color: var(--m3-on-primary-container);
    border-radius: var(--m3-shape-md);
    margin-bottom: var(--m3-space-3);

    font-size: 1.5rem;

    transition:
        background-color var(--m3-duration-fast) var(--m3-ease-standard),
        transform var(--m3-duration-fast) var(--m3-ease-spring-soft);
}

.m3-tool-card:hover .m3-tool-card__icon {
    background: var(--m3-primary);
    color: var(--m3-on-primary);
    transform: scale(1.05);
}

.m3-tool-card__title {
    font-size: var(--m3-title-small);
    font-weight: var(--m3-weight-semibold);
    color: var(--m3-on-surface);
    margin-bottom: var(--m3-space-1);
}

.m3-tool-card__desc {
    font-size: var(--m3-body-small);
    color: var(--m3-on-surface-variant);
    line-height: var(--m3-leading-snug);
}

/* ========================================
   FEATURES SECTION
   ======================================== */

.m3-features-section {
    padding: var(--m3-space-16) var(--m3-space-6);
    background: var(--m3-surface-container-lowest);
}

.m3-features-section__header {
    text-align: center;
    margin-bottom: var(--m3-space-12);
}

.m3-features-section__title {
    font-family: var(--m3-font-display);
    font-size: var(--m3-headline-large);
    font-weight: var(--m3-weight-semibold);
    color: var(--m3-on-surface);
    margin-bottom: var(--m3-space-2);
}

.m3-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--m3-space-8);
    max-width: 1100px;
    margin: 0 auto;
}

/* Feature Card */
.m3-feature-card {
    text-align: center;
    padding: var(--m3-space-6);
}

.m3-feature-card__icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--m3-primary-95);
    color: var(--m3-primary-40);
    border-radius: var(--m3-shape-xl);
    margin: 0 auto var(--m3-space-5);

    font-size: 2rem;

    transition:
        background-color var(--m3-duration-normal) var(--m3-ease-standard),
        transform var(--m3-duration-normal) var(--m3-ease-spring-soft);
}

.m3-feature-card:hover .m3-feature-card__icon {
    background: var(--m3-primary-90);
    transform: scale(1.05);
}

.m3-feature-card__title {
    font-size: var(--m3-title-large);
    font-weight: var(--m3-weight-semibold);
    color: var(--m3-on-surface);
    margin-bottom: var(--m3-space-2);
}

.m3-feature-card__desc {
    font-size: var(--m3-body-medium);
    color: var(--m3-on-surface-variant);
    line-height: var(--m3-leading-relaxed);
}

/* ========================================
   HOW IT WORKS SECTION
   ======================================== */

.m3-workflow-section {
    padding: var(--m3-space-16) var(--m3-space-6);
    background: var(--m3-surface);
}

.m3-workflow-section__header {
    text-align: center;
    margin-bottom: var(--m3-space-12);
}

.m3-workflow-section__title {
    font-family: var(--m3-font-display);
    font-size: var(--m3-headline-large);
    font-weight: var(--m3-weight-semibold);
    color: var(--m3-on-surface);
}

.m3-workflow-grid {
    display: flex;
    justify-content: center;
    gap: var(--m3-space-8);
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.m3-workflow-step {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    text-align: center;
    padding: var(--m3-space-4);

    position: relative;
}

/* Connector line between steps */
.m3-workflow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 36px;
    right: -32px;
    width: 64px;
    height: 2px;
    background: var(--m3-outline-variant);
}

@media (max-width: 768px) {
    .m3-workflow-step:not(:last-child)::after {
        display: none;
    }
}

.m3-workflow-step__number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--m3-primary);
    color: var(--m3-on-primary);
    border-radius: 50%;
    margin: 0 auto var(--m3-space-4);

    font-size: var(--m3-title-medium);
    font-weight: var(--m3-weight-bold);
}

.m3-workflow-step__title {
    font-size: var(--m3-title-medium);
    font-weight: var(--m3-weight-semibold);
    color: var(--m3-on-surface);
    margin-bottom: var(--m3-space-2);
}

.m3-workflow-step__desc {
    font-size: var(--m3-body-small);
    color: var(--m3-on-surface-variant);
    line-height: var(--m3-leading-relaxed);
}

/* ========================================
   FOOTER
   ======================================== */

.m3-footer {
    padding: var(--m3-space-12) var(--m3-space-6) var(--m3-space-8);
    background: var(--m3-neutral-10);
    color: var(--m3-neutral-80);
}

.m3-footer__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--m3-space-10);
    max-width: 1200px;
    margin: 0 auto var(--m3-space-10);
}

.m3-footer__brand {
    max-width: 280px;
}

.m3-footer__logo {
    display: flex;
    align-items: center;
    gap: var(--m3-space-3);
    margin-bottom: var(--m3-space-4);
    text-decoration: none;
}

.m3-footer__logo-img {
    width: 32px;
    height: 32px;
}

.m3-footer__logo-text {
    font-size: var(--m3-title-medium);
    font-weight: var(--m3-weight-bold);
    color: var(--m3-neutral-95);
}

.m3-footer__tagline {
    font-size: var(--m3-body-small);
    color: var(--m3-neutral-60);
    line-height: var(--m3-leading-relaxed);
}

.m3-footer__section-title {
    font-size: var(--m3-label-large);
    font-weight: var(--m3-weight-semibold);
    color: var(--m3-neutral-95);
    margin-bottom: var(--m3-space-4);
    text-transform: uppercase;
    letter-spacing: var(--m3-tracking-wider);
}

.m3-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.m3-footer__link {
    display: block;
    padding: var(--m3-space-2) 0;
    font-size: var(--m3-body-small);
    color: var(--m3-neutral-60);
    text-decoration: none;
    transition: color var(--m3-duration-fast) var(--m3-ease-standard);
}

.m3-footer__link:hover {
    color: var(--m3-neutral-95);
}

.m3-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--m3-space-4);

    padding-top: var(--m3-space-6);
    border-top: 1px solid var(--m3-neutral-25);
    max-width: 1200px;
    margin: 0 auto;
}

.m3-footer__copyright {
    font-size: var(--m3-body-small);
    color: var(--m3-neutral-50);
}

.m3-footer__social {
    display: flex;
    gap: var(--m3-space-3);
}

.m3-footer__social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--m3-neutral-60);
    background: var(--m3-neutral-20);
    border-radius: 50%;
    text-decoration: none;

    transition:
        background-color var(--m3-duration-fast) var(--m3-ease-standard),
        color var(--m3-duration-fast) var(--m3-ease-standard);
}

.m3-footer__social-link:hover {
    background: var(--m3-primary);
    color: var(--m3-on-primary);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .m3-hero {
        padding: var(--m3-space-12) var(--m3-space-4) var(--m3-space-10);
    }

    .m3-hero__title {
        font-size: 2rem;
    }

    .m3-hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .m3-hero__cta {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .m3-tools-section,
    .m3-features-section,
    .m3-workflow-section {
        padding: var(--m3-space-10) var(--m3-space-4);
    }

    .m3-features-grid {
        gap: var(--m3-space-6);
    }

    .m3-workflow-grid {
        flex-direction: column;
        align-items: center;
    }

    .m3-workflow-step {
        max-width: 100%;
    }
}

/* ========================================
   LEGACY CLASS COMPATIBILITY
   Apply M3 styling to existing tool-card-home
   ======================================== */

.m3-tools-grid .tool-card-home {
    display: flex;
    flex-direction: column;
    padding: var(--m3-space-5);

    background: var(--m3-surface-container-low);
    border: 1px solid transparent;
    border-radius: var(--m3-shape-lg);

    text-decoration: none;
    position: relative;

    transition:
        transform var(--m3-duration-normal) var(--m3-ease-spring-soft),
        box-shadow var(--m3-duration-normal) var(--m3-ease-standard),
        border-color var(--m3-duration-fast) var(--m3-ease-standard),
        background-color var(--m3-duration-fast) var(--m3-ease-standard);
}

.m3-tools-grid .tool-card-home:hover {
    transform: translateY(-6px);
    box-shadow: var(--m3-elevation-3);
    background: var(--m3-surface);
    border-color: var(--m3-outline-variant);
}

.m3-tools-grid .tool-card-home:active {
    transform: translateY(-2px);
}

.m3-tools-grid .tool-card-home:focus-visible {
    outline: 2px solid var(--m3-primary);
    outline-offset: 2px;
}

.m3-tools-grid .tool-icon-home {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--m3-primary-container);
    color: var(--m3-on-primary-container);
    border-radius: var(--m3-shape-md);
    margin-bottom: var(--m3-space-3);

    font-size: 1.5rem;
    box-shadow: none;

    transition:
        background-color var(--m3-duration-fast) var(--m3-ease-standard),
        transform var(--m3-duration-fast) var(--m3-ease-spring-soft);
}

.m3-tools-grid .tool-card-home:hover .tool-icon-home {
    background: var(--m3-primary);
    color: var(--m3-on-primary);
    transform: scale(1.05);
}

.m3-tools-grid .tool-name-home {
    font-family: var(--m3-font-family);
    font-size: var(--m3-title-small);
    font-weight: var(--m3-weight-semibold);
    color: var(--m3-on-surface);
    margin-bottom: var(--m3-space-1);
}

.m3-tools-grid .tool-desc-home {
    font-family: var(--m3-font-family);
    font-size: var(--m3-body-small);
    color: var(--m3-on-surface-variant);
    line-height: var(--m3-leading-snug);
}

/* ========================================
   PROFESSIONAL SVG ICON SYSTEM
   Replace emoji with clean vector icons
   ======================================== */

/* Hide emoji text content in icon containers */
.m3-tools-grid .tool-icon-home {
    font-size: 0 !important;
    position: relative;
    overflow: hidden !important;
}

/* Show SVG icon instead */
.m3-tools-grid .tool-icon-home::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    filter: brightness(0) saturate(100%) invert(26%) sepia(54%) saturate(1106%) hue-rotate(208deg) brightness(91%) contrast(88%) !important;
}

/* Default document icon */
.m3-tools-grid .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
}

/* Merge PDF - Files combining */
.m3-tools-grid .tool-card-home[href*="merge"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 16v6'/%3E%3Cpath d='M16 6V0'/%3E%3Cpath d='M16 16l-4-4 4-4'/%3E%3Cpath d='M8 8v8'/%3E%3Crect x='4' y='4' width='8' height='16' rx='1'/%3E%3Cpath d='M12 20h8a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1h-8'/%3E%3C/svg%3E");
}

/* Split PDF - Scissors */
.m3-tools-grid .tool-card-home[href*="split"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cline x1='20' y1='4' x2='8.12' y2='15.88'/%3E%3Cline x1='14.47' y1='14.48' x2='20' y2='20'/%3E%3Cline x1='8.12' y1='8.12' x2='12' y2='12'/%3E%3C/svg%3E");
}

/* Compress PDF - Minimize */
.m3-tools-grid .tool-card-home[href*="compress"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 14 10 14 10 20'/%3E%3Cpolyline points='20 10 14 10 14 4'/%3E%3Cline x1='14' y1='10' x2='21' y2='3'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
}

/* PDF to Word - File text */
.m3-tools-grid .tool-card-home[href*="pdf-to-word"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E");
}

/* Image - Frame */
.m3-tools-grid .tool-card-home[href*="jpg"] .tool-icon-home::before,
.m3-tools-grid .tool-card-home[href*="png"] .tool-icon-home::before,
.m3-tools-grid .tool-card-home[href*="file-converter"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
}

/* Form Resizer - Crop */
.m3-tools-grid .tool-card-home[href*="resizer"] .tool-icon-home::before,
.m3-tools-grid .tool-card-home[href*="form-resizer"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.13 1L6 16a2 2 0 0 0 2 2h15'/%3E%3Cpath d='M1 6.13L16 6a2 2 0 0 1 2 2v15'/%3E%3C/svg%3E");
}

/* Text to PDF - Align left */
.m3-tools-grid .tool-card-home[href*="text-to-pdf"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='17' y1='10' x2='3' y2='10'/%3E%3Cline x1='21' y1='6' x2='3' y2='6'/%3E%3Cline x1='21' y1='14' x2='3' y2='14'/%3E%3Cline x1='17' y1='18' x2='3' y2='18'/%3E%3C/svg%3E");
}

/* Sign PDF - Edit pen */
.m3-tools-grid .tool-card-home[href*="sign"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19l7-7 3 3-7 7-3-3z'/%3E%3Cpath d='M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z'/%3E%3Cpath d='M2 2l7.586 7.586'/%3E%3Ccircle cx='11' cy='11' r='2'/%3E%3C/svg%3E");
}

/* Rotate - Rotate CW */
.m3-tools-grid .tool-card-home[href*="rotate"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpath d='M20.49 15a9 9 0 1 1-2.12-9.36L23 10'/%3E%3C/svg%3E");
}

/* Protect/Lock - Shield */
.m3-tools-grid .tool-card-home[href*="protect"] .tool-icon-home::before,
.m3-tools-grid .tool-card-home[href*="password"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}

/* Unlock - Unlock */
.m3-tools-grid .tool-card-home[href*="unlock"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 9.9-1'/%3E%3C/svg%3E");
}

/* Watermark - Droplet */
.m3-tools-grid .tool-card-home[href*="watermark"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z'/%3E%3C/svg%3E");
}

/* Page numbers - Hash */
.m3-tools-grid .tool-card-home[href*="page-number"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='9' x2='20' y2='9'/%3E%3Cline x1='4' y1='15' x2='20' y2='15'/%3E%3Cline x1='10' y1='3' x2='8' y2='21'/%3E%3Cline x1='16' y1='3' x2='14' y2='21'/%3E%3C/svg%3E");
}

/* OCR/Text Extract - Scan */
.m3-tools-grid .tool-card-home[href*="file-to-text"] .tool-icon-home::before,
.m3-tools-grid .tool-card-home[href*="ocr"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7V5a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M17 3h2a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M21 17v2a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M7 21H5a2 2 0 0 1-2-2v-2'/%3E%3Cline x1='7' y1='12' x2='17' y2='12'/%3E%3C/svg%3E");
}

/* Excel - Table */
.m3-tools-grid .tool-card-home[href*="excel"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18'/%3E%3C/svg%3E");
}

/* PPT - Presentation */
.m3-tools-grid .tool-card-home[href*="ppt"] .tool-icon-home::before,
.m3-tools-grid .tool-card-home[href*="powerpoint"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
}

/* Organize/Reorder - Move */
.m3-tools-grid .tool-card-home[href*="organize"] .tool-icon-home::before,
.m3-tools-grid .tool-card-home[href*="reorder"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 9 2 12 5 15'/%3E%3Cpolyline points='9 5 12 2 15 5'/%3E%3Cpolyline points='15 19 12 22 9 19'/%3E%3Cpolyline points='19 9 22 12 19 15'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cline x1='12' y1='2' x2='12' y2='22'/%3E%3C/svg%3E");
}

/* Remove pages - Trash */
.m3-tools-grid .tool-card-home[href*="remove"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3C/svg%3E");
}

/* Extract - Download */
.m3-tools-grid .tool-card-home[href*="extract"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
}

/* QR Code - QR */
.m3-tools-grid .tool-card-home[href*="qr"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Cpath d='M14 14h7v7'/%3E%3C/svg%3E");
}

/* Support/Email - Mail */
.m3-tools-grid .tool-card-home[href*="mailto"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
}

/* Remove BG - Eraser */
.m3-tools-grid .tool-card-home[href*="remove-bg"] .tool-icon-home::before,
.m3-tools-grid .tool-card-home[href*="remove-background"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20H7L3 16c-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0l5.9 5.9c.6.6.6 1.5 0 2.1L13 20'/%3E%3Cpath d='M6 11l5 5'/%3E%3C/svg%3E");
}

/* Batch Rename - Edit */
.m3-tools-grid .tool-card-home[href*="batch-rename"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
}

/* URL/Link - Link */
.m3-tools-grid .tool-card-home[href*="url-shortener"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
}

/* Reader - Book */
.m3-tools-grid .tool-card-home[href*="reader"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
}

/* Editor - Edit 3 */
.m3-tools-grid .tool-card-home[href*="editor"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z'/%3E%3C/svg%3E");
}

/* PDF to Image - Image */
.m3-tools-grid .tool-card-home[href*="pdf-to-image"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
}

/* Crop Image - Crop */
.m3-tools-grid .tool-card-home[href*="crop-image"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.13 1L6 16a2 2 0 0 0 2 2h15'/%3E%3Cpath d='M1 6.13L16 6a2 2 0 0 1 2 2v15'/%3E%3C/svg%3E");
}

/* Compress Image - Minimize arrows */
.m3-tools-grid .tool-card-home[href*="compress-image"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 14 10 14 10 20'/%3E%3Cpolyline points='20 10 14 10 14 4'/%3E%3Cline x1='14' y1='10' x2='21' y2='3'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
}

/* Webpage to PDF - Globe */
.m3-tools-grid .tool-card-home[href*="webpage"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
}

/* Repair PDF - Tool/Wrench */
.m3-tools-grid .tool-card-home[href*="repair"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
}

/* Smart Processor - Zap/Lightning */
.m3-tools-grid .tool-card-home[href*="smart-processor"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E");
}

/* Image Editor - Palette */
.m3-tools-grid .tool-card-home[href*="image-editor"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13.5' cy='6.5' r='.5'/%3E%3Ccircle cx='17.5' cy='10.5' r='.5'/%3E%3Ccircle cx='8.5' cy='7.5' r='.5'/%3E%3Ccircle cx='6.5' cy='12.5' r='.5'/%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.555C21.965 6.012 17.461 2 12 2z'/%3E%3C/svg%3E");
}

/* Add Page Numbers - Hash */
.m3-tools-grid .tool-card-home[href*="add-page-numbers"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='9' x2='20' y2='9'/%3E%3Cline x1='4' y1='15' x2='20' y2='15'/%3E%3Cline x1='10' y1='3' x2='8' y2='21'/%3E%3Cline x1='16' y1='3' x2='14' y2='21'/%3E%3C/svg%3E");
}

/* QR Generator - QR code */
.m3-tools-grid .tool-card-home[href*="qr-generator"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Cpath d='M14 14h7v7'/%3E%3C/svg%3E");
}

/* Remove Background - Eraser */
.m3-tools-grid .tool-card-home[href*="remove-background"] .tool-icon-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20H7L3 16c-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0l5.9 5.9c.6.6.6 1.5 0 2.1L13 20'/%3E%3Cpath d='M6 11l5 5'/%3E%3C/svg%3E");
}

/* On hover, change icon color to white */
.m3-tools-grid .tool-card-home:hover .tool-icon-home::before {
    filter: brightness(0) invert(1) !important;
}

/* ========================================
   COLLAPSIBLE SECTIONS
   Hidden by default, revealed on click
   ======================================== */

.m3-collapsible {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height var(--m3-duration-slow) var(--m3-ease-standard),
        opacity var(--m3-duration-normal) var(--m3-ease-standard);
}

.m3-collapsible.is-open {
    max-height: 5000px;
    opacity: 1;
}

.m3-collapsible-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--m3-space-2);

    padding: var(--m3-space-3) var(--m3-space-6);
    margin-top: var(--m3-space-4);

    font-family: var(--m3-font-family);
    font-size: var(--m3-body-medium);
    font-weight: var(--m3-weight-medium);
    color: var(--m3-primary);

    background: transparent;
    border: 1.5px solid var(--m3-primary);
    border-radius: var(--m3-shape-full);

    cursor: pointer;
    transition:
        background-color var(--m3-duration-fast) var(--m3-ease-standard),
        color var(--m3-duration-fast) var(--m3-ease-standard);
}

.m3-collapsible-toggle:hover {
    background: var(--m3-primary);
    color: var(--m3-on-primary);
}

.m3-collapsible-toggle__icon {
    display: inline-block;
    transition: transform var(--m3-duration-normal) var(--m3-ease-spring-soft);
}

.m3-collapsible-toggle.is-open .m3-collapsible-toggle__icon {
    transform: rotate(180deg);
}

/* ========================================
   BACK TO TOP BUTTON - M3 STYLED
   ======================================== */

.m3-back-to-top {
    position: fixed;
    bottom: var(--m3-space-6);
    right: var(--m3-space-6);
    z-index: var(--m3-z-fixed);

    width: 56px;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--m3-primary);
    color: var(--m3-on-primary);
    border: none;
    border-radius: var(--m3-shape-lg);

    box-shadow: var(--m3-elevation-3);
    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);

    transition:
        opacity var(--m3-duration-normal) var(--m3-ease-standard),
        visibility var(--m3-duration-normal) var(--m3-ease-standard),
        transform var(--m3-duration-normal) var(--m3-ease-spring-soft),
        background-color var(--m3-duration-fast) var(--m3-ease-standard);
}

.m3-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.m3-back-to-top:hover {
    background: var(--m3-primary-40);
    box-shadow: var(--m3-elevation-4);
    transform: translateY(-2px);
}

.m3-back-to-top:active {
    transform: translateY(0);
}

.m3-back-to-top svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    flex-shrink: 0;
}

/* ========================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {

    /* Back to top - smaller on mobile */
    .m3-back-to-top {
        width: 48px;
        height: 48px;
        bottom: var(--m3-space-4);
        right: var(--m3-space-4);
    }

    .m3-back-to-top svg {
        width: 20px;
        height: 20px;
    }

    /* Better touch targets */
    .m3-tools-grid .tool-card-home {
        min-height: 100px;
        padding: var(--m3-space-4);
    }

    /* Collapsible toggle full width on mobile */
    .m3-collapsible-toggle {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   TRUST INDICATORS - COMPACT M3 STYLE
   ======================================== */

.m3-trust-section {
    padding: var(--m3-space-10) var(--m3-space-6);
    background: var(--m3-surface-container-lowest);
}

.m3-trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--m3-space-4);
    max-width: 900px;
    margin: 0 auto;
}

.m3-trust-item {
    text-align: center;
    padding: var(--m3-space-4);
}

.m3-trust-item__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto var(--m3-space-3);

    background: var(--m3-primary-95);
    color: var(--m3-primary-40);
    border-radius: var(--m3-shape-md);

    font-size: 1.5rem;
}

.m3-trust-item__title {
    font-size: var(--m3-title-small);
    font-weight: var(--m3-weight-semibold);
    color: var(--m3-on-surface);
    margin-bottom: var(--m3-space-1);
}

.m3-trust-item__desc {
    font-size: var(--m3-body-small);
    color: var(--m3-on-surface-variant);
}

/* ========================================
   PRIVACY BANNER - COMPACT
   ======================================== */

.m3-privacy-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--m3-space-4);
    flex-wrap: wrap;

    padding: var(--m3-space-4) var(--m3-space-6);
    margin: var(--m3-space-8) auto;
    max-width: 800px;

    background: var(--m3-tertiary-95);
    border: 1px solid var(--m3-tertiary-80);
    border-radius: var(--m3-shape-lg);
}

.m3-privacy-banner__icon {
    font-size: 1.5rem;
}

.m3-privacy-banner__text {
    font-size: var(--m3-body-medium);
    color: var(--m3-on-tertiary-container);
    font-weight: var(--m3-weight-medium);
}

/* ========================================
   HIDE REDUNDANT SECTIONS BY DEFAULT
   ======================================== */

/* These will be shown via JS toggle */
#howItWorksContent,
#whyChooseContent {
    display: none;
}

#howItWorksContent.is-visible,
#whyChooseContent.is-visible {
    display: block;
}