header{
    background-color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav {
    padding-right: 100px; /* Adds space from the right edge */
     
}

nav a {
    font-size: 30px; /* Makes text bigger - adjust this number as needed */
    text-decoration: none; /* Removes the underline */
    color: #333; /* Adds color to the text */
    padding-right: 20px;
}

.nav__list {
    display: flex;
    align-items: center;
    list-style: none;
}

.dropdown__item{
    cursor: pointer;
    position: relative; /* Create positioning context for the dropdown */
    margin-right: 6px; /* Add space between the dropdown and "Characters" */
}



.dropdown__link{
    padding: 0.40rem 1.25rem 0.40rem 2.5rem; /* Reduced top/bottom padding */
    color: white; /* Lighter color for readability on dark background */
    display: flex;
    align-items: center;
    column-gap: .5rem;
    font-size: 20px; /* Set a smaller font size for dropdown items */
    font-weight: var(--font-semi-bold);
    transition: background-color .3s;
}

.dropdown__link i{
    font-size: 1.25rem;
    font-weight: initial;
}

.dropdown__link:hover{
    background-color: #E7CD78;
    color: #333; /* Change text color for better contrast */
}

.dropdown__menu{
    position: absolute; /* Take menu out of document flow */
    top: 100%; /* Position it right below the parent */
    left: 0;
    background-color: rgba(0, 0, 0, 0.85); /* Transparent black background */
    padding: 10px 0;
    border-radius: 4px;
    list-style: none;
    min-width: 200px;
    opacity: 0; /* Hidden by default */
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.dropdown__item:hover .dropdown__menu{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Styles for the dropdown arrow icon */
.dropdown__arrow {
    font-size: 1.75rem; /* Size of the arrow */
    color: #333; /* Set arrow color to match nav links */
    margin-left: 1px; /* Adjust space between "Seasons" and arrow */
    transform: translateY(2px); /* Nudge the arrow down slightly */
    
}




#logo{
    width: 350px;
    margin: 0px;
    padding-left: 50px;
}



body{
    font-family: "EB Garamond", serif;
    font-weight: 400;
    background-color: #E7CD78;
}

.titles {
    text-align: center;
    padding: 20px 0;
}

#sinopsis {
    display: flex;
    flex-direction: column; /* stack items vertically --> cambia el axis*/
    align-items: center;
    font-size: 1.25rem;   /* ~20px; bump as needed (e.g., 1.4rem) */
    line-height: 1.6;
    gap: 28px;             /* space between each block */
    text-align: center;    /* Center the h1 text */
}

/* Make each block (p + img) stack nicely */
#sinopsis div {
    display: flex;
    flex-direction: row;
    align-items: flex-start; /* don't vertically center */
    gap: 16px;
}

#sinopsis div p {
    margin: 0;
    flex: 0 0 auto;      /* don't stretch */
    text-align: left;    /* Keep paragraph text left-aligned */
    max-width: 48ch;     /* readable line length (~38 characters) */ 
}

#sinopsis > div:last-child {
    margin-bottom: 24px;
}



/* Keep poster size responsive and on its own line */
.posters {
    width: 100%;
    max-width: 14em;      /* grows with #sinopsis font-size */
    height: auto;
    display: block;
}

.sociales{
    width: 24px;
    height: 24px;
    object-fit: contain;
    
}

.sociales:hover{
    width: 50px;
    margin-right: 10px;
    margin-left: 10px;
}



/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/* Optional: bigger on wider screens */
@media (min-width: 768px) {
    #sinopsis { font-size: 1.35rem; }
    img.posters { max-width: 16em; }
}

footer{
    background-color: white;
    padding: 2px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

footer > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px; /* adjust spacing */
}

.enlaces{
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, transform .15s ease;
}

.enlaces:hover{
    color: #DEB64B;
}




/*RESPONSIVE*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/

/* Mobile/tablet overrides only */
@media (max-width: 600px){
    /* Header/nav */
    #logo{ max-width: 60vw; height: auto; }
    nav{ padding-right: 16px; }
    .enlaces{ font-size: 16px; padding: 6px 10px; }

    /* Sinopsis layout: stack text and image */
    #sinopsis{ padding: 0 16px; gap: 20px; }
    #sinopsis div{
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    #sinopsis div p{ max-width: 60ch; }
    .posters{ max-width: 220px; width: 100%; height: auto; }

    /* Footer: wrap icons nicely */
    footer{ flex-wrap: wrap; gap: 12px; padding: 8px 16px; }
    footer > div:first-child{ flex-wrap: wrap; gap: 12px; }
}

/* Larger tablets and up (optional tweaks) */
@media (min-width: 601px) and (max-width: 1024px){
    #sinopsis div{ gap: 20px; }
    .posters{ max-width: 240px; }
}

/* Burger hidden on desktop */
#menu-toggle{
    display: none;
    font-size: 28px;
    background: none;
    border: 0;
    cursor: pointer;
}

/* Mobile */
@media (max-width: 768px){ /* Increased breakpoint for tablets */
    /* show burger */
    #menu-toggle{ display: block; }

    /* Hide nav menu by default */
    .nav__menu {
        display: none;
        position: absolute;
        top: 60px; /* Position below header */
        right: 10px;
        width: 200px;
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        padding: 10px;
    }

    .nav__list { flex-direction: column; align-items: flex-start; gap: 12px; }
    .dropdown__item { margin-right: 0; }
}





