/* ==================== VARIABLES ==================== */
:root {
    /* Colors */
    --hue-color: 35;
    /* Gold/Cream base */
    --first-color: hsl(var(--hue-color), 45%, 50%);
    --first-color-alt: hsl(var(--hue-color), 45%, 45%);
    --first-color-light: hsl(var(--hue-color), 45%, 90%);
    --title-color: hsl(0, 0%, 15%);
    --text-color: hsl(0, 0%, 35%);
    --text-color-light: hsl(0, 0%, 55%);
    --body-color: hsl(var(--hue-color), 40%, 98%);
    --container-color: #FFF;
    --border-color: hsl(var(--hue-color), 20%, 85%);

    /* Fonts */
    --body-font: 'Poppins', sans-serif;
    --title-font: 'Poppins', sans-serif;

    /* Font Sizes */
    --big-font-size: 2.5rem;
    --h1-font-size: 1.75rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
    --smaller-font-size: .75rem;

    /* Font Weights */
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    /* Margins */
    --mb-0-25: .25rem;
    --mb-0-5: .5rem;
    --mb-0-75: .75rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-2-5: 2.5rem;
    --mb-3: 3rem;

    /* Z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
}

@media screen and (min-width: 968px) {
    :root {
        --big-font-size: 3.5rem;
        --h1-font-size: 2.5rem;
        --h2-font-size: 2rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
        --smaller-font-size: .813rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0 0 var(--header-height) 0;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
}

h1,
h2,
h3,
h4 {
    color: var(--title-color);
    font-family: var(--title-font);
    font-weight: var(--font-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* ==================== LAYOUT ==================== */
.container {
    max-width: 1024px;
    /* Reduced max-width for more focus */
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding: 4.5rem 0 2rem;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: var(--mb-3);
}

.section-title {
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-0-5);
}

.section-subtitle {
    display: block;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* ==================== COMPONENT: BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: .5rem;
    font-weight: var(--font-medium);
    transition: all .3s ease;
    cursor: pointer;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

.btn-primary {
    background-color: var(--first-color);
    color: #FFF;
    box-shadow: 0 4px 12px hsla(var(--hue-color), 45%, 50%, .25);
}

.btn-primary:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px hsla(var(--hue-color), 45%, 50%, .35);
}

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

.btn-outline:hover {
    background-color: var(--first-color-light);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--small-font-size);
}

/* ==================== HEADER ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    /* Modern glass effect */
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    transition: .3s;
}

.header-container {
    height: 3.5rem;
    /* ~56px */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-btns {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-toggle {
    color: var(--title-color);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    /* Centering svg */
}

@media screen and (max-width: 767px) {
    .nav {
        position: fixed;
        top: 0;
        /* Cover full screen or slide from side */
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--body-color);
        padding: 4rem 1.5rem 2rem;
        box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
        transition: .4s;
        z-index: var(--z-fixed);
    }
}

.nav-list {
    display: flex;
    flex-direction: column;
    row-gap: 2rem;
}

.nav-link {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    color: var(--title-color);
    transition: .3s;
}

.nav-link:hover {
    color: var(--first-color);
}

.nav-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--title-color);
}

/* Show Menu */
.show-menu {
    right: 0;
}

/* ==================== HERO ==================== */
.hero {
    overflow: hidden;
    /* For blobs */
    position: relative;
    padding-top: 7rem;
    /* Space for fixed header */
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    margin-bottom: var(--mb-2);
}

.hero-subtitle {
    display: block;
    color: var(--first-color);
    font-weight: var(--font-semi-bold);
    margin-bottom: var(--mb-0-5);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: var(--small-font-size);
}

.hero-title {
    font-size: var(--big-font-size);
    line-height: 1.2;
    margin-bottom: var(--mb-1);
}

