/* ============ Website Wide Styles ============ */

/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400..700;1,400..700&family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Manrope:wght@200..800&family=Oswald:wght@200..700&display=swap');

/* CSS variables */
:root {
    --primary-font: "Cabin", sans-serif;
    --primary-color: #251F1E; /* brown‑black */
    --secondary-color: #eff0e2; /* pale yellow / white */
    --highlight-color: #C65A5A; /* warm red */
    --secondary-highlight-color: #F2C94C; /* golden yellow */
    --third-highlight-color: #e84f4f; /* alternative red colour */
    --fourth-highlight-color: #d0b566; /* alternative yellow colour */
    --fifth-highlight-color: #D99B9B; /* alternative red colour used for titles */
}

/* Global styles */
body {
    color: var(--secondary-color);
    background-color: var(--primary-color);
    font-family: var(--primary-font);
}

/* Nav bar */
#navbar {
    background-color: var(--primary-color) !important;
    text-transform: uppercase;
}

#navbar .navbar-brand {
    color: var(--secondary-color);
}

#navbar .nav-link {
    color: var(--secondary-color);
    margin: 0 1rem;
    border-bottom: 2px solid transparent;
    transition: all 200ms ease;
}

#navbar .nav-link:hover {
    background-image:
        linear-gradient(to right, var(--highlight-color), var(--secondary-highlight-color)), /* Created two gradients (one for the text, one for the underline) */
        linear-gradient(to right, var(--highlight-color), var(--secondary-highlight-color));
    background-size: 100% 100%, 100% 2px; /* Stack gradients as background layers (full-size layer for the text and thin layer for the underline) */
    background-position: 0 0, 0 100%;     /* Position the second gradient at the bottom so it becomes a gradient underline */
    background-repeat: no-repeat;
    -webkit-background-clip: text, border-box; /* Text layer clipped to text and underline layer clipped to border area */
    background-clip: text, border-box;
    -webkit-text-fill-color: transparent; /* Made the text transparent so the gradient becomes the visible*/
}

.navbar-logo {
    height: 45px;
    width: auto;
}

/* Home page and sub page titles */
.title.slide {
  font-weight: 900;
  font-size: clamp(48px, 14vw, 96px);
  background: linear-gradient(90deg, var(--highlight-color), var(--secondary-highlight-color), var(--third-highlight-color), var(--fourth-highlight-color), var(--fifth-highlight-color));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: slide 7s linear infinite;
}

@keyframes slide {
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

.page-title {
  font-weight: 900;
  font-size: clamp(40px, 10vw, 80px); /* reduce page title size for Discover and FAQ pages*/
  background-image: linear-gradient(to right, var(--fifth-highlight-color), var(--secondary-highlight-color));
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Spacing between the results section and footer section*/
.results-spacing {
    margin-bottom: 6rem;
}

/* Footer section */
.footer-header {
    font-size: 1.7rem;
}

.footer-text {
    font-size: 0.85rem;
}

.footer-text a {
    color: var(--secondary-color);
}

/* Footer top divider */
.footer-top-border {
    border-top: 2.5px solid var(--secondary-color);
}

/* Vertical divider between footer columns */
.footer-col-divider {
    border-right: 2.5px solid var(--secondary-color);
}

/* Footer section social media links */
.social-media-links a {
    color: var(--secondary-color);
    font-size: 1.3rem;
    padding: 10px;
    transition: 0.3s ease; /* smooth animation for hover */
}

.social-media-links a:hover {
    color: var(--secondary-highlight-color);
}


/* ============ Search Page Styles ============ */

/* Search bar */
#search-box {
    max-width: 500px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    background-color: transparent;
    border: 3px solid var(--secondary-color);
    color: var(--secondary-color)!important;
    border-radius: 23px;
}

#search-box::placeholder {
    color: var(--secondary-color);
    opacity: 0.5;
}

#search-box:focus { 
    background-color: transparent;
    border: 3px solid var(--secondary-color);
    color: var(--secondary-color)!important;
    box-shadow: none; /* removes Bootstrap blue glow */
    outline: none; /* removes browser outline */
}

/* Cancel button in search bar - turning it from grey to white using solution provided by Copilot */
.search-clear::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  cursor: pointer;
  opacity: 0.7;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ffffff'><path d='M3.3 3.3l9.4 9.4m0-9.4l-9.4 9.4' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/></svg>") no-repeat center;
}

.search-clear::-webkit-search-cancel-button:hover {
  opacity: 1;
}

/* Search mode toggle */
#mode-toggle {
    max-width: 300px;
    background-color: transparent;
    border: 3px solid var(--secondary-color);
    color: var(--secondary-color)!important;
    border-radius: 23px;

    /* Remove native Bootstrap arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Add custom white arrow - solution to problem provided by Copilot similar to search bar cancel button */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='white'><path d='M5.5 7l4.5 4.5L14.5 7'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 24px;
    padding-right: 2.5rem;

}

#mode-toggle option { 
    background-color: var(--primary-color); /* This removes the white background on the options when using mode toggle */
    color: var(--secondary-color);
}

#mode-toggle:focus { 
    border-color: var(--secondary-color);
    box-shadow: none; /* removes Bootstrap blue glow */
    outline: none; /* removes browser outline */
}


