/* General Styling */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}




/* Centered Image inside the box */

/* Header Background */
.header_background {
    width: 100%;
    padding: 0;
    background-color: #E23636;
;}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    background-color: #E23636;
    height: 100px;
}

.search {
    width: 50%; 
    padding: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 1rem; 
    margin-top: 1rem;
}

/* Logo Section */
.header_logo {
    background-color: #555;
    color: white;
    padding: 10px;
    font-size: 1.5rem;
    flex: 1;
}

/* Search Bar Section */
.header_search {
    background-color: #555;
    color: white;
    padding: 10px;
    text-align: right;
    font-size: 1.5rem;
    flex: 4;
}

/* Movie Layout Grid */
.movie-layout {
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 10px;
    padding: 20px;
    width: 100%;
}

.movie-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

/* Center Movie Name and Poster */
.movie-name, .movie-poster {
    background-color: #dcdcdc;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    width: 100%;
}

/* Center Movie Details */
.movie-details {
    background-color: #bcbcbc;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    width: 100%;
}


.starring{
    color: white;
}

/* Grid Layouts for Starring, Images, Related Movies */
.starring, .images, .related-movies {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    width: 100%;
}

/* Center Actor, Image, and Related Boxes */
.actor-box, .image-box, .related-box {
    background-color: #a8a8a8;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-align: center;
}

/* Movies Section */
.movies-section {
    color: rgb(0, 0, 0);
    padding: 5px;
}

/* Category Titles */
.category h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.category p {
    color: #f78f2e;
    margin-bottom: 20px;
}

/* Movie Grid Layout */
.movie-display-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center; 
    padding-top: 5px;
    width: 60.0rem;
    margin: 3.0rem auto;
}

/* Footer */

/* Footer Logo */


