/*
 * BEHIND THE MAGIC CURTAIN - MODERN STYLESHEET
 * Brand: Behind The Magic Curtain
 */

/* ---------------------------------- */
/* 1. Design System & Variables       */
/* ---------------------------------- */

:root {
    /* Brand Palette */
    --color-primary: #bd2419;        /* Theatre Red */
    --color-secondary: #ffd700;      /* Star Gold */
    --color-accent: #00838f;         /* Accessible Deep Teal */
    --color-accent-hover: #005662;

    /* Neutrals & Surfaces */
    --color-text: #222222;          /* High contrast primary text */
    --color-text-light: #555555;    /* Subtitles and body secondary */
    --color-border: #e0e0e0;
    --color-bg-light: #f8f9fa;
    --color-bg-white: #ffffff;

    /* Tag & Badge Accent Colors */
    --color-tag-adhd: #007788;       /* Deep Cyan / Dark Text */
    --color-tag-age: #8e1088;        /* Plum Purple */
    --color-tag-sensory: #1b7a2b;    /* Forest Green */
    --color-tag-mature: #a1005a;     /* Berry Pink */
    --color-tag-touring: #2e7d32;    /* Touring Green */

    /* Typography */
    --font-heading: 'Raleway', sans-serif;
    --font-subheading: 'Playfair Display', Georgia, serif;
    --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout Geometry */
    --container-width: 1040px;
    --header-height: 80px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* ---------------------------------- */
/* 2. Global Reset & Base Elements    */
/* ---------------------------------- */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg-white);
    text-rendering: optimizeLegibility;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

a:hover {
    color: var(--color-primary);
}

/* ---------------------------------- */
/* 3. Typography                      */
/* ---------------------------------- */

h1, h2, h3, h4 {
    line-height: 1.25;
    margin-bottom: 0.6em;
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--color-primary);
}

h2 {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--color-text);
    margin-top: 1.2em;
}

h3 {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-text);
}

p {
    margin-bottom: 1.4em;
    color: var(--color-text-light);
}

ul, ol {
    margin-bottom: 1.5em;
    padding-left: 24px;
}

li {
    margin-bottom: 0.6em;
    color: var(--color-text-light);
}

hr {
    border: 0;
    height: 1px;
    background: var(--color-border);
    margin: 2.5em 0;
}

/* ---------------------------------- */
/* 4. Header & Navigation             */
/* ---------------------------------- */

.site-header {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-bg-white);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-family: var(--font-subheading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-bg-white);
    padding: 8px 4px;
    border-bottom: 3px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-secondary);
    border-bottom-color: var(--color-secondary);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
}

.hamburger {
    display: block;
    position: relative;
    width: 26px;
    height: 3px;
    background: var(--color-bg-white);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-bg-white);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* ---------------------------------- */
/* 5. Buttons & Badges                */
/* ---------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: #222;
    border-color: var(--color-secondary);
}

.btn-primary:hover {
    background-color: #fff;
    color: #222;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-bg-white);
    transform: translateY(-2px);
}

/* Category Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 16px 0;
}

.tag {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.tag-adhd { background-color: var(--color-tag-adhd); }
.tag-age { background-color: var(--color-tag-age); }
.tag-sensory { background-color: var(--color-tag-sensory); }
.tag-mature { background-color: var(--color-tag-mature); }
.tag-touring { background-color: var(--color-tag-touring); }

/* ---------------------------------- */
/* 6. Rating Stars                    */
/* ---------------------------------- */

.star-rating {
    position: relative;
    display: inline-block;
    font-size: 1.15rem;
    margin-bottom: 10px;
    line-height: 1;
}

.stars-empty,
.stars-full {
    display: flex;
    gap: 3px;
}

.stars-empty {
    color: #d1d5db;
}

.stars-full {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: var(--color-secondary);
}

.card-star-rating,
.header-star-rating {
    display: inline-flex;
    gap: 4px;
    color: var(--color-secondary);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.card-star-rating .fa-regular,
.header-star-rating .fa-regular {
    color: #d1d5db;
}

.review-header .star-rating {
    font-size: 1.6rem;
    margin-top: 10px;
}

/* ---------------------------------- */
/* 7. Homepage & Section Blocks       */
/* ---------------------------------- */

section {
    padding: 60px 0;
}

.hero {
    background: linear-gradient(180deg, var(--color-bg-light) 0%, #ffffff 100%);
    text-align: center;
    padding: 90px 0 70px 0;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    margin-bottom: 0.3em;
}

.hero .subtitle {
    font-family: var(--font-subheading);
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 650px;
    margin: 0 auto 30px auto;
}

.cta {
    background: linear-gradient(135deg, var(--color-accent) 0%, #005662 100%);
    color: var(--color-bg-white);
    text-align: center;
    border-radius: var(--radius-lg);
    margin: 40px auto;
    max-width: var(--container-width);
}

.cta h2 {
    color: var(--color-bg-white);
    font-family: var(--font-heading);
    margin-top: 0;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.page-header {
    background-color: var(--color-bg-light);
    border-bottom: 1px solid var(--color-border);
    padding: 50px 0;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 0.2em;
}

.page-header p {
    font-family: var(--font-subheading);
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin: 0;
}

/* Welcome Block */
.btmc-welcome-section {
    background-color: #ffffff;
    padding: 70px 0;
}

.btmc-welcome-intro,
.btmc-welcome-outro {
    max-width: 780px;
    margin: 0 auto 40px auto;
    text-align: center;
}

.btmc-welcome-intro h2 {
    font-family: var(--font-subheading);
    font-size: 2.4rem;
    color: var(--color-primary);
    margin-top: 0;
}

.btmc-feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 50px;
}

.btmc-feature-block.reversed .btmc-feature-image { order: 2; }
.btmc-feature-block.reversed .btmc-feature-text { order: 1; }

.btmc-feature-text h3 {
    font-family: var(--font-subheading);
    font-size: 2rem;
    color: var(--color-primary);
    margin-top: 0;
}

.btmc-feature-image img,
.btmc-image-stack img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.btmc-image-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: center;
}

/* ---------------------------------- */
/* 8. Filter Bar (Reviews Page)       */
/* ---------------------------------- */

.filter-section {
    padding: 35px 0 10px 0;
    background: #ffffff;
}

.filter-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 50px;
    background: var(--color-bg-white);
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-bg-white);
}

