/* ============================= */
/* General Styles */
/* ============================= */
body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f7941d;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

/* ============================= */
/* Header */
/* ============================= */
.hero {
    background-color: #df6d27;
    color: white;
    text-align: center;
    padding: 20px 10px;
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    background-image: url(IYBG.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
}

.peg-logo {
    width: 100px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.iMaliYam-logo {
    max-width: 300px;
    height: auto;
    margin: 0;
}

.brand-title {
    font-family: 'Brush Script MT', cursive;
    font-size: 3em;
    margin: 0;
    position: relative;
    z-index: 1;
}

.tagline {
    font-size: 1em;
    margin-top: 4px;
}

/* ============================= */
/* How It Works Section */
/* ============================= */
.how-it-works {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    background-image: url("images/IYBG.png");
    background-size: auto;
    background-position: center;
}

.how-it-works .poster {
    width: 80%;
    border-radius: 15px;
}

.how-it-works strong {
    color: #df6d27;
}

.how-it-works-section {
    padding: 10px 0;
    text-align: center;
}

.section-title {
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: 700;
}

.steps-container {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.step-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 250px;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-icon {
    font-size: 2em;
    font-weight: 700;
    color: #F89406;
    margin-bottom: 5px;
}

/* ============================= */
/* Redeem Section */
/* ============================= */

/* Base redeem card: centered and matching container width */
.redeem {
    text-align: center;
    padding: 15px 16px;
    background-color: #FFFFFF;
    margin: 10px auto;
    border-radius: 8px;
    max-width: 1100px;
    box-sizing: border-box;
}

.redeem h2 {
    color: #e66a2e;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.redeem-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.redeem-icons img {
    width: 180px;
    border-radius: 15px;
}

.redeem p {
    font-size: 1em;
    margin: 5px auto;
    max-width: 600px;
}

.redeem-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 20px auto;
    max-width: 1100px;
    flex-wrap: wrap;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.redeem-text {
    flex: 1;
    font-size: 1.1em;
    color: #df6d27;
    max-width: 250px;
}

/* Slider container - fluid and responsive */
.redeem-slider {
    flex: 2 1 420px;     /* allow shrinking/growing, preferred basis 420px */
    max-width: 560px;    /* desktop max */
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* Slider internals */
.redeem-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    will-change: transform;
}

.redeem-slide {
    min-width: 100%;          /* crucial for the translateX(-n * 100%) JS to work */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px;
    box-sizing: border-box;
}

.redeem-slide img {
    width: 100%;
    max-width: 240px;    /* keeps image from becoming huge on wide screens */
    height: auto;
    border-radius: 30%;
    margin-bottom: 10px;
}

.redeem-slide p {
    max-width: 260px;
    margin: 0 auto;
}

/* Buttons */
.redeem-prev, .redeem-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(230,106,46,0.8);
    color: white;
    border: none;
    font-size: 20px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 5;
}

.redeem-prev:hover, .redeem-next:hover {
    background: #e66a2e;
}

.redeem-prev {
    left: 10px;
}

.redeem-next {
    right: 10px;
}

/* Dots container */
.redeem-dots {
    text-align: center;
    margin-top: 12px;
}

.redeem-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 4px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
}

.redeem-dot.active {
    background: #df6d27;
}

/* small "Terms" line */
.redeem-terms {
    margin-top: 8px;
    font-size: 0.95em;
    color: #666;
}

/* ============================= */
/* Footer */
/* ============================= */
footer {
    background-image: url("images/IYFooter.png");
    background-repeat: repeat-x;
    background-position: bottom center;
    color: white;
    text-align: center;
    padding: 8px 10px;
}

footer small {
    display: block;
    margin-top: 3px;
    color: #bbb;
}

/* ============================= */
/* Responsive Media Queries */
/* ============================= */

/* Tablets */
@media (max-width: 768px) {
    .brand-title {
        font-size: 2.2em;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
    }

    .redeem-layout {
        flex-direction: column;
    }

    .redeem-icons img {
        width: 140px;
    }

    /* allow slider to be a bit wider on tablets */
    .redeem-slider {
        max-width: 720px;
    }
}

/* Phones */
@media (max-width: 480px) {
    .hero {
        padding: 15px 10px;
    }

    .brand-title {
        font-size: 1.8em;
    }

    .tagline {
        font-size: 0.9em;
    }

    .how-it-works .poster {
        width: 100%;
    }

    .step-card {
        width: 90%;
    }

    .redeem-icons img {
        width: 120px;
    }

    .redeem h2 {
        font-size: 1.4em;
    }

    /* Make redeem card match full-width look used elsewhere on mobile, with small gutters */
    .redeem {
        padding: 12px;
        margin: 8px 12px;
        border-radius: 10px;
    }

    .redeem-layout {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    /* slider should take full width of the .redeem card on phones */
    .redeem-slider {
        max-width: 100%;
        width: 100%;
        padding: 6px 0;
    }

    .redeem-slide {
        padding: 12px;
    }

    /* limit image size on phone so it doesn't push layout */
    .redeem-slide img {
        max-width: 180px;
        width: 60%;
    }

    /* text blocks should be full width under slider */
    .redeem-text {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 0 8px;
        box-sizing: border-box;
    }

    /* smaller prev/next buttons so they don't overlap content */
    .redeem-prev, .redeem-next {
        top: 45%;
        font-size: 18px;
        padding: 6px 8px;
    }

    .redeem-dots {
        margin-top: 8px;
    }
}
