/* Reset CSS */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

:root {
    /* Colors */
    --primary-main-bg: hsl(233, 47%, 7%);
    --primary-card-bg: hsl(244, 38%, 16%);
    --primary-accent: hsl(277, 64%, 61%);
    --primary-overlay: hsla(277, 90%, 53%, 0.479);
    --white: hsl(0, 0%, 100%);
    --white-transparent-75: hsla(0, 0%, 100%, 0.75);
    --white-transparent-60: hsla(0, 0%, 100%, 0.6);

    /* Spacing */
    --padding-sm: clamp(1rem, 2vw, 3rem);
    --padding-md: clamp(1.5rem, 3vw, 4rem);
    --margin-sm: clamp(0.5rem, 2vw, 2rem);
    --margin-md: clamp(1rem, 3vw, 3rem);
    --margin-lg: clamp(2rem, 5vw, 6rem);

     /* Typography */
    --font-size-base: 0.9rem;
    --font-size-sm: clamp(0.75rem, calc(0.8rem + 0.5vw), 1.1rem);
    --font-size-md: clamp(1.1rem, calc(0.9rem + 0.5vw), 1.5rem);
    --font-size-lg: clamp(1.25rem, 5vw, 2.5rem);
    --line-height-tight: 1.25;
    --line-height-relaxed: 1.75;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base); 
}

body {
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--primary-main-bg);
}

h1, h2, h3 {
    font-family: 'Lexend Deca', sans-serif;
}

.container {
    max-width: 70%;
    background-color: var(--primary-card-bg);
    display: flex;
    border-radius: 10px;
    overflow: hidden; /* Untuk mengatasi masalah border-radius pada child elements */
}

.left-section {
    flex: 1;
    color: var(--white);
    padding: var(--padding-md) 0;
}

.heading {
    font-size: var(--font-size-lg);
    font-weight: 700;
    padding-left: var(--padding-sm); 
    padding-right: var(--padding-sm); 
    margin-bottom: var(--margin-sm);
    line-height: var(--line-height-tight);
}

.heading span {
    color: var(--primary-accent);
}

.description {
    padding: 0 var(--padding-sm);
}

.description p {
    max-width: 80%;
    font-size: var(--font-size-sm);
    color: var(--white-transparent-75);
    margin-bottom: var(--margin-lg);
    line-height: var(--line-height-relaxed);
}

.rating {
    padding: 0 var(--padding-sm);
}

.rating ul {
    max-width: 80%;
    display: flex;
    justify-content: space-between;
}

.rating li {
    font-size: var(--font-size-md);
    font-weight: 700;
    text-transform: uppercase;
}

.rating li span {
    display: block;
    font-size: var(--font-size-base);
    margin-top: 0.5rem;
    color: var(--white-transparent-60);
    font-weight: normal;
}

.right-section {
    flex: 1;
    position: relative;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-overlay);
    z-index: 1;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.right-section img {
    display: block;
    object-fit: cover;
    width: 100%;
    height: 100%; 
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Tablet view */
@media (max-width: 992px) {
    .container {
        max-width: 80%;
    }
    
    .description p,
    .rating ul {
        max-width: 90%;
    }
}

/* Mobile view */
@media (max-width: 576px) {
    .container {
        max-width: 85%;
        flex-direction: column-reverse; /* Gambar di atas, konten di bawah */
        text-align: center;
        min-height: auto;
        height: auto;
    }
    
    .left-section {
        padding: var(--padding-sm);
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .heading {
        text-align: center;
        padding: 0;
        width: 100%;
    }
    
    .description {
        display: flex;
        justify-content: center;
        width: 100%;
        padding: 0;
    }
    
    .description p {
        max-width: 100%;
        margin-bottom: var(--margin-md);
        text-align: center;
    }
    
    .rating {
        width: 100%;
        padding: 0;
    }
    
    .rating ul {
        flex-direction: column;
        align-items: center;
        max-width: 100%;
        gap: 1.5rem;
    }
    
    .rating li span {
        font-size: 0.75rem;
    }
    
    .right-section {
        height: auto;
        order: 1;
    }
    
    .right-section img,
    .overlay {
        border-bottom-right-radius: 0;
        border-top-left-radius: 10px;
    }
    
    .right-section img {
        height: auto; 
        max-height: 250px;
    }
    
    .overlay {
        border-top-left-radius: 10px;
    }
}