:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #bb86fc;
    --secondary-color: #03dac6;
    --text-color: #e0e0e0;
    --subtle-text: #a0a0a0;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Header --- */
.main-header {
    background-color: var(--surface-color);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow-color);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: #fff;
}


h1, h2, h3 {
    color: #ffffff;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; border-left: 4px solid var(--primary-color); padding-left: 1rem; }
h3 { font-size: 1.8rem; }

main {
    padding: 2rem 5%;
}

/* --- Hero Section --- */
.hero {
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 1)), url('static/photorealistic/dia_bw.jpg') no-repeat center center/cover;
    animation: backgroundPan 20s linear infinite;
}

@keyframes backgroundPan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.hero-content .subtitle {
    font-size: 1.2rem;
    color: var(--subtle-text);
    margin-bottom: 2rem;
}

.cta-container {
    margin-top: 1.5rem;
}

.cta-button {
    background-color: var(--primary-color);
    color: #000000;
    padding: 15px 35px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(187, 134, 252, 0.3);
}

.cta-button:hover {
    transform: translateY(-5px);
    background-color: var(--secondary-color);
    box-shadow: 0 6px 20px rgba(3, 218, 198, 0.4);
}

.cta-subtext {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--subtle-text);
}

.sub-cta {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--subtle-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sub-cta:hover {
    color: var(--primary-color);
    text-decoration: underline;
}


/* --- Image Gallery --- */
.image-category {
    margin-bottom: 4rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.image-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.image-card:hover {
    transform: scale(1.03) translateY(-5px);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.image-card:hover img {
    transform: scale(1.1);
    filter: brightness(0.6);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.icon-btn {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}

.image-card:hover .icon-btn {
    transform: translateY(0);
}

.image-card:hover .download-btn {
    transition-delay: 0.1s;
}

.image-card:hover .share-btn {
    transition-delay: 0.2s;
}


.icon-btn:hover {
    background-color: #ffffff;
    color: var(--bg-color);
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: fadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255,255,255,0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--subtle-text);
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}
.close-modal:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

.modal-form {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-form textarea {
    min-height: 120px;
    resize: vertical;
}

.modal-form input, .modal-form textarea {
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--subtle-text);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: box-shadow 0.3s;
    font-family: inherit;
}

.modal-form input:focus, .modal-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.5);
}

#success-message {
    display: none; /* Hidden by default */
}

.social-links {
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}

.social-links p {
    color: var(--subtle-text);
    margin-bottom: 1rem;
}

.social-links .social-icon {
    color: #fff;
    font-size: 2rem;
    margin: 0 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links .social-icon:hover {
    transform: scale(1.1);
}

.fa-whatsapp:hover { color: #25D366; }
.fa-instagram:hover { color: #E4405F; }


/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 2rem;
    background-color: var(--surface-color);
    color: var(--subtle-text);
    border-top: 1px solid rgba(255,255,255,0.1);
}

footer .cta-button {
    margin-top: 1rem;
    margin-bottom: 2rem;
}


/* --- Affiliate Page --- */
.affiliate-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
}

.affiliate-container {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    animation: fadeIn 0.5s ease-out;
}

.affiliate-container h1 {
    font-size: 2.5rem;
}

.affiliate-container .subtitle {
    font-size: 1.1rem;
    color: var(--subtle-text);
    margin-bottom: 2rem;
}

.affiliate-container .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.affiliate-container .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.affiliate-container #affiliate-form input[type="text"],
.affiliate-container #affiliate-form input[type="email"] {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--subtle-text);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: box-shadow 0.3s;
    font-family: inherit;
}

.affiliate-container #affiliate-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.5);
}

.affiliate-container #affiliate-form .cta-button {
    width: 100%;
    margin-top: 1rem;
}

.affiliate-container #result {
    margin-top: 2rem;
}

.affiliate-container #result h2 {
    color: var(--primary-color);
}

.affiliate-container #affiliate-code {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--secondary-color);
    background-color: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: inline-block;
    border: 1px dashed var(--secondary-color);
}

.hidden {
    display: none;
}

/* --- Affiliate Page "How it works" --- */
.how-it-works {
    margin: 2.5rem 0;
    text-align: left;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.step {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.step p {
    font-size: 0.9rem;
    color: var(--subtle-text);
}

/* --- Featured Categories --- */
.featured-categories {
    padding: 2rem 0;
    background-color: var(--surface-color);
}

.featured-categories h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    border-left: none;
    padding-left: 0;
}

.featured-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 1rem 5%; /* Added some vertical padding */
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar */
.featured-grid::-webkit-scrollbar {
    display: none;
}

.featured-card {
    flex: 0 0 280px; /* Fixed width for each card */
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.featured-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.featured-card:hover .featured-overlay {
    transform: translateY(0);
}

.featured-overlay h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin: 0;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
}

.explore-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: #000;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

.featured-card:hover .explore-btn {
    opacity: 1;
    transform: translateY(0);
}

/* --- Description Section --- */
.description-section {
    display: flex;
    justify-content: space-around;
    padding: 4rem 5%;
    background-color: var(--bg-color);
    text-align: center;
}

.description-item {
    max-width: 300px;
}

.description-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.description-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.description-item p {
    color: var(--subtle-text);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .steps-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    main { padding: 1.5rem 3%; }
    .hero { min-height: 50vh; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        display: none;
        box-shadow: 0 4px 10px var(--shadow-color);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .affiliate-container {
        padding: 1.5rem;
    }

    .description-section {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    .featured-grid {
        padding: 0 1.5rem; /* Adjust padding for mobile */
    }

    .featured-card {
        flex: 0 0 85%; /* Show one card at a time */
    }
}

@media (max-width: 480px) {
        .image-grid {
        grid-template-columns: 1fr;
        }
}

/* --- Scroll Animation --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.view-more-btn {
    display: block;
    width: -moz-fit-content;
    width: fit-content;
    margin: 2rem auto 0;
    padding: 10px 25px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all .3s ease;
}

.view-more-btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}