/* Responsive Media Queries */
@media screen and (max-width: 1024px) {
    .header {
        padding: 15px;
        height: 80px;
    }

    .header_logo, .header_search {
        font-size: 1.2rem;
        padding: 5px;
    }

    .movie-display-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .actor-box, .image-box, .related-box {
        height: 350px;
        width: 200%;
        font-size: 1rem;
    }

    .starring, .images, .related-movies {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .movie-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .movie-name, .movie-poster {
        height: 250px;
        font-size: 1.5rem;
    }

    .movie-details {
        height: 150px;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
    }

   /* Mobile (480px and below) */
@media (max-width: 480px) {
  .movie-display-grid {
      grid-template-columns: repeat(1, 1fr); /* 1 column on mobile */
      width: 95%; /* Full width with padding */
  }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .movie-display-grid {
      grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
      width: 90%; /* Make it more flexible */
  }
}

    .actor-box, .image-box, .related-box {
        height: 200px;
        font-size: 0.9rem;
    }

    .starring, .images, .related-movies {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .movie-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .movie-name, .movie-poster {
        height: 200px;
        font-size: 1.2rem;
    }

    .movie-details {
        height: 120px;
        font-size: 1rem;
    }

    .movies-section {
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .header_logo, .header_search, .footer-logo, .footer-social-media {
        font-size: 1rem;
        padding: 5px;
    }

    .actor-box, .image-box, .related-box {
        height: 150px;
        font-size: 0.8rem;
    }

    .movie-name, .movie-poster {
        height: 150px;
        font-size: 1rem;
    }

    .movie-details {
        height: 100px;
        font-size: 0.9rem;
    }

    .starring, .images, .related-movies {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .movies-section {
        padding: 5px;
    }
}

.search-results {
    position: absolute;
    width: 17.0rem;
    background-color: rgb(0, 0, 0);
    top: 5.0rem;
    left: 18.0rem;
    border: 1px solid yellow;
    z-index: 2000000;
    display: none;
}

.searchBar {
    padding-top: 2rem;
}

.search-bar {
    position: relative;
}
.searchBar input[type="text"]{
    padding: 0.5rem;    
    border-radius: 2rem;
    }

    /* Tablet View */
@media (max-width: 768px) {
    .movie-box {
        width: 80%;
        max-width: 350px;
    }

    .movie-box div {
        font-size: 1.1rem;
    }
}

/* Mobile View */
@media (max-width: 480px) {
    .movie-box {
        width: 95%;
        max-width: 300px;
    }

    .movie-box div {
        font-size: 1rem;
    }

    .no-js {
        width: 100%;
        padding: 0 0 !important; /* Reduces padding for full-width layout */
    }
    .search{
        display: none;
    }
}


html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

.no-js {
    width: 100%;
    margin: 0 auto; /* Centers the content */
}


/* Tablet View */
@media (max-width: 768px) {
    .movie-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }

    .movie-details {
        margin: 0 auto;
        width: 100%;
    }

    .movie-info {
        border-bottom: 1px solid #7f8c8d;
        padding-bottom: 10px;
        margin-bottom: 10px;
        text-align: center;
    }

    .movie-poster {
        max-width: 300px;
        margin: 0 auto;
    }

    .search { 
        display: none;
    }
}

/* Mobile View */
@media (max-width: 480px) {
    .movie-movie-name {
        font-size: 2rem;
    }

    .movie-poster {
        max-width: 250px;
    }

    .movie-layout {
        padding: 10px;
    }

    .movie-info p {
        font-size: 0.9rem;
    }

    .movie-description {
        font-size: 1rem;
        padding: 0 10px;
    }
}

/* Base styles for section headers and images */
.section-header {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }
  
  .section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #E23636;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
    margin: 0 auto;
  }
  
  /* Starring images */
  .starring img {
    width: 90%;
    max-width: 150px;
    height: auto;
    object-fit: cover;
    padding: 1rem;
  }
  
  /* Movie images */
  .movie-images img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    padding: 1rem;
  }
  
  /* Related movies images */
  .related-movies img {
    width: 90%;
    max-width: 200px;
    height: auto;
    object-fit: cover;
  }
  
  /* Tablet View */
  @media (max-width: 768px) {
    .section-title {
      font-size: 1rem;
    }
  
    .starring img {
        width: 190px;
        height: 130px !important;
    }
  
    .movie-images img {
      max-width: 300px;
    }
  
    .related-movies img {
      max-width: 150px;
    }
  }
  
  /* Mobile View */
  @media (max-width: 480px) {
    .section-title {
      font-size: 1.8rem;
    }
  
    .starring img {
      max-width: 100px;
    }
  
    .movie-images img {
      max-width: 250px;
    }
  
    .related-movies img {
      max-width: 120px;
    }
  }
  
  
  /* Base Styles for People Section */
.people-show {
    background-color: #000;
    font-family: Arial, sans-serif;
    color: #f1f1f1;
    padding: 2rem 0;
  }
  
  .people-show .people-container {
    width: 80%;
    margin: auto;
    background-color: #2a2a2a;
    padding: 2rem;
  }
  
  /* Actor Info Section */
  .people-show .actor-info {
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .people-show .actor-info h1 {
    font-size: 2rem;
    color: #E23636;
    margin-bottom: 0.5rem;
  }
  
  .people-show .people-poster {
    width: 90%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    padding: 1rem;
  }
  
  /* Biography Section */
  .people-show .actor-biography {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
  }
  
  /* Images Section */
  .people-show .images-section h3,
  .people-show .related-section h3 {
    font-size: 1.5rem;
    color: #E23636;
    text-align: center;
    margin: 1rem 0;
  }
  
  .people-show .images-section .images,
  .people-show .related-section .related-images {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .people-show .images-section .images img,
  .people-show .related-section .related-images img {
    width: 90%;
    max-width: 200px;
    height: auto;
    object-fit: cover;
  }
  
  /* Tablet View */
  @media (max-width: 768px) {
    .people-show .people-container {
      width: 95%;
      padding: 1.5rem;
    }
    
    .people-show .actor-info h1 {
      font-size: 1.8rem;
    }
    
    .people-show .people-poster {
      max-width: 250px;
    }
    
    .people-show .images-section .images img,
    .people-show .related-section .related-images img {
      max-width: 150px;
    }
  }
  
  /* Mobile View */
  @media (max-width: 480px) {
    .people-show .people-container {
      width: 100%;
      padding: 1rem;
    }
    
    .people-show .actor-info h1 {
      font-size: 1.5rem;
    }
    
    .people-show .people-poster {
      max-width: 200px;
    }
    
    .people-show .images-section .images img,
    .people-show .related-section .related-images img {
      max-width: 120px;
    }
  }

 
  
  .related-images img {
    width: 90%;
    max-width: 200px;
    height: auto;
    object-fit: cover;
  }
  
  /* Tablet View */
  @media (max-width: 768px) {
    .related-section h3 {
      font-size: 1.4rem;
    }
    .related-images img {
      max-width: 150px;
    }
  }
  
  /* Mobile View */
  @media (max-width: 480px) {
    .related-section h3 {
      font-size: 1.3rem;
    }
    .related-images img {
      max-width: 120px;
    }
  }
  