.hero {
    background-image: url('https://i.postimg.cc/9Fnj4P58/portfolio-wallpaper.jpg');
    background-position: center;
    background-size: cover;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* vertical center */
    align-items: flex-start;
    /* left align */
    margin: 0;
    /* remove margin */
    padding: 20px;
    /* some breathing space */
}

.hero h1 {
    font-size: clamp(22px, 5vw, 42px);
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 12px;
}

.hero p {
    font-size: clamp(13px, 2.5vw, 18px);
    color: #ffffff;
}

.hero-section-container {
    margin: 0;
    /* no margins */
    padding: 20px;
    width: 100%;
    /* take full width */
    text-align: left;
    background-image: linear-gradient( to right, rgb(28, 48, 92), rgba(107, 101, 108, 0.1));
}


/* Tablets (768px – 1024px) */

@media (max-width: 1024px) {
    .hero {
        min-height: 70vh;
        padding: 30px 25px;
    }
    .hero h1 {
        font-size: 32px;
        max-width: 500px;
    }
    .hero p {
        font-size: 16px;
    }
    .hero-section-container {
        margin-left: 0px;
        text-align: left;
    }
}


/* Mobiles (480px – 767px) */

@media (max-width: 767px) {
    .hero {
        min-height: 60vh;
        padding: 25px 20px;
    }
    .hero h1 {
        font-size: 24px;
        max-width: 90%;
    }
    .hero p {
        font-size: 14px;
        max-width: 90%;
    }
    .hero-section-container {
        margin-left: 0px;
        text-align: left;
    }
}


/* Small Mobiles (≤479px) */

@media (max-width: 479px) {
    .hero {
        min-height: 50vh;
        padding: 20px 15px;
    }
    .hero h1 {
        font-size: 20px;
    }
    .hero p {
        font-size: 13px;
    }
    .hero-section-container {
        margin-left: 0px;
        text-align: left;
    }
}

.view-toggle {
    margin: 20px 0;
    text-align: center;
}

.view-toggle button {
    width: 90px;
    height: 50px;
    margin: 0 6px;
    cursor: pointer;
    color: #fff;
    background-color: #F85C70;
    font-size: 18px;
    border: none;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.view-toggle button:hover {
    background: #666;
    color: #F85C70;
}

.stories {
    padding: 20px;
    max-width: 1300px;
    margin: auto;
}


/* Grid view */

.grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Always 3 per row on desktop */
    gap: 20px;
    margin: 0 auto;
    padding: 10px;
}


/* Slide view */

.slide-view {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.slide-view::-webkit-scrollbar {
    display: none;
}

.slide-view .story-card {
    scroll-snap-align: start;
}


/* Story card */

.story-card {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    height: 400px;
    width: 400px;
    object-fit: cover;
    object-position: center;
}

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

.story-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-card .content {
    padding: 16px;
}

.story-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #F85C70;
}

.story-card p {
    margin: 8px 0 0;
    font-size: 14px;
    color: #6c757d;
}


/* --- Responsive Breakpoints --- */


/* Tablets (768px – 1024px) */

@media (max-width: 1024px) {
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cards per row */
    }
    .hero {
        min-height: 70vh;
        padding: 40px 15px;
    }
    .story-card img {
        height: 200px;
    }
}


/* Mid-size mobiles (480px – 767px) */

@media (max-width: 767px) {
    .grid-view {
        grid-template-columns: 1fr;
        /* Single column */
    }
    .hero {
        min-height: 60vh;
        padding: 30px 15px;
        text-align: center;
    }
    .hero h1 {
        font-size: 24px;
    }
    .hero p {
        font-size: 14px;
    }
    .story-card {
        max-width: 100%;
    }
    .story-card img {
        height: 190px;
    }
}


/* Small mobiles (≤479px) */

@media (max-width: 479px) {
    .hero {
        min-height: 50vh;
        padding: 20px 10px;
    }
    .hero h1 {
        font-size: 20px;
    }
    .hero p {
        font-size: 12px;
    }
    .view-toggle button {
        width: 60px;
        height: 40px;
        font-size: 14px;
    }
    .story-card img {
        height: 160px;
    }
    .story-card h3 {
        font-size: 16px;
    }
    .story-card p {
        font-size: 13px;
    }
}