/* 
 * MLay Beauty Technology - Global Stylesheet
 * Contains design system tokens, layout utilities, animations, and component styles.
 */

:root {
    /* Color Palette */
    --primary-color: #d82a62;
    --primary-hover: #b81e4f;
    --primary-light: #fff0f3;
    --text-dark: #2b2b2b;
    --text-muted: #6c757d;
    --bg-light: #fdfdfd;
    --bg-gray: #f8f9fa;
    --border-color: #f1f3f5;
    --white: #ffffff;
    --success: #28a745;
    --error: #dc3545;

    /* Fonts */
    --font-title: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --font-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(216, 42, 98, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(216, 42, 98, 0.15);

    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive hero backgrounds: copy remains available as a graceful fallback for older pages. */
.hero-home,
.banner-tech,
.banner-results,
.banner-manual,
.banner-about,
.banner-coop,
.product-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--primary-light);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center bottom;
}

.hero-home {
    background-image: linear-gradient(to bottom, #fff0f3 30%, rgba(255, 240, 243, .95) 55%, rgba(255, 240, 243, .12) 100%), url('../images/banner-1-mobile-no-logo.webp');
    min-height: 540px;
}

.banner-tech {
    background-image: linear-gradient(to bottom, #fff0f3 25%, rgba(255, 240, 243, .9) 58%, rgba(255, 240, 243, .15) 100%), url('../images/banner_home_mobile.webp');
}

.banner-results {
    background-image: linear-gradient(to bottom, #fff0f3 25%, rgba(255, 240, 243, .9) 58%, rgba(255, 240, 243, .15) 100%), url('../images/results_mobile.webp');
}

.banner-manual {
    background-image: linear-gradient(to bottom, #fff0f3 25%, rgba(255, 240, 243, .9) 58%, rgba(255, 240, 243, .15) 100%), url('../images/banner-2-mobile-no-logo.webp');
}

.banner-about {
    background-image: linear-gradient(to bottom, #fff0f3 25%, rgba(255, 240, 243, .9) 58%, rgba(255, 240, 243, .15) 100%), url('../images/about_mobile.webp');
}

.banner-coop {
    background-image: linear-gradient(to bottom, #fff0f3 25%, rgba(255, 240, 243, .9) 58%, rgba(255, 240, 243, .15) 100%), url('../images/banner_home_mobile.webp');
}

.banner-tech .tech-banner-media,
.banner-results .results-banner-grid > div:last-child,
.banner-about .about-banner-media,
.banner-coop .coop-banner-media,
.product-hero .product-hero-grid > div:last-child {
    display: none;
}

@media (min-width: 1025px) {
    .hero-home,
    .banner-tech,
    .banner-results,
    .banner-manual,
    .banner-about,
    .banner-coop,
    .product-hero {
        background-position: center right;
        min-height: 520px;
    }

    .hero-home {
        background-image: linear-gradient(to right, #fff0f3 0 36%, rgba(255, 240, 243, .94) 47%, rgba(255, 240, 243, .22) 60%, rgba(255, 240, 243, 0) 72%), url('../images/banner-1-no-logo.webp');
    }

    .banner-tech {
        background-image: linear-gradient(to right, #fff0f3 35%, rgba(255, 240, 243, .95) 55%, rgba(255, 240, 243, .2) 80%, rgba(255, 240, 243, 0) 100%), url('../images/home/banner_home_desktop.webp');
    }

    .banner-results {
        background-image: linear-gradient(to right, #fff0f3 35%, rgba(255, 240, 243, .95) 55%, rgba(255, 240, 243, .2) 80%, rgba(255, 240, 243, 0) 100%), url('../images/results_desktop.webp');
    }

    .banner-manual {
        background-image: linear-gradient(to right, #fff0f3 0 36%, rgba(255, 240, 243, .94) 47%, rgba(255, 240, 243, .22) 60%, rgba(255, 240, 243, 0) 72%), url('../images/banner-2-no-logo.webp');
    }

    .banner-about {
        background-image: linear-gradient(to right, #fff0f3 35%, rgba(255, 240, 243, .95) 55%, rgba(255, 240, 243, .2) 80%, rgba(255, 240, 243, 0) 100%), url('../images/about_desktop.webp');
    }

    .banner-coop {
        background-image: linear-gradient(to right, #fff0f3 35%, rgba(255, 240, 243, .95) 55%, rgba(255, 240, 243, .2) 80%, rgba(255, 240, 243, 0) 100%), url('../images/home/banner_home_desktop.webp');
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .hero-home,
    .banner-tech,
    .banner-results,
    .banner-manual,
    .banner-about,
    .banner-coop,
    .product-hero {
        min-height: 580px;
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: clip;
}

body.modal-open {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-title);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    font-size: 15px;
    gap: 8px;
    min-height: 46px;
    text-align: center;
    white-space: normal;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(216, 42, 98, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(216, 42, 98, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.legal-content {
    max-width: 900px;
}

.legal-content > .section-title {
    display: block;
    margin: 8px 0 12px;
}

.legal-content > .section-subtitle {
    max-width: 760px;
    margin: 0 0 34px;
}

.legal-section {
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
}

.legal-section h2 {
    margin-bottom: 10px;
    font-size: 20px;
}

.legal-section p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.legal-section a {
    color: var(--primary-color);
    font-weight: 600;
}

.legal-note {
    margin-top: 18px;
    padding: 16px 18px;
    border-left: 4px solid var(--primary-color);
    background: var(--primary-light);
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.7;
}

/* Certificate evidence gallery */
.certificates-showcase {
    margin-top: 48px;
    padding: 36px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.certificates-showcase-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.certificates-showcase-header h2,
.certificates-showcase-header h3 {
    margin: 0 0 8px;
    color: var(--text-dark);
}

.certificates-showcase-header p {
    max-width: 700px;
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.certificates-showcase-header .btn {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 18px;
    font-size: 13px;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.certificate-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--white);
}

.certificate-card-image {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    padding: 10px;
    background: #fafafa;
}

.certificate-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.certificate-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.certificate-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.certificate-card-body h3 {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
}

.certificate-card-body p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.certificate-card-link {
    margin-top: auto;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
}

.certificate-card-link i {
    margin-left: 4px;
    font-size: 10px;
}

@media (max-width: 1024px) {
    .certificate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .certificates-showcase {
        margin-top: 34px;
        padding: 22px 16px;
        border-radius: 16px;
    }

    .certificates-showcase-header {
        display: block;
    }

    .certificates-showcase-header .btn {
        width: auto;
        margin-top: 14px;
    }

    .certificate-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .certificate-card {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .certificate-card-image {
        aspect-ratio: 3 / 4;
        padding: 6px;
    }

    .certificate-card-badge {
        top: 6px;
        left: 6px;
        font-size: 9px;
    }

    .certificate-card-body {
        padding: 12px;
    }
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: var(--primary-light);
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
}

