/* RADT - Ríos al Desierto - Modern Static Site Styles */

/* CSS Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #f1f1f1;
    background-color: #000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    color: #6aa8f5;
    text-decoration: underline;
}

/* Layout Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    background-color: #000;
    border-bottom: 1px solid #333;
    padding: 1.5rem 0;
    text-align: center;
}

header img {
    width: 200px;
    margin: 0 auto;
}

header h1 {
    color: #fff;
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

/* Main Content */
main {
    margin: 2rem 0;
    font-size: 1.15rem;
}

/* Collapsible Sections using <details> */
details {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

details summary {
    cursor: pointer;
    padding: 0.875rem 1.25rem;
    font-weight: bold;
    font-size: 1.25rem;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    /* jQuery Mobile-style gradient */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    transition: all 0.3s ease;
}

/* Remove default marker */
details summary::-webkit-details-marker {
    display: none;
}

/* Add custom arrow with animation */
details summary::after {
    content: '▶';
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

details[open] summary::after {
    transform: rotate(90deg);
}

details summary:hover {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
}

details summary:active {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.05) 100%);
}

/* Theme colors for different sections - jQuery Mobile style */
details.songs summary {
    background: linear-gradient(to bottom, #2465aa 0%, #1c5596 50%, #1a4e88 100%);
    color: #fff;
    border-color: #1c4c70;
    text-shadow: 0 1px 0 #444;
}

details.songs summary:hover {
    background: linear-gradient(to bottom, #3075ba 0%, #2465aa 50%, #1c5596 100%);
}

details.songs summary:active {
    background: linear-gradient(to bottom, #1a4e88 0%, #1c5596 50%, #2465aa 100%);
}

details.announcements summary {
    background: linear-gradient(to bottom, #af0808 0%, #960000 50%, #880000 100%);
    color: #fff;
    border-color: #770000;
    text-shadow: 0 1px 0 #444;
}

details.announcements summary:hover {
    background: linear-gradient(to bottom, #c01010 0%, #af0808 50%, #960000 100%);
}

details.announcements summary:active {
    background: linear-gradient(to bottom, #880000 0%, #960000 50%, #af0808 100%);
}

details.events summary {
    background: linear-gradient(to bottom, #16b12e 0%, #0e9f25 50%, #0c8c20 100%);
    color: #fff;
    border-color: #0a7a1b;
    text-shadow: 0 1px 0 #444;
}

details.events summary:hover {
    background: linear-gradient(to bottom, #20c138 0%, #16b12e 50%, #0e9f25 100%);
}

details.events summary:active {
    background: linear-gradient(to bottom, #0c8c20 0%, #0e9f25 50%, #16b12e 100%);
}

details.notes summary {
    background: linear-gradient(to bottom, #2465aa 0%, #1c5596 50%, #1a4e88 100%);
    color: #fff;
    border-color: #1c4c70;
    text-shadow: 0 1px 0 #444;
}

details.notes summary:hover {
    background: linear-gradient(to bottom, #3075ba 0%, #2465aa 50%, #1c5596 100%);
}

details.notes summary:active {
    background: linear-gradient(to bottom, #1a4e88 0%, #1c5596 50%, #2465aa 100%);
}

/* Content inside collapsible */
.section-content {
    padding: 1.5rem 1.25rem;
    background-color: #fff;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

details[open] .section-content {
    opacity: 1;
    transform: translateY(0);
}

.section-intro {
    margin-bottom: 1.5rem;
    font-style: italic;
    opacity: 0.8;
    color: #666;
    line-height: 1.4;
}

/* Song Styles - Nested Accordions */
details.song {
    margin-bottom: 0.75rem;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

details.song:last-child {
    margin-bottom: 0;
}

details.song summary {
    padding: 0.75rem 1rem;
    font-size: 1.125rem;
    font-weight: bold;
    color: #1c5596;
    background: linear-gradient(to bottom, #f9f9f9 0%, #f0f0f0 100%);
    border-bottom: 1px solid #ddd;
    text-shadow: none;
}

details.song summary:hover {
    background: linear-gradient(to bottom, #fff 0%, #f5f5f5 100%);
}

details.song summary:active {
    background: linear-gradient(to bottom, #e8e8e8 0%, #f0f0f0 100%);
}

details.song summary::after {
    content: '▼';
    font-size: 0.65rem;
    color: #666;
}

details.song[open] summary::after {
    transform: rotate(180deg);
}

.song-lyrics {
    padding: 1rem;
    line-height: 1.4;
    white-space: pre-wrap;
    color: #333;
    background-color: #fff;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

details.song[open] .song-lyrics {
    opacity: 1;
    transform: translateY(0);
}

/* Announcement/Event Styles */
.item {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

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

.item-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 0.5rem;
}

.item-date {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.item-image {
    margin: 1.5rem 0;
    border-radius: 6px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
}

.item-content {
    line-height: 1.4;
    color: #333;
}

.item-content h1 {
    font-size: 1.75rem;
    margin: 1.5rem 0 1rem;
    color: #222;
}

.item-content h2 {
    font-size: 1.5rem;
    margin: 1.25rem 0 0.75rem;
    color: #333;
}

.item-content h3 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem;
    color: #444;
}

.item-content p {
    margin-bottom: 1rem;
}

.item-content ul, .item-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.item-content strong, .item-content b {
    color: #000;
}

.item-content em, .item-content i {
    color: #555;
}

.item-content img {
    margin: 1.5rem auto;
    border-radius: 6px;
    max-width: 100%;
}

.item-content hr {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid #ddd;
}

.item-content a {
    color: #1c5596;
    text-decoration: underline;
}

.item-content a:hover {
    color: #2465aa;
}

/* Footer */
footer {
    background-color: #000;
    border-top: 1px solid #333;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer img {
    max-width: 300px;
    margin: 0 auto 1rem;
}

footer p {
    color: #999;
    font-size: 0.9rem;
}

/* Responsive Design - Larger fonts on small screens */
@media (max-width: 768px) {
    html {
        font-size: 17px;  /* Increased from 14px */
    }

    header img {
        width: 150px;
    }

    main {
        font-size: 1.1rem;  /* Increased */
        margin: 1rem 0;
    }

    details summary {
        padding: 0.875rem 1rem;
        font-size: 1.15rem;  /* Increased */
    }

    .section-content {
        padding: 1.25rem 1rem;
    }

    details.song summary {
        font-size: 1.1rem;  /* Increased */
    }

    .item-title {
        font-size: 1.6rem;  /* Increased */
    }

    .song-lyrics {
        font-size: 1.05rem;  /* Explicit larger size */
    }
}

@media (max-width: 480px) {
    html {
        font-size: 18px;  /* Even larger on tiny screens */
    }

    header img {
        width: 120px;
    }

    .container {
        padding: 0 0.75rem;
    }

    details summary {
        padding: 0.75rem 0.875rem;
        font-size: 1.1rem;  /* Increased */
    }

    details.song summary {
        font-size: 1.05rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    details {
        border: 1px solid #ccc;
    }

    details summary {
        background-color: #f0f0f0 !important;
        color: black !important;
    }

    details[open] {
        page-break-inside: avoid;
    }
}