/* ---------------------------------- */
/* 9. Card Grids & Layouts            */
/* ---------------------------------- */

/* Review Cards Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.card-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.card-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 18px;
}

.card-content .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* What's On Listing Card */
.listing-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-content {
    padding: 25px 25px 25px 0;
    display: flex;
    flex-direction: column;
}

.listing-content h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.listing-info {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.listing-info li {
    font-size: 0.95rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.listing-info li i {
    color: var(--color-primary);
    width: 18px;
    text-align: center;
}

/* Theatre Guide Cards */
.theatre-card {
    display: flex;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theatre-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.theatre-img-container {
    flex: 0 0 320px;
}

.theatre-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theatre-info {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.theatre-info h2 {
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 6px;
    font-family: var(--font-heading);
    font-size: 1.7rem;
}

.theatre-location {
    font-weight: 700;
    color: var(--color-text-light);
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theatre-location i {
    color: var(--color-primary);
}

.theatre-meta {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
}

.theatre-meta p {
    margin-bottom: 0.8em;
}

.theatre-meta strong {
    color: var(--color-text);
}

.theatre-info .btn {
    align-self: flex-start;
}

/* ---------------------------------- */
/* 10. Single Review Page Details     */
/* ---------------------------------- */

.review-header .card-tags {
    justify-content: center;
}

.review-subtitle {
    font-family: var(--font-subheading);
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.review-main-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin: 20px 0 35px 0;
    box-shadow: var(--shadow-card);
}

.content-article {
    max-width: 780px;
    margin: 0 auto;
}

.content-article h2 {
    color: var(--color-primary);
    font-family: var(--font-heading);
    margin-top: 1.6em;
}

.content-article article {
    background: var(--color-bg-light);
    padding: 25px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary);
    margin: 2.5em 0;
}

.content-article article h3 {
    margin-top: 0;
    color: var(--color-primary);
}

/* Swiper Carousel */
.review-gallery {
    margin: 40px 0;
}

.review-gallery h2 {
    text-align: center;
    margin-bottom: 20px;
}

.swiper {
    width: 100%;
    height: 480px;
    border-radius: var(--radius-md);
    background: var(--color-bg-light);
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--color-primary) !important;
}

.swiper-pagination-bullet-active {
    background: var(--color-primary) !important;
}

/* ---------------------------------- */
/* 11. Footer                         */
/* ---------------------------------- */

.site-footer {
    background: #1a1a1a;
    color: #aaaaaa;
    padding: 50px 0 35px 0;
    text-align: center;
    margin-top: 60px;
}

.footer-social-tagline {
    font-family: var(--font-subheading);
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 18px;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-bottom: 25px;
}

.footer-social-links a {
    color: #ffffff;
    font-size: 1.7rem;
    transition: transform 0.25s ease, color 0.25s ease;
    display: inline-flex;
}

.footer-social-links a:hover {
    color: var(--color-secondary);
    transform: translateY(-3px) scale(1.1);
}

.footer-copyright {
    font-size: 0.85rem;
    color: #777777;
    margin: 0;
}

/* ---------------------------------- */
/* 12. Mobile Responsive Rules        */
/* ---------------------------------- */

@media (max-width: 850px) {
    .site-header .container {
        position: relative;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav ul {
        display: none;
        position: absolute;
        top: var(--header-height);
        right: 0;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--color-primary);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        padding: 10px 20px 20px 20px;
        gap: 0;
    }

    .main-nav.nav-open ul {
        display: flex;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        padding: 14px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .main-nav a:hover,
    .main-nav a.active {
        border-bottom-color: var(--color-secondary);
        background: transparent;
    }

    /* Animated Mobile Menu Icon */
    .nav-open .hamburger {
        background: transparent;
    }
    .nav-open .hamburger::before {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .nav-open .hamburger::after {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Stack Complex Layouts */
    .card-grid {
        grid-template-columns: 1fr;
    }

    .listing-card {
        grid-template-columns: 1fr;
    }

    .listing-content {
        padding: 20px;
    }

    .listing-image img {
        height: 220px;
    }

    .theatre-card {
        flex-direction: column;
    }

    .theatre-img-container {
        flex: 0 0 220px;
    }

    .theatre-info {
        padding: 22px;
    }

    .btmc-feature-block,
    .btmc-feature-block.reversed {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .btmc-feature-block.reversed .btmc-feature-image,
    .btmc-feature-block.reversed .btmc-feature-text {
        order: initial;
    }

    .swiper {
        height: 320px;
    }
}