.hero-description {
    color: var(--text-color-light);
    margin-bottom: var(--mb-2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: var(--mb-3);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: var(--mb-2);
    padding-top: var(--mb-2);
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: var(--h3-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
}

.stat-text {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

.hero-img-wrapper {
    position: relative;
    justify-self: center;
    width: 100%;
    max-width: 400px;
}

.hero-img {
    border-radius: 1.25rem;
    box-shadow: 0 24px 48px -12px hsla(var(--hue-color), 45%, 40%, 0.35),
        0 8px 16px rgba(0, 0, 0, 0.08);
    transform: rotate(-2deg);
    transition: transform .4s ease, box-shadow .4s ease;
    animation: hero-img-float 5s ease-in-out infinite;
}

.hero-img:hover {
    transform: rotate(0) scale(1.02);
    box-shadow: 0 32px 56px -12px hsla(var(--hue-color), 45%, 40%, 0.45),
        0 8px 16px rgba(0, 0, 0, 0.08);
}

@keyframes hero-img-float {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(-2deg) translateY(-12px); }
}

.hero-blob {
    position: absolute;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle,
        hsl(var(--hue-color), 55%, 80%) 0%,
        hsl(var(--hue-color), 45%, 90%) 60%,
        transparent 80%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    filter: blur(30px);
    animation: hero-blob-pulse 6s ease-in-out infinite;
}

@keyframes hero-blob-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .9; }
    50% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-img, .hero-blob {
        animation: none;
    }
}

/* ==================== FEATURES ==================== */
.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--container-color);
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: .3s;
    /* Clean look */
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border-color: transparent;
}

.feature-icon {
    display: inline-flex;
    padding: .75rem;
    background-color: var(--first-color-light);
    color: var(--first-color);
    border-radius: .5rem;
    margin-bottom: var(--mb-1);
    font-size: 1.5rem;
}

.feature-title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
}

.feature-description {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}


/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--title-color);
    /* Dark background */
    color: #FFF;
    padding-top: 4rem;
}

.footer-container {
    display: grid;
    row-gap: 3rem;
}

.footer-title {
    color: #FFF;
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-1-5);
}

.footer-logo {
    display: inline-block;
    color: #FFF;
    font-family: var(--title-font);
    font-weight: var(--font-bold);
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-1);
}

.footer-description {
    color: hsla(0, 0%, 100%, 0.7);
    margin-bottom: var(--mb-2);
    font-size: var(--small-font-size);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: #FFF;
    transition: .3s;
}

.social-link:hover {
    color: var(--first-color);
}

.footer-list {
    display: flex;
    flex-direction: column;
    row-gap: .75rem;
}

.footer-link {
    color: hsla(0, 0%, 100%, 0.7);
    font-size: var(--small-font-size);
    transition: .3s;
}

.footer-link:hover {
    color: #FFF;
}

.footer-copy {
    margin-top: 4rem;
    text-align: center;
    font-size: var(--smaller-font-size);
    color: hsla(0, 0%, 100%, 0.5);
    padding-bottom: 2rem;
    border-top: 1px solid hsla(0, 0%, 100%, 0.1);
    padding-top: 2rem;
}


/* ==================== THEMES ==================== */
.themes-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.theme-card {
    background-color: var(--container-color);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: .3s;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.theme-img-wrapper {
    position: relative;
    /* Matches the phone-portrait capture (430x880) so each cover shows in
       full — edge to edge, no cropping of names/button, no letterbox bands. */
    aspect-ratio: 43 / 88;
    overflow: hidden;
}

.theme-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: .3s;
}

.theme-card:hover .theme-img {
    transform: scale(1.1);
}

.theme-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: .3s;
}

.theme-card:hover .theme-overlay {
    opacity: 1;
}

.theme-content {
    padding: 1.5rem;
    text-align: center;
}

.theme-title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-25);
}

.theme-category {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-price {
    display: block;
    margin-top: var(--mb-0-5);
    font-size: var(--normal-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--first-color);
}

.theme-price-normal {
    margin-left: .5rem;
    font-size: var(--small-font-size);
    font-weight: var(--font-regular, 400);
    color: var(--text-color-light);
    text-decoration: line-through;
}

.theme-badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    z-index: 1;
    padding: .25rem .6rem;
    border-radius: 1rem;
    font-size: var(--smaller-font-size, .75rem);
    font-weight: var(--font-semi-bold);
    letter-spacing: .5px;
    text-transform: uppercase;
    background-color: var(--container-color);
    color: var(--text-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.theme-badge.is-premium {
    background-color: var(--first-color);
    color: #fff;
}

.themes-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-color-light);
    padding: 2rem 0;
}

.themes-more {
    text-align: center;
    margin-top: var(--mb-3);
}

.theme-more-card {
    display: flex;
    flex-direction: column;
    border: 2px dashed var(--border-color);
    text-decoration: none;
    color: inherit;
}

.theme-more-card:hover {
    border-color: var(--first-color);
}

