/* Non-Critical CSS - Tables, Footer, Audio, and Enhanced Features */

/* Font Loading Optimization */
.logo, .tagline, .nav-links a, .nav-links::before {
    font-family: 'Nunito', Arial, Helvetica, sans-serif !important;
}

body, .content-text, .content-section {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif !important;
}

/* Enhanced Navigation States */
.nav-links a[href="about"],
.nav-links a[href="index"],
.nav-links a[href="listen"],
.nav-links a[href="videos"] {
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

.nav-links a[href="arrangements"],
.nav-links a[href="rounds"] {
    padding-left: 2.0rem;
    padding-right: 2.0rem;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: #D21F3C;
}

.nav-links a.current-page {
    background-color: #440012;
    cursor: default;
}

.nav-links a.current-page:hover {
    background-color: #440012;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -7px);
}

/* Enhanced Link Styles */
.content-section a {
    color: #0077B8;
    text-decoration: none;
}

.content-section a:hover {
    color: #D21F3C;
    text-decoration: underline;
}

/* Section Headers */
.section-header {
    font-family: 'Nunito', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #D21F3C;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid #D21F3C;
    padding-bottom: 0.5rem;
}

.section-header:first-child {
    margin-top: 0;
}

/* Audio Player Styles */
.audio-section {
    margin: 1.5rem 0;
}

.audio-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #8E1529;
    margin-bottom: 0.5rem;
}

audio {
    width: 100%;
    margin-bottom: 1rem;
}

/* Page-specific layouts */
.listen-page .content-section {
    display: block;
}

.arrangements-page .content-section {
    display: block;
}

.rounds-page .content-section {
    display: block;
}

.videos-page .content-section {
    display: block;
}

/* Table styles for arrangements page */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.arrangements-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 10px rgba(68,0,18,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.arrangements-table th,
.arrangements-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: top;
}

.arrangements-table th {
    background-color: #8E1529;
    color: #EBEBEB;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

.arrangements-table tbody tr:hover {
    background-color: #f8f8f8;
}

.arrangements-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.arrangements-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

.arrangements-table a {
    color: #0077B8;
    text-decoration: none;
}

.arrangements-table a:hover {
    color: #D21F3C;
    text-decoration: underline;
}

.arrangements-table td:first-child {
    font-weight: 500;
    min-width: 200px;
}

/* Rounds table styles */
.rounds-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 10px rgba(68,0,18,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.rounds-table th,
.rounds-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: top;
}

.rounds-table th {
    background-color: #8E1529;
    color: #EBEBEB;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

.rounds-table tbody tr:hover {
    background-color: #f8f8f8;
}

.rounds-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.rounds-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

.rounds-table a {
    color: #0077B8;
    text-decoration: none;
}

.rounds-table a:hover {
    color: #D21F3C;
    text-decoration: underline;
}

.rounds-table td:first-child {
    font-weight: 500;
    min-width: 160px;
}

.rounds-table td:nth-child(4) {
    max-width: 300px;
}

.rounds-table td:last-child {
    text-align: center;
    font-weight: 600;
    min-width: 80px;
}

/* Video section styles */
.video-section {
    margin: 2rem 0;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(68,0,18,0.1);
}

.video-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #8E1529;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video thumbnail styles for lazy loading */
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-color: #000;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover {
    opacity: 0.9;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #D21F3C;
    color: white;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.play-button:hover {
    background-color: #0077B8;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Bandcamp player responsive styles */
.bandcamp-wrapper {
    max-width: 400px;
    width: 100%;
}

@media (max-width: 480px) {
    .bandcamp-wrapper {
        max-width: 100%;
    }
    
    .bandcamp-wrapper iframe {
        width: 100% !important;
        max-width: 100%;
    }
}

.video-wrapper:empty::after {
    content: "Video will be embedded here";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #8E1529;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    text-align: center;
}

/* Page Title for Mobile */
.mobile-page-title {
    display: none;
    font-family: 'Nunito', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #D21F3C;
    text-align: center;
    margin-bottom: 1.5rem;
    margin-top: 0;
    padding: 0 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #B91C41, #8E1529);
    color: #EBEBEB;
    text-align: center;
    padding: 2rem 0;
    margin-top: 0.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social-icon {
    width: 50px;
    height: 50px;
    background-color: #2E7FB8;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.footer-social-icon.facebook {
    background-color: #2E7FB8;
}

.footer-social-icon.twitter {
    background-color: #2E7FB8;
}

.footer-social-icon.youtube {
    background-color: #0077B8;
}

.footer-social-icon:hover {
    background-color: #D21F3C;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: #0077B8;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #D21F3C;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-page-title {
        display: block;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
    }

    /* Mobile table styles */
    .arrangements-table th,
    .arrangements-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .arrangements-table td:first-child {
        min-width: 150px;
    }

    .rounds-table th,
    .rounds-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .rounds-table td:first-child {
        min-width: 120px;
    }

    .rounds-table td:nth-child(4) {
        max-width: 200px;
        font-size: 0.85rem;
    }

    /* Mobile video section styles */
    .video-section {
        margin: 1.5rem 0;
        padding: 1rem;
    }

    .video-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}