/* ============================================
   WHAT THE HAND - Registration Portal CSS
   Handmade aesthetic with microinteractions
   ============================================ */
/* ============================================
   SelfHosted Fonts
   ============================================ */
/*latin*/

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("Fonts/poppins-300-latin.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Fonts/poppins-400-latin.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("Fonts/poppins-500-latin.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("Fonts/poppins-600-latin.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("Fonts/poppins-700-latin.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/*latin-ext*/
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("Fonts/poppins-300-latin-ext.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Fonts/poppins-400-latin-ext.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("Fonts/poppins-500-latin-ext.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("Fonts/poppins-600-latin-ext.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("Fonts/poppins-700-latin-ext.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================
   CSS VARIABLES - Color Palette
   ============================================ */
:root {
    /* Primary Colors - Earthy, Handmade Feel */
    --wth-primary: #5D7A4A;
    --wth-primary-light: #7A9B64;
    --wth-primary-dark: #4A6339;

    --wth-secondary: #8B6914;
    --wth-secondary-light: #A88530;
    --wth-secondary-dark: #6E5410;

    --wth-tertiary: #C9963A;
    --wth-tertiary-light: #D9AD5A;
    --wth-tertiary-dark: #A87A2E;

    /* Background Colors */
    --wth-bg: #FAF8F5;
    --wth-bg-alt: #F5F3F0;
    --wth-bg-warm: #FDF9F4;
    --wth-surface: #FFFFFF;

    /* Text Colors */
    --wth-text: #2D2A26;
    --wth-text-secondary: #5A5650;
    --wth-text-muted: #8B8680;

    /* Border & Lines */
    --wth-border: #E8E4DF;
    --wth-border-light: #F0EDE8;

    /* Shadows */
    --wth-shadow-sm: 0 2px 8px rgba(45, 42, 38, 0.06);
    --wth-shadow-md: 0 4px 20px rgba(45, 42, 38, 0.08);
    --wth-shadow-lg: 0 8px 40px rgba(45, 42, 38, 0.12);
    --wth-shadow-glow: 0 0 30px rgba(201, 150, 58, 0.15);

    /* Transitions */
    --wth-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --wth-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --wth-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --wth-radius-sm: 8px;
    --wth-radius-md: 12px;
    --wth-radius-lg: 16px;
    --wth-radius-xl: 24px;
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--wth-bg);
    font-family: 'Poppins', 'Spartan', Arial, sans-serif;
    color: var(--wth-text);
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   HANDMADE BACKGROUND PATTERN
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 10% 20%, rgba(93, 122, 74, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(201, 150, 58, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 105, 20, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle grid pattern */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(93, 122, 74, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(93, 122, 74, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--wth-text);
    margin-bottom: 0.5em;
    line-height: 1.3;
}

/* ============================================
   MICROINTERACTION #4: Paper Cards with Hover
   ============================================ */
.mud-paper {
    transition:
        transform var(--wth-transition),
        box-shadow var(--wth-transition),
        border-color var(--wth-transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.mud-paper:hover {
    transform: translateY(-2px);
    box-shadow: var(--wth-shadow-md);
    border-color: var(--wth-border);
}

/* Subtle shine effect on hover */
.mud-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.mud-paper:hover::before {
    transform: translateX(100%);
}

/* ============================================
   MICROINTERACTION #5: Button Animations
   ============================================ */
.mud-button-root {
    transition:
        transform var(--wth-transition-fast),
        box-shadow var(--wth-transition-fast),
        background-color var(--wth-transition-fast);
    position: relative;
    overflow: hidden;
}

.mud-button-root:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--wth-shadow-md);
}

.mud-button-root:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

/* Ripple enhancement */
.mud-button-root::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.mud-button-root:active::after {
    width: 200%;
    height: 200%;
    opacity: 0;
}

/* ============================================
   MICROINTERACTION #6: Input Focus Glow
   ============================================ */
.mud-input-control {
    transition: all var(--wth-transition);
}

.mud-input-control .mud-input-slot {
    transition:
        border-color var(--wth-transition),
        box-shadow var(--wth-transition);
}

.mud-input-control:focus-within .mud-input-slot {
    box-shadow: 0 0 0 3px rgba(93, 122, 74, 0.15);
}

.mud-input-control:focus-within .mud-input-outlined-border {
    border-color: var(--wth-primary) !important;
}

/* Label animation */
.mud-input-label {
    transition:
        color var(--wth-transition),
        transform var(--wth-transition);
}

.mud-input-control:focus-within .mud-input-label {
    color: var(--wth-primary);
}

/* ============================================
   MICROINTERACTION #7: Checkbox/Radio Bounce
   ============================================ */
.mud-checkbox .mud-button-root,
.mud-radio .mud-button-root {
    transition: transform var(--wth-transition);
}

.mud-checkbox .mud-button-root:active,
.mud-radio .mud-button-root:active {
    transform: scale(0.9);
}

.mud-checkbox-input:checked + .mud-button-root,
.mud-radio-input:checked + .mud-button-root {
    animation: checkBounce 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ============================================
   MICROINTERACTION #8: List Item Slide
   ============================================ */
.mud-list-item {
    transition:
        background-color var(--wth-transition),
        padding-left var(--wth-transition),
        border-left-color var(--wth-transition);
    border-left: 3px solid transparent;
}

.mud-list-item:hover {
    background-color: var(--wth-bg-alt);
    padding-left: calc(16px + 5px);
    border-left-color: var(--wth-primary);
}

/* ============================================
   MICROINTERACTION #9: Image Zoom on Hover
   ============================================ */
.mud-image {
    transition: transform var(--wth-transition-slow);
    overflow: hidden;
}

.mud-image:hover {
    transform: scale(1.02);
}

/* Image container wrapper */
.image-hover-zoom {
    overflow: hidden;
    border-radius: var(--wth-radius-md);
}

.image-hover-zoom .mud-image {
    transition: transform 0.5s ease;
}

.image-hover-zoom:hover .mud-image {
    transform: scale(1.05);
}

/* ============================================
   MICROINTERACTION #10: Link Underline Animation
   ============================================ */
.mud-link {
    position: relative;
    text-decoration: none;
    transition: color var(--wth-transition);
}

.mud-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--wth-primary), var(--wth-tertiary));
    transition: width var(--wth-transition);
    border-radius: 2px;
}

.mud-link:hover::after {
    width: 100%;
}

.mud-link:hover {
    color: var(--wth-primary);
}

/* ============================================
   FORM SECTION HEADERS
   ============================================ */
.section-header {
    position: relative;
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--wth-primary), var(--wth-tertiary));
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* ============================================
   STAGGERED ANIMATION FOR FORM ITEMS --removed
   ============================================ */
/*.mud-grid > .mud-grid-item {
    opacity: 0;
    animation: fadeInStagger 0.5s ease forwards;
}

.mud-grid > .mud-grid-item:nth-child(1) { animation-delay: 0.1s; }
.mud-grid > .mud-grid-item:nth-child(2) { animation-delay: 0.15s; }
.mud-grid > .mud-grid-item:nth-child(3) { animation-delay: 0.2s; }
.mud-grid > .mud-grid-item:nth-child(4) { animation-delay: 0.25s; }
.mud-grid > .mud-grid-item:nth-child(5) { animation-delay: 0.3s; }
.mud-grid > .mud-grid-item:nth-child(6) { animation-delay: 0.35s; }
.mud-grid > .mud-grid-item:nth-child(7) { animation-delay: 0.4s; }
.mud-grid > .mud-grid-item:nth-child(8) { animation-delay: 0.45s; }
.mud-grid > .mud-grid-item:nth-child(9) { animation-delay: 0.5s; }
.mud-grid > .mud-grid-item:nth-child(10) { animation-delay: 0.55s; }
.mud-grid > .mud-grid-item:nth-child(n+11) { animation-delay: 0.6s; }

@keyframes fadeInStagger {
    from {
        opacity: 0;
        animation: fadeInStagger 0.5s ease forwards;
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}*/

/* ============================================
   SUCCESS/THANK YOU PAGE STYLES
   ============================================ */
.success-icon {
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.celebration-text {
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from { text-shadow: 0 0 10px rgba(93, 122, 74, 0.3); }
    to { text-shadow: 0 0 20px rgba(201, 150, 58, 0.4); }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--wth-bg-alt);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--wth-primary-light), var(--wth-primary));
    border-radius: 5px;
    border: 2px solid var(--wth-bg-alt);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--wth-primary), var(--wth-primary-dark));
}