/* Search button */
#search-btn {
    background-color: transparent;
    border-color: var(--secondary-color);
    border: 2.5px solid var(--secondary-color);
    border-radius: 40px;
    color: var(--secondary-color)!important;
}

#search-btn:hover {
    background: linear-gradient(to right, var(--highlight-color), var(--secondary-highlight-color))!important;
    border-color: var(--secondary-highlight-color);
    color: var(--primary-color)!important;
}

#search-btn:focus,
#search-btn:active,
#search-btn:focus-visible {
    background: linear-gradient(to right, var(--highlight-color), var(--secondary-highlight-color))!important;
    border-color: var(--secondary-highlight-color)!important;
    box-shadow: none !important; /* removes Bootstrap blue glow */
    outline: none !important; /* removes browser outline */
}

/* Results section of search page */
.results-grid {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Individal festival cards generated */
.event-card {
    display: flex;
    gap: 15px;
    padding: 50px;
    border-radius: 20px;
    border: 2px solid var(--secondary-color);
    background: var(--primary-color);
    align-items: center;
}

/* Rounding edges of festival posters on festival cards */
.event-card img {
    border-radius: 7px;
    max-height: 200px;
}

/* Festival name on card container */
.event-info h2 {
    margin-bottom: 0.75rem; 
    font-size: 1.5rem;
}

/* Festival location and date on card containers */
.event-meta {
    margin-bottom: 0.75rem; 
}

.event-meta span:first-child {
    margin-right: 1rem;
}

/* Festival info on card container */
.event-description {
    margin-bottom: 0.75rem; 
}

/* Tickets / Skiddle button on card container*/
.event-button {
    background-color: transparent;
    border-color: var(--secondary-color);
    border: 2.5px solid var(--secondary-color);
    border-radius: 20px;
    color: var(--secondary-color)!important;
}

.event-button:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color)!important;
}

/* Highlighting searched artist on lineup */
.highlight-artist {
    color: var(--secondary-highlight-color);
    font-weight: bold;
}

/* Read more link included within festival card */
.read-more-link {
    color: var(--fifth-highlight-color); 
    font-weight: 600;
    text-decoration: none;
    text-decoration: underline;
}

.read-more-link:hover {
    cursor: pointer;
    font-weight: bold;
}

/* ============ Discover Page Styles ============ */

/* Styling the Featured Festivals cards on the carousel */

.featured-card {
    max-width: 1300px;
    height: 360px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
}

.featured-card .event-image {
    width: 216px;
    height: auto;
    object-fit: cover;
}

.featured-card .event-info {
    flex: 1; 
}

.event-card {
    position: relative;
}

/* Arrows on Featured Festivals carousel */
.carousel-control-prev,
.carousel-control-next {
    width: 5rem; /* pushes arrows outward */
}

/* Date on Lineup Announcement container */
.announcement-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.8;
    background: var(--gradient-1);
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--secondary-color);
    font-weight: 500;
}

/* ============ FAQ Page Styles ============ */

/* Style the accordion body to match the header */
.faq-accordion .accordion-body {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* Remove white corners by matching accordion-item to variables */
.faq-accordion .accordion-item {
    background: var(--primary-color) !important;
    border: none;
    border-radius: 20px !important;
}

/* Makes accordion arrow white and then pale-orange */
.faq-accordion .accordion-button::after {
    filter: invert(1); /* Inversion used as arrows are already black and blue, so this turns them white & orange with least amount of code */
}

/* Add primary-color divider between each question */
.faq-accordion .accordion-item {
    border-top: 2.5px solid var(--secondary-color);
}

/* Add a border under the final accordion item */
.faq-accordion .accordion-item:last-of-type {
    border-bottom: 2.5px solid var(--secondary-color);
}

/* Style the accordion headers + remove Bootstrap defaults */
.faq-accordion .accordion-button {
    background: var(--primary-color) !important;
    color: var(--secondary-color) !important;
    border-radius: 20px !important;
    box-shadow: none !important;
}

/* ============ 404 Page Styles ============ */

/* Home button on 404.html - had to replicate id to allow bootstrap css to still work */ 
#home-btn {
    background-color: transparent;
    border-color: var(--secondary-color);
    border: 2.5px solid var(--secondary-color);
    border-radius: 40px;
    color: var(--secondary-color)!important;
}

#home-btn:hover {
    background: linear-gradient(to right, var(--highlight-color), var(--secondary-highlight-color))!important;
    border-color: var(--secondary-highlight-color);
    color: var(--primary-color)!important;
}

#home-btn:focus,
#home-btn:active,
#home-btn:focus-visible {
    background: linear-gradient(to right, var(--highlight-color), var(--secondary-highlight-color))!important;
    border-color: var(--secondary-highlight-color)!important;
    box-shadow: none !important; /* removes Bootstrap blue glow */
    outline: none !important; /* removes browser outline */
}


/* ============ Media Queries ============ */

/* Small devices (mobile, 768px and below) */
@media (max-width: 768px) {
    .event-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-col-divider {
        border-right: none;
    }

    .event-meta {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .event-meta span:first-child {
        margin-right: 0rem;
    }

    .featured-card {
        height: 720px;
    }
}