.theme-more-card:hover .theme-more-count {
    transform: scale(1.08);
}

.theme-more-visual {
    aspect-ratio: 43 / 88;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: linear-gradient(160deg, var(--first-color-light), var(--body-color));
}

.theme-more-count {
    font-size: 2.75rem;
    font-weight: var(--font-bold);
    color: var(--first-color);
    line-height: 1;
    transition: .3s;
}

.theme-more-visual-label {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-more-link-text {
    color: var(--first-color);
}

/* Teaser strip (homepage): horizontal swipe on mobile so the row reads as
   "scroll for more" instead of a dead-ended 3-item grid. */
@media screen and (max-width: 767px) {
    .themes-grid--teaser {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: .75rem;
        scrollbar-width: none;
    }

    .themes-grid--teaser::-webkit-scrollbar {
        display: none;
    }

    .themes-grid--teaser .theme-card {
        flex: 0 0 78%;
        scroll-snap-align: start;
    }
}

/* ==================== PRICING ==================== */
.pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
    /* Align cards vertically if heights differ */
}

.pricing-card {
    position: relative;
    background-color: var(--container-color);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: .3s;
}

.pricing-popular {
    transform: scale(1.05);
    border-color: var(--first-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

.pricing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--first-color);
    color: #FFF;
    padding: .25rem .75rem;
    border-radius: 1rem;
    font-size: var(--smaller-font-size);
    text-transform: uppercase;
    font-weight: var(--font-semi-bold);
}

.pricing-header {
    margin-bottom: var(--mb-2);
}

.pricing-title {
    font-size: var(--h3-font-size);
    margin-bottom: var(--mb-0-5);
    color: var(--first-color);
}

.pricing-price {
    display: block;
    font-size: 2rem;
    /* Big price */
    font-weight: var(--font-bold);
    color: var(--title-color);
    font-family: var(--body-font);
    /* Number is better in body font usually */
}

.pricing-list {
    text-align: left;
    margin-bottom: var(--mb-2-5);
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.pricing-item {
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.check-icon {
    font-style: normal;
    color: var(--first-color);
    font-weight: bold;
}

.pricing-btn {
    width: 100%;
}

/* ==================== TESTIMONIALS ==================== */
.testimonial-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.testimonial-card {
    background-color: var(--container-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.testimonial-rating {
    color: var(--first-color);
    margin-bottom: var(--mb-1);
}

.testimonial-text {
    font-style: italic;
    color: var(--text-color);
    margin-bottom: var(--mb-1-5);
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-name {
    font-size: var(--normal-font-size);
    margin-bottom: 0;
}

.testimonial-date {
    display: block;
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

/* ==================== MEDIA QUERIES ==================== */
@media screen and (min-width: 576px) {
    .container {
        margin-left: auto;
        margin-right: auto;
        padding-left: var(--mb-1-5);
        padding-right: var(--mb-1-5);
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 768px) {
    .header-container {
        height: 4.5rem;
    }

    .nav {
        height: auto;
        width: auto;
        padding: 0;
        background: transparent;
        box-shadow: none;
        position: static;
        z-index: initial;
    }

    .nav-list {
        flex-direction: row;
        column-gap: 2.5rem;
    }

    .nav-toggle,
    .nav-close {
        display: none;
    }

    .hero-container {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
        text-align: left;
    }

    .hero-content {
        text-align: left;
        margin-bottom: 0;
    }

    .hero-buttons {
        justify-content: flex-start;
    }

    .hero-stats {
        justify-content: flex-start;
    }

    .footer-container {
        grid-template-columns: 2fr 1fr 1fr;
        column-gap: 3rem;
    }
}

@media screen and (min-width: 1024px) {
    .container {
        max-width: 968px;
    }
}

@media screen and (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media screen and (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ==================== CATALOG TABS ==================== */
.catalog-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: var(--mb-3);
    flex-wrap: wrap;
}

.catalog-tab {
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: .3s;
}

.catalog-tab:hover {
    background-color: var(--first-color-light);
    color: var(--first-color);
    border-color: var(--first-color-light);
}

.catalog-tab.active-tab {
    background-color: var(--first-color);
    color: #FFF;
    border-color: var(--first-color);
}

.theme-card.hide {
    display: none;
}

/* Animation for filtering */
.theme-card {
    animation: fadeIn .5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}