/* --- CSS Variables --- */
:root {
    --primary-red: #e50914;
    --primary-red-hover: #f40612;
    --background-dark: #000;
    --section-divider-gray: #222;
    --text-white: #fff;
    --text-light-gray: #ccc;
    --text-medium-gray: #777;
    --element-gray: #303030;
    --element-gray-hover: #444;
    --font-stack: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --padding-page: 0 8%;
}

/* --- Base Styles & Resets --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--background-dark);
    color: var(--text-white);
    font-family: var(--font-stack);
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Header Section (Hero) --- */
.header {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url(./Images/netflix%20first%20page.jpg);
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 8px solid var(--section-divider-gray);
    display: flex;
    flex-direction: column;
    padding: 20px var(--padding-page);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    width: 160px;
    cursor: pointer;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sign-in-btn {
    border: 0;
    outline: 0;
    background: var(--primary-red);
    color: var(--text-white);
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sign-in-btn:hover {
    background-color: var(--primary-red-hover);
}

/* --- Language Dropdown --- */
.language-container {
    position: relative;
    display: inline-block;
}

.language-button {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--text-medium-gray);
    padding: 7px 10px;
    color: var(--text-white);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.language-button:hover {
    border-color: var(--text-white);
    background-color: rgba(0, 0, 0, 0.6);
}

.language-button img {
    width: 10px;
    margin-left: 8px;
    filter: invert(1);
    transition: transform 0.3s;
}

.language-button[aria-expanded="true"] img {
    transform: rotate(180deg);
}

.dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    min-width: 120px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.7);
    z-index: 10;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--element-gray-hover);
}

.dropdown.show {
    display: block;
}

.dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown li a {
    color: var(--text-white);
    display: block;
    font-size: 14px;
    padding: 10px 15px;
    transition: background-color 0.2s ease;
}

.dropdown li a:hover {
    background-color: var(--element-gray-hover);
}

/* --- Hero Section Content --- */
.header-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 3%;
    max-width: 950px;
    margin: 0 auto;
}

.header-content h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.header-content h3 {
    font-weight: 400;
    margin-bottom: 25px;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
}

.header-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 25px;
}

.email-signup {
    display: flex;
    align-items: center;
    margin-top: 30px;
    max-width: 700px;
    width: 100%;
}

.email-signup input {
    flex: 1;
    border: 1px solid var(--text-medium-gray);
    outline: 0;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-white);
    font-size: 16px;
    border-radius: 4px 0 0 4px;
}

.email-signup input::placeholder {
    color: var(--text-light-gray);
}

.email-signup button {
    background: var(--primary-red);
    border: 0;
    outline: 0;
    color: var(--text-white);
    font-size: 26px;
    font-weight: 500;
    cursor: pointer;
    padding: 15px 30px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
    border-radius: 0 4px 4px 0;
}

.email-signup button:hover {
    background-color: var(--primary-red-hover);
}

/* --- Movie Rows Section --- */
.content-row-section {
    padding: 40px var(--padding-page);
    border-bottom: 8px solid var(--section-divider-gray);
}

.content-row h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.scrolling-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.scrolling-wrapper::-webkit-scrollbar {
    height: 8px;
    background: var(--element-gray);
}

.scrolling-wrapper::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.poster {
    flex: 0 0 200px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.poster:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.poster img {
    width: 100%;
    border-radius: 4px;
}

/* --- Features Section --- */
.features {
    padding: 70px var(--padding-page) 50px;
    border-bottom: 8px solid var(--section-divider-gray);
}

.row {
    display: flex;
    width: 100%;
    align-items: center;
    flex-wrap: wrap;
    padding: 30px 0;
}

.text-col, .img-col {
    flex-basis: 50%;
    margin-bottom: 0;
}

.text-col {
    padding-right: 30px;
}

.img-col {
    padding-left: 30px;
}

.img-col img {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: auto;
}

.features h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.features p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 1.4;
    color: var(--text-light-gray);
}

/* --- FAQ Section (Accordion) --- */
.faq {
    padding: 70px var(--padding-page);
    text-align: center;
    border-bottom: 8px solid var(--section-divider-gray);
}

.faq h2 {
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 40px;
}

.accordion {
    margin: 40px auto;
    width: 100%;
    max-width: 750px;
}

.accordion li {
    list-style: none;
    width: 100%;
    margin-bottom: 8px;
}

.accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 400;
    background: var(--element-gray);
    cursor: pointer;
    position: relative;
    text-align: left;
    width: 100%;
    color: var(--text-white);
    border: none;
    outline: none;
    transition: background-color 0.3s ease;
}

.accordion-trigger:hover, .accordion-trigger.active {
    background-color: var(--element-gray-hover);
}

.accordion-trigger::after {
    content: '+';
    font-size: 34px;
    font-weight: 300;
    transition: transform 0.5s;
}

.accordion-trigger.active::after {
    transform: rotate(135deg);
}

.accordion .content {
    background: var(--element-gray);
    text-align: left;
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.4;
}

.accordion .content.active {
    max-height: 1000px;
    padding: 30px 25px;
}

.faq .small-text {
    font-size: 1.2rem;
    margin-top: 40px;
    margin-bottom: 20px;
    display: block;
    color: var(--text-light-gray);
}

.faq .email-signup {
    max-width: 600px;
    margin: 20px auto 60px;
}

/* --- Footer Section --- */
.footer {
    padding: 70px 15% 30px;
    border-top: 8px solid var(--section-divider-gray);
    color: var(--text-medium-gray);
}

.footer h2 {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 30px;
}

.footer .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
}

.footer .col {
    flex-basis: 23%;
    flex-grow: 1;
    margin-bottom: 20px;
    min-width: 160px;
}

.footer .col a {
    display: block;
    color: var(--text-medium-gray);
    font-size: 14px;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.footer .col a:hover {
    color: var(--text-white);
}

.footer-language-container {
    margin-top: 20px;
}

.footer-language-button {
    color: var(--text-white);
    background: var(--background-dark);
    padding: 10px 20px;
    border-radius: 3px;
    border: 1px solid var(--text-medium-gray);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-language-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-white);
}

.copyright-txt {
    font-size: 14px;
    margin-top: 20px;
    color: var(--text-medium-gray);
}

/* --- Responsive Design --- */
@media only screen and (max-width: 600px) {
    .header {
        padding: 20px 4%;
    }

    .logo {
        width: 100px;
    }

    .nav-right {
        gap: 8px;
    }
    
    .sign-in-btn, .language-button {
        font-size: 10px;
        padding: 6px 12px;
    }

    .header-content {
        padding-top: 100px;
        padding-bottom: 50px;
    }

    .header-content h1 {
        font-size: 1.8rem;
    }

    .email-signup {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
    }

    .email-signup input {
        width: 100%;
        margin-bottom: 15px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
    }
    
    .email-signup button {
        font-size: 1rem;
        padding: 12px 20px;
        width: 100%;
        border-radius: 4px;
    }

    .features {
        padding: 40px 4%;
    }

    .row {
        flex-direction: column;
        padding: 30px 0;
    }
    
    .text-col, .img-col {
        flex-basis: 100%;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    .features h2, .faq h2 {
        font-size: 1.8rem;
    }

    .accordion li label {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .accordion-trigger {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .accordion-trigger::after {
        font-size: 26px;
        right: 15px;
    }

    .faq .email-signup {
        margin: 15px auto 30px;
    }

    .footer {
        padding: 40px 4%;
    }

    .footer .row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer .col {
        min-width: 100%;
        margin-bottom: 15px;
    }
}