/* Malcolm Messiter Website - Main Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ===== Base Styles ===== */
:root {
    --primary-color: #C9A84C;
    --secondary-color: #A07C28;
    --accent-color: #8B2500;
    --text-color: #2D2416;
    --light-text: #FDF8ED;
    --light-gray: #FAF6EE;
    --medium-gray: #E8DFCC;
    --dark-gray: #6B5D45;
    --nav-bg: #1E1A14;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    font-size: 16px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--nav-bg);
}

h1 {
    font-size: 2.5rem;
    margin-top: 1rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--medium-gray);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

.text-italic {
    font-style: italic;
}

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

blockquote {
    font-style: italic;
    border-left: 4px solid var(--medium-gray);
    padding-left: 1rem;
    margin: 1rem 0;
}

/* ===== Layout ===== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1rem;
}

.col {
    flex: 1;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
}

/* ===== Header ===== */
header {
    background-color: #FDF8ED;
    padding: 2rem 0;
    border-bottom: 2px solid var(--medium-gray);
}

.site-title {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.site-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.profile-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* ===== Navigation ===== */
nav {
    background-color: var(--nav-bg);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-item {
    margin: 0 0.5rem;
}

.nav-link {
    color: var(--light-text);
    padding: 0.5rem 1rem;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    text-decoration: none;
}

.nav-link.active {
    background-color: var(--primary-color);
}

.new-badge {
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    vertical-align: text-top;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--light-text);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
        margin: 0 auto;
    }
    
    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    .nav-list.show {
        display: flex;
    }
    
    .nav-item {
        margin: 0.5rem 0;
    }
}

/* ===== Main Content ===== */
main {
    padding: 2rem 0;
}

section {
    margin-bottom: 3rem;
}

/* ===== Footer ===== */
footer {
    background-color: var(--nav-bg);
    color: var(--light-text);
    padding: 2rem 0;
    text-align: center;
}

.footer-nav {
    margin-bottom: 1rem;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-nav-item {
    margin: 0 0.5rem;
}

.footer-nav-link {
    color: var(--light-text);
}

.contact-info {
    margin-bottom: 1rem;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* ===== Components ===== */
.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
    color: var(--light-text);
}

.btn-secondary {
    background-color: var(--dark-gray);
}

.btn-secondary:hover {
    background-color: #555;
}

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

.btn-accent:hover {
    background-color: #c0392b;
}

/* Cards */
.card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.card-content {
    margin-bottom: 1rem;
}

.card-footer {
    margin-top: 1rem;
    text-align: right;
}

/* Audio Player */
.audio-player {
    width: 100%;
    margin-bottom: 1rem;
}

/* Image Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

/* Feature List */
.feature-list {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 5px;
    border-left: 5px solid var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-list li {
    margin-bottom: 0.5rem;
    list-style-position: inside;
}

/* Contact Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Testimonials */
.testimonial {
    font-style: italic;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: 5px;
    position: relative;
}

.testimonial::before {
    content: '"';
    font-size: 3rem;
    position: absolute;
    top: -10px;
    left: 10px;
    color: var(--medium-gray);
    opacity: 0.5;
}

.testimonial-source {
    text-align: right;
    font-style: normal;
    font-weight: bold;
    margin-top: 0.5rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
}

/* ===== Page Specific Styles ===== */

/* Home Page */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

.music-player {
    max-width: 600px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: 5px;
}

.bio-section {
    margin: 2rem 0;
}

.bio-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Programs Page */
.program-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--medium-gray);
}

.program-item:last-child {
    border-bottom: none;
}

.program-item p {
    margin-bottom: 0.5rem;
}

.program-item .text-italic {
    font-style: italic;
    color: var(--dark-gray);
}

/* Inventions Page */
.invention-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--medium-gray);
}

.invention-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.invention-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 5px;
}

/* LDRC Page */
.project-hero {
    margin-bottom: 2rem;
}

.project-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.tech-specs {
    margin-bottom: 2rem;
}

.tech-specs-list {
    list-style-type: none;
}

.tech-specs-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.tech-specs-list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Harpsichord Page */
iframe {
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Media Placeholder */
.media-placeholder {
    background-color: var(--light-gray);
    border: 2px dashed var(--medium-gray);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.media-placeholder p {
    margin: 0;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* ===== Utilities ===== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 2.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 2.5rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 2.5rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 2.5rem; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

.bg-light { background-color: var(--light-gray); }
.bg-primary { background-color: var(--primary-color); color: white; }
.bg-secondary { background-color: var(--secondary-color); color: white; }
.bg-accent { background-color: var(--accent-color); color: white; }

.rounded { border-radius: 5px; }
.shadow { box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.border { border: 1px solid var(--medium-gray); }