/* ============================================
   FILE UPLOAD AREA
   ============================================ */
.mud-file-upload {
    border: 2px dashed var(--wth-border);
    border-radius: var(--wth-radius-md);
    padding: 1.5rem;
    text-align: center;
    transition:
        border-color var(--wth-transition),
        background-color var(--wth-transition);
    background: var(--wth-bg-alt);
}

.mud-file-upload:hover {
    border-color: var(--wth-primary);
    background: var(--wth-bg-warm);
}

.mud-file-upload:active {
    border-color: var(--wth-tertiary);
    background: rgba(201, 150, 58, 0.05);
}

/* ============================================
   TABS STYLING
   ============================================ */
.mud-tabs {
    border-radius: var(--wth-radius-md);
    overflow: hidden;
}

.mud-tab {
    transition:
        background-color var(--wth-transition),
        color var(--wth-transition);
}

.mud-tab:hover:not(.mud-tab-active) {
    background-color: var(--wth-bg-alt);
}

/* ============================================
   ALERT STYLING
   ============================================ */
.mud-alert {
    border-radius: var(--wth-radius-md);
    animation: alertSlide 0.3s ease;
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Tablet */
@media (max-width: 960px) {
    .mud-paper:hover {
        transform: none;
    }

    .mud-button-root:hover:not(:disabled) {
        transform: none;
    }

    .mud-list-item:hover {
        padding-left: 16px;
    }

    .image-hover-zoom:hover .mud-image {
        transform: none;
    }
}

/* Mobile - max 600px */
@media (max-width: 600px) {
    :root {
        --wth-radius-md: 8px;
        --wth-radius-lg: 12px;
    }

    /* Prevent horizontal overflow */
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }

    body {
        line-height: 1.5;
    }

    /* Layout */
    .mud-layout,
    .wth-layout {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Main content - side padding for breathing room */
    .mud-main-content,
    .mud-main-content.pa-4,
    .mud-main-content.pt-4 {
        padding: 12px 16px !important;
    }

    /* Container - full width on mobile */
    .mud-container,
    .mud-container-maxwidth-md,
    .mud-container-maxwidth-sm,
    .mud-container-maxwidth-lg,
    .mud-container[style] {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Grid - remove negative margins */
    .mud-grid {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Grid items - vertical spacing between sections */
    .mud-grid-item,
    div[class*="mud-grid-item"] {
        padding: 8px 0 !important;
        margin: 0 !important;
    }

    /* Paper adjustments - reduce padding */
    .mud-paper {
        border-radius: var(--wth-radius-sm);
    }

    /* Typography adjustments */
    h1, .mud-typography-h1 { font-size: 1.75rem !important; }
    h2, .mud-typography-h2 { font-size: 1.5rem !important; }
    h3, .mud-typography-h3 { font-size: 1.35rem !important; }
    h4, .mud-typography-h4 { font-size: 1.2rem !important; }
    h5, .mud-typography-h5 { font-size: 1.1rem !important; }
    h6, .mud-typography-h6 { font-size: 1rem !important; }

    /* Input adjustments */
    .mud-input-control {
        margin-bottom: 0.5rem;
    }

    .mud-input-control .mud-input-slot {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Button adjustments */
    .mud-button-root {
        min-height: 44px; /* Touch-friendly size */
    }

    /* List adjustments - fix left margin */
    .mud-list {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .mud-list-item {
        padding: 12px 8px;
        margin-left: 0;
    }

    .mud-list-item:hover {
        padding-left: 8px;
        border-left-color: transparent;
    }

    /* Checkbox and radio adjustments - fix alignment */
    .mud-checkbox,
    .mud-radio {
        min-height: 44px;
        margin-left: 0 !important;
    }

    .mud-radio-group {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    /* Alert adjustments */
    .mud-alert {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* Chip adjustments */
    .mud-chip {
        font-size: 0.85rem;
    }

    /* Section header adjustments */
    .section-header::after {
        width: 40px;
        height: 2px;
    }

    /* File upload adjustments */
    .mud-file-upload {
        padding: 1rem;
    }

    /* Tabs adjustments */
    .mud-tabs .mud-tab {
        min-width: auto;
        padding: 10px 12px;
    }

    /* Scrollbar - hide custom scrollbar on mobile */
    ::-webkit-scrollbar {
        width: 4px;
    }

    /* Image adjustments */
    .image-hover-zoom {
        border-radius: var(--wth-radius-sm);
    }

    .image-hover-zoom:hover .mud-image {
        transform: none;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    h1, .mud-typography-h1 { font-size: 1.5rem !important; }
    h2, .mud-typography-h2 { font-size: 1.35rem !important; }
    h3, .mud-typography-h3 { font-size: 1.2rem !important; }
    h4, .mud-typography-h4 { font-size: 1.1rem !important; }

    .mud-main-content,
    .mud-main-content.pa-4,
    .mud-main-content.pt-4 {
        padding: 8px 12px !important;
    }

    .mud-grid-item,
    div[class*="mud-grid-item"] {
        padding: 6px 0 !important;
    }

    .mud-button-root {
        font-size: 0.85rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .mud-paper:hover,
    .mud-button-root:hover,
    .mud-list-item:hover,
    .image-hover-zoom:hover .mud-image {
        transform: none;
        box-shadow: inherit;
    }

    /* Larger touch targets */
    .mud-icon-button {
        min-width: 44px;
        min-height: 44px;
    }
}


/* ============================================
   LOADING STATES
   ============================================ */
.loading-shimmer {
    background: linear-gradient(
        90deg,
        var(--wth-bg-alt) 25%,
        var(--wth-bg) 50%,
        var(--wth-bg-alt) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body::before,
    body::after,
    .decorative-elements,
    .scroll-progress-container,
    .back-to-top {
        display: none !important;
    }

    .mud-paper {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