/*CONTACT*/
#contact-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 40px 20px;
    flex-wrap: wrap;
}
 
.contact-card {
    background-color: antiquewhite;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.contact-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.contact-details {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    font-size: 18px;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-details i {
    font-size: 24px;
    color: #333;
}

.map-container {
    border-radius: 8px;
    width: 100%;
}

#contact_form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contact_form label {
    font-weight: 600;
    font-size: 16px;
}

#contact_form input[type="text"],
#contact_form input[type="tel"],
#contact_form input[type="email"],
#contact_form textarea {
    font-family: "EB Garamond", serif;
    font-size: 16px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fdfdfd;
}

#contact_form input[type="submit"] {
    font-family: "EB Garamond", serif;
    font-size: 18px;
    font-weight: 600;
    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: #333;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact_form input[type="submit"]:hover {
    background-color: #DEB64B;
    color: #333;
}

/*GALLERY*/
#pictures{
    margin-top: 50px;
    margin-bottom: 40px;
    padding: 20px;
    align-items: center;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.image-container {
    flex: 0 1 250px; /* Flex-grow, flex-shrink, flex-basis */
    display: flex;    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    padding: 10px;
}

.image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.image-container:hover .gallery-image {
    transform: scale(1.05);
}

#pictures p {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

#modalImage {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.modal-caption {
    color: white;
    font-size: 18px;
    margin: 20px 0;
    font-weight: 500;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close:hover {
    color: #DEB64B;
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.nav-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    pointer-events: all;
    z-index: 1001;
}

.nav-btn:hover {
    background: rgba(222, 182, 75, 0.8);
    transform: scale(1.1);
}

#prevBtn {
    margin-left: -60px;
}

#nextBtn {
    margin-right: -60px;
}

.image-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0,0,0,0.7);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .gallery-image {
        height: 150px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    #modalImage {
        max-height: 60vh;
    }
    
    .nav-btn {
        font-size: 24px;
        padding: 12px 16px;
    }
    
    #prevBtn {
        margin-left: -40px;
    }
    
    #nextBtn {
        margin-right: -40px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .gallery-image {
        height: 120px;
    }
    
    .nav-btn {
        font-size: 20px;
        padding: 10px 12px;
    }
    
    #prevBtn {
        margin-left: -30px;
    }
    
    #nextBtn {
        margin-right: -30px;
    }
}






/*SEASONS*/

.theseasons{
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: antiquewhite;
    margin: 40px 150px;
    padding: 24px;
    border-radius: 8px;
    gap: 24px;
    font-size: 25px;
}

.season-info{
    flex: 1;
}

.season-info h2 a {
    color: inherit; /* Make link color same as heading */
    text-decoration: none; /* Remove underline */
    transition: color 0.2s ease;
}

.season-info h2 a:hover {
    color: #333; /* Darken text on hover */
    text-decoration: underline;
}

/* Responsive stacking for seasons */
@media (max-width: 768px) {
    .theseasons {
        flex-direction: column;
        margin: 20px 16px;
        font-size: 18px;
    }

    .img-seasons {
        width: 100%;
        max-width: 300px; /* Prevent image from being too large */
        height: auto;
    }
}

/* Mobile landscape */
@media (max-width: 900px) and (max-height: 500px) {
    .theseasons {
        flex-direction: column;
        margin: 20px 16px;
        font-size: 18px;
    }
}


.episodes-list{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px; /* This will control the space between cards */
    margin-bottom: 40px;
}

.episode{
    background-color: antiquewhite;
    margin: 0 150px; /* Remove vertical margin */
    padding: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 25px;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
}

.img-episodes{
    width: 400px;
    height: 200px;
}

/* Responsive adjustments for episode cards */
@media (max-width: 768px) {
    .episode {
        flex-direction: column;
        margin: 0 16px; /* Reduce side margins */
        font-size: 18px; /* Adjust font size for smaller screens */
    }

    .img-episodes {
        width: 100%;
        max-width: 400px; /* Ensure it doesn't get too big */
        height: auto; /* Maintain aspect ratio */
    }
}





/*CHARACTERS*/

.character-section{
    display: flex;
    flex-direction: column;
    align-items: center;
    
}

.servants-title {
    margin-top: 40px; /* Add space above "The Servants" title */
    text-align: center;
}

.characters_container{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex-direction: row;
    align-content: center;
}

.text {
    display: flex;
    flex-direction: column;
    height: 100%; /* Make text fill the height of the image */
    width: 250px;
    font-size: 18px;
    margin: 20px;
}

.character {
    
    flex-direction: row;
    background-color: antiquewhite;   
    display: flex;
    justify-content: center;
    background-color: antiquewhite;
    padding: 24px;
    border-radius: 8px;
    margin: 20px;
}

/* Responsive adjustments for character cards */
@media (max-width: 1200px) {
    .characters_container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .character {
        flex-direction: column;
        align-items: center;
        width: 90%;
        max-width: 400px;
        padding: 16px;
    }

    .text {
        width: 100%;
        text-align: center;
        margin: 15px 0 0 0;
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 900px) and (max-height: 500px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    #logo {
        padding-left: 0;
        margin-bottom: 10px;
    }

    nav {
        padding-right: 0;
    }

    footer {
        flex-direction: column;
    }
}
