/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --happymod-green: #28B446;
    --happymod-dark: #1a1a1a;
    --happymod-light: #f4f7f5;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #fafafa;
    color: var(--gray-900);
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Layout Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.space-x-2>*+* {
    margin-left: 0.5rem;
}

.space-x-3>*+* {
    margin-left: 0.75rem;
}

.space-x-4>*+* {
    margin-left: 1rem;
}

.space-x-8>*+* {
    margin-left: 2rem;
}

.space-y-2>*+* {
    margin-top: 0.5rem;
}

.space-y-3>*+* {
    margin-top: 0.75rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

.hidden {
    display: none;
}

.container {
    max-width: 80rem;
    /* 7xl */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Header */
.header {
    position: relative;
    /* Changed from sticky to relative */
    z-index: 50;
    background-color: var(--happymod-green);
    border-bottom: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.header-inner {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    width: auto;
    height: 2.25rem;
    /* Mobile Size */
}

@media (min-width: 1024px) {
    .header-logo {
        width: 215px;
        /* Desktop Size */
        height: 52px;
    }
}

.logo-box {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--happymod-green);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(40, 180, 70, 0.2);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--gray-900);
}


.nav-links {
    display: none;
    gap: 2rem;
    font-weight: 600;
    color: var(--white);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Language Selector */
.lang-btn {
    display: flex;
    align-items: center;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lang-btn:hover {
    background-color: var(--gray-100);
}

.lang-flag {
    display: none;
    font-size: 1.125rem;
    margin-right: 0.5rem;
}

.lang-code {
    /* text-transform: uppercase; */
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-700);
}

.lang-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    min-width: 12rem;
    width: max-content;
    background-color: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 0.5rem;
    display: none;
    /* Logic controlled */
    z-index: 100;
}

/* .group:hover .lang-dropdown Removed to prevent flickering. Using JS click only. */
.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.lang-option:hover {
    background-color: rgba(40, 180, 70, 0.1);
}

.lang-option.active {
    color: var(--happymod-green);
    background-color: rgba(40, 180, 70, 0.05);
}

/* Hero */
.hero {
    position: relative;
    padding-top: 3rem;
    padding-bottom: 6rem;
    background-color: var(--white);
    overflow: hidden;
    min-height: 600px;
    /* Stabilize height */
}

@media(min-width: 1024px) {
    .hero {
        padding-top: 6rem;
        padding-bottom: 8rem;
    }
}

.hero-blob {
    display: none;
    /* Hidden on mobile by default */
    position: absolute;
    z-index: 0;
    pointer-events: none;
    /* Prevention of blocking clicks */
}

/* Blob 1: Main Top-Right */
.blob-1 {
    top: 0;
    right: 0;
    width: 80%;
    /* Larger on mobile */
    height: 60%;
    background-color: rgba(40, 180, 70, 0.15);
    border-bottom-left-radius: 50% 40%;
    border-top-left-radius: 10%;
}

/* Blob 2: Bottom-Left */
.blob-2 {
    bottom: -10%;
    left: -20%;
    width: 60%;
    height: 50%;
    background-color: rgba(40, 180, 70, 0.1);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: rotate(20deg);
}

/* Blob 3: Top-Left / Center */
.blob-3 {
    top: 15%;
    left: -10%;
    width: 250px;
    height: 250px;
    background-color: rgba(40, 180, 70, 0.08);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

@media(min-width: 1024px) {

    /* Show blobs on desktop only */
    .hero-blob {
        display: block;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

@media(min-width: 1024px) {
    .hero-content {
        flex-direction: row;
        align-items: center;
    }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background-color: rgba(40, 180, 70, 0.1);
    color: var(--happymod-green);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--gray-900);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

@media(min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.hero-sub {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 2rem;
}

@media(min-width: 1024px) {
    .hero-sub {
        font-size: 1.875rem;
    }
}

.hero-btn {
    background-color: var(--happymod-green);
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 800;
    padding: 1.25rem 3rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(40, 180, 70, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-btn:hover {
    background-color: #22993b;
    transform: translateY(-4px);
}

.hero-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.75rem;
}

.hero-security {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-icons {
    display: flex;
    gap: 1rem;
    filter: grayscale(100%);
    opacity: 0.6;
}

.security-icons img {
    height: 2rem;
}

.security-text {
    font-size: 1.25rem;
    color: var(--gray-700);
    line-height: 1.625;
    max-width: 48rem;
}

/* Phone Image */
.hero-phone-img {
    max-width: 100%;
    height: auto;
    width: 18.375rem;
    /* 1.75x of 10.5rem */
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.25));
    /* Add shadow for depth */
    animation: float 6s ease-in-out infinite;
}

@media (max-width: 1023px) {
    .hero-phone-img {
        width: 14.7rem;
        /* Decreased by 1.25x from desktop size */
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Main Content */
.main {
    background-color: var(--gray-50);
    flex-grow: 1;
    padding: 5rem 1rem;
}

.content-card {
    background-color: var(--white);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-100);
    max-width: 56rem;
    margin: 0 auto;
}

@media(min-width: 640px) {
    .content-card {
        padding: 4rem;
    }
}

.article-title {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--gray-900);
    margin-bottom: 2.5rem;
}

@media(min-width: 640px) {
    .article-title {
        font-size: 3rem;
    }
}

/* Typography */
.prose h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.prose p {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

.prose ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
}

/* Features Grid - Redesigned to Vertical Layout */
.grid-features {
    display: block;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .grid-features {
        /* Kept strictly vertical/block based on user request */
        display: block;
    }
}

.feature-card {
    background-color: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    margin-bottom: 2rem;
}

.feature-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
    margin-top: 1rem;
}

/* FAQ */
.faq-section {
    margin-top: 3rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    background: #1a1a1a;
    color: var(--white);

    /* Full bleed breakout */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;

    /* Re-align content to center */
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.faq-section .faq-title {
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 2.5rem;
    text-align: center;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.faq-item {
    background-color: transparent;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.faq-section .faq-question {
    list-style: none;
    display: block;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.faq-section .faq-answer {
    margin-top: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.625;
    font-size: 1.125rem;
}

/* Footer */
.footer {
    background-color: var(--white);
    color: var(--gray-900);
}

.footer-top {
    background-color: var(--happymod-green);
    color: var(--white);
    padding: 3rem 1rem;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-nav a {
    color: var(--white);
    transition: opacity 0.2s;
}

.footer-nav a:hover {
    opacity: 0.8;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: normal;
}

.footer-support {
    margin-top: 1rem;
    font-size: 1.125rem;
}

.footer-support a {
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-bottom {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    background-color: #f9f9f9;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--white);
    margin-right: 0.5rem;
}

@media(min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background-color: var(--white);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-header {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid var(--gray-100);
    background-color: var(--happymod-green);
}

.mobile-menu-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
}

.close-menu-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--white);
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-links {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.mobile-nav-link:hover {
    background-color: var(--gray-100);
    color: var(--happymod-green);
}

.back-to-top {
    position: fixed !important;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--happymod-green);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 180, 70, 0.3);
}

.back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Backlink Styling */
.backlink-bold-blue {
    font-weight: 700;
    color: #2563eb !important;
}

.back-to-top:hover {
    background-color: #22993b;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(40, 180, 70, 0.4);
}

@media (max-width: 767px) {
    .back-to-top {
        bottom: 1.5rem !important;
        right: 1.5rem !important;
        width: 3rem !important;
        height: 3rem !important;
    }
}