/* Color Variables */
:root {
    --primary-color: #557a60;
    --accent-color: #F1B300;
    --highlight-color: #808080;
    --text-color: #333;
}

body.vandalized {
    --primary-color: #F1B300;
    --accent-color: #808080;
    --highlight-color: #808080;
    --text-color: #000;
}

/* Reset Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

/* Page-specific backgrounds */
body.page-join {
    background-image: url('images/portrait.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.page-contact {
    background-image: url('images/lentil.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.page-calendar {
    background-image: url('images/hunga.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.page-burns {
    background-image: url('images/burns.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Use fixed only on non-iOS/Safari browsers */
@supports (-webkit-overflow-scrolling: touch) {
    body.page-join,
    body.page-contact,
    body.page-calendar,
    body.page-burns {
        background-attachment: scroll;
    }
}

@supports not (-webkit-overflow-scrolling: touch) {
    body.page-join,
    body.page-contact,
    body.page-calendar,
    body.page-burns {
        background-attachment: fixed;
    }
}

/* Background overlay for pages with fixed images */
body.page-join::before,
body.page-contact::before,
body.page-calendar::before,
body.page-burns::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(245, 245, 245, 0.90);
    z-index: -1;
}

body.page-join::before {
    background-color: rgba(245, 245, 245, 0.85);
}

/* Navigation */
nav {
    background-color: var(--primary-color);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.03) 10px,
            rgba(0, 0, 0, 0.03) 20px
        );
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0 2rem;
    margin: 0;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

nav a:hover {
    color: var(--accent-color);
}

nav a.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Hero Section */
.hero {
    background-color: var(--primary-color);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.03) 10px,
            rgba(0, 0, 0, 0.03) 20px
        );
    color: white;
    padding: 2rem 2rem;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-logo {
    height: 100px;
    width: auto;
    flex-shrink: 0;
    cursor: pointer;
}

.hero-text {
    flex: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Homepage specific hero styles */
body.page-home .hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero .tagline {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 0;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

body.page-contact .container {
    max-width: 800px;
}

body.page-join .container,
body.page-burns .container {
    max-width: 1000px;
}

.content-section {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

body.page-join .content-section,
body.page-burns .content-section {
    padding: 2.5rem;
}

.content-section h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

body.page-join .content-section h2,
body.page-burns .content-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.content-section h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.content-section h4 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-style: italic;
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1rem;
}

body.page-join .content-section p,
body.page-burns .content-section p {
    font-size: 1.05rem;
}

.content-section ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.content-section li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

/* Homepage specific styles */
body.page-home .content-section {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.image-container {
    position: relative;
    width: 100vw;
    height: 500px;
    margin: 0;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
}

.slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow img.active {
    opacity: 1;
}

.welcome-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: center;
    margin: 3rem auto;
    max-width: 1200px;
    padding: 0 2rem;
}

.highlight-box {
    background-color: var(--highlight-color);
    color: white;
    padding: 3rem 2rem;
    margin: 0;
    text-align: center;
}

.highlight-box h2 {
    margin-bottom: 1rem;
}

/* Join page specific styles */
.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.intro-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
}

.intro-text a:hover {
    color: var(--accent-color);
}

.note {
    background-color: #f9f9f9;
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-color);
}

/* About page history images */
.history-section {
    clear: both;
    margin-bottom: 3rem;
    overflow: hidden;
}

.history-image-left {
    float: left;
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0 1.5rem 1rem 0;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.history-image-right {
    float: right;
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0 0 1rem 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.history-image-right-container {
    float: right;
    max-width: 300px;
    margin: 0 0 1rem 1.5rem;
}

.image-caption {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

.history-image-full {
    display: block;
    max-width: 800px;
    width: 100%;
    height: auto;
    margin: 2rem auto;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Slide-in animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.visible,
.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.vandal-tartan-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    cursor: pointer;
}

.vandal-tartan-link:hover {
    color: var(--accent-color);
}

/* Burns Night specific styles */
.event-highlight {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
}

.event-highlight h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.event-highlight p {
    font-size: 1.2rem;
    line-height: 1.8;
}

.sold-out {
    background-color: var(--highlight-color);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 1.5rem 0;
}

/* Contact form styles */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.radio-option label {
    margin: 0;
    font-weight: normal;
    color: var(--text-color);
    cursor: pointer;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background-color: #446350;
}

.required {
    color: var(--highlight-color);
}

/* Calendar page styles */
.calendar-container {
    position: relative;
    padding-bottom: 75%;
    height: 0;
    overflow: hidden;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.calendar-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.03) 10px,
            rgba(0, 0, 0, 0.03) 20px
        );
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

footer p {
    margin: 0.5rem 0;
}

.vandalize-link {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;
}

.vandalize-link:hover {
    color: white;
    text-decoration: underline;
}

footer {
    position: relative;
}

/* Tunes page styles */
.instrument-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
    background: white;
    margin-bottom: 2rem;
}

.instrument-button {
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.instrument-button img {
    height: 120px;
    width: auto;
    transition: all 0.3s ease;
}

.instrument-button.active {
    opacity: 1;
}

.instrument-button.active img {
    height: 160px;
}

.instrument-button:hover {
    opacity: 0.8;
}

.tunes-protected {
    display: none;
}

.tunes-protected.unlocked {
    display: block;
}

.pipes-content,
.drums-content {
    display: none;
}

.pipes-content.active,
.drums-content.active {
    display: block;
}

.password-prompt {
    text-align: center;
    padding: 4rem 2rem;
}

.password-prompt h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.password-form {
    max-width: 400px;
    margin: 0 auto;
}

.password-form input[type="password"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.password-form input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.password-form button {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.password-form button:hover {
    background-color: #446350;
}

.password-error {
    color: var(--highlight-color);
    margin-top: 1rem;
    font-weight: 600;
}

.tunes-section {
    margin-bottom: 3rem;
}

.tunes-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.tunes-section h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.tunes-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tunes-table thead {
    background-color: var(--highlight-color);
    color: white;
}

.tunes-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.tunes-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.tunes-table tbody tr:hover {
    background-color: #f9f9f9;
}

.tunes-table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.tunes-table a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    body.page-home .hero h1 {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .hero-logo {
        height: 75px;
    }

    nav ul {
        gap: 1rem;
    }

    nav a {
        padding: 0.3rem 0.5rem;
        font-size: 0.9rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .event-highlight h2 {
        font-size: 1.5rem;
    }

    .event-highlight p {
        font-size: 1rem;
    }

    body.page-join .content-section h2 {
        font-size: 1.5rem;
    }

    body.page-join .content-section h3 {
        font-size: 1.2rem;
    }

    .history-image-left,
    .history-image-right,
    .history-image-right-container {
        float: none;
        max-width: 100%;
        margin: 1rem auto;
        display: block;
    }

    .history-image-full {
        margin: 1rem auto;
    }
}
