/* 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%);
}

details.articles summary {
    background: linear-gradient(to bottom, #7a3fa0 0%, #6a2f90 50%, #5e2880 100%);
    color: #fff;
    border-color: #521f70;
    text-shadow: 0 1px 0 #444;
}

details.articles summary:hover {
    background: linear-gradient(to bottom, #8a4fb0 0%, #7a3fa0 50%, #6a2f90 100%);
}

details.articles summary:active {
    background: linear-gradient(to bottom, #5e2880 0%, #6a2f90 50%, #7a3fa0 100%);
}

/* Pasaje App Link */
.pasaje-link {
    margin-top: 1rem;
    text-align: center;
}

.pasaje-link a {
    color: #6aa8f5;
    text-decoration: underline;
}

/* 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 table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.item-content th, .item-content td {
    text-align: left;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #ddd;
}

.item-content th {
    background-color: #f0f4f8;
    font-weight: bold;
    color: #333;
}

.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;
    }
}

/* ==========================================================================
   Infografía — adapted from the bulletin back-page infographic.
   All rules scoped under .infografia so they never leak into the rest of
   the page. The print original is a fixed 4.7in x 7.7in sheet; here it
   flows responsively and uses system fonts instead of embedded webfonts.
   ========================================================================== */

.infografia {
    --ink: #2c261f;
    --ink-soft: #5d5345;
    --ink-faint: #8a7d6a;
    --gold: #a9762a;
    --gold-deep: #825519;
    --clay: #9a5436;
    --clay-deep: #7c3f27;
    --rule: #d9cab0;
    --rule-soft: #e6dac3;
    --card: #ffffff;
    --card-tint: #fbf6ec;
    --display: Georgia, "Iowan Old Style", "Times New Roman", serif;

    color: var(--ink);
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 1.5rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    line-height: 1.4;
}

.infografia .kicker {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-deep);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.infografia .kicker::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--gold);
    flex: none;
}

.infografia .title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-top: 0.25rem;
}

.infografia .title em {
    font-style: italic;
    color: var(--clay);
}

.infografia .dek {
    font-family: var(--display);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ink-faint);
}

/* ---------- Anchor verse ---------- */
.infografia .anchor {
    border-left: 3px solid var(--gold);
    background: linear-gradient(90deg, #fbf4e6, #ffffff 85%);
    padding: 0.6rem 0.9rem;
    border-radius: 0 8px 8px 0;
}

.infografia .anchor p {
    font-family: var(--display);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--ink-soft);
    margin: 0;
}

.infografia .anchor p b {
    color: var(--clay-deep);
    font-weight: 600;
}

.infografia .anchor .ref {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--gold-deep);
    margin-top: 0.3rem;
}

/* ---------- Section headings ---------- */
.infografia .sec {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.75rem 0 0.15rem;
}

.infografia .sec h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--ink);
    margin: 0;
}

.infografia .sec h2 em {
    font-style: italic;
    color: var(--clay);
}

.infografia .sec::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule);
}

/* ---------- Las cuatro D ---------- */
.infografia .stages {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.infografia .stage {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0.7rem;
    align-items: start;
    border: 1px solid var(--rule);
    border-radius: 9px;
    background: var(--card);
    padding: 0.6rem 0.8rem;
}

.infografia .stage.s2,
.infografia .stage.s4 {
    background: var(--card-tint);
}

.infografia .node {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
}

.infografia .s1 .node { background: var(--gold); }
.infografia .s2 .node { background: var(--gold-deep); }
.infografia .s3 .node { background: var(--clay); }
.infografia .s4 .node { background: var(--clay-deep); }

.infografia .stage .name {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.2;
    color: var(--ink);
}

.infografia .stage .name span {
    font-family: inherit;
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-left: 0.45rem;
    white-space: nowrap;
}

.infografia .stage .desc {
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--ink-soft);
    margin-top: 0.15rem;
}

.infografia .stage .desc b {
    color: var(--ink);
    font-weight: 600;
}

/* ---------- Freno, timón, chispa ---------- */
.infografia .trio {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.infografia .tile {
    border: 1px solid var(--rule);
    border-radius: 9px;
    background: var(--card);
    padding: 0.6rem 0.7rem;
    text-align: center;
}

.infografia .tile .glyph {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gold);
}

.infografia .tile .tname {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--clay-deep);
    margin-top: 0.2rem;
}

.infografia .tile .tdesc {
    font-size: 0.875rem;
    line-height: 1.3;
    color: var(--ink-soft);
    margin-top: 0.2rem;
}

/* ---------- De la boca al corazón ---------- */
.infografia .pairs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.5rem;
}

.infografia .pair {
    border: 1px solid var(--rule-soft);
    border-radius: 8px;
    background: var(--card);
    padding: 0.4rem 0.7rem;
}

.infografia .pair .from {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--ink);
}

.infografia .pair .to {
    font-size: 0.875rem;
    line-height: 1.3;
    color: var(--ink-faint);
    margin-top: 0.1rem;
}

.infografia .pair .to::before {
    content: "→ ";
    color: var(--gold);
    font-weight: 700;
}

/* ---------- Panel final ---------- */
.infografia .panel {
    border: 1px solid var(--gold);
    border-radius: 10px;
    background: linear-gradient(180deg, #fbf4e6, #f4e8cf);
    padding: 0.9rem 1.1rem;
    margin-top: 0.5rem;
}

.infografia .panel .ph {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--gold-deep);
    margin-bottom: 0.5rem;
}

.infografia .steps {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.infografia .steps li {
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--ink-soft);
    padding-left: 1.1rem;
    position: relative;
}

.infografia .steps li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
}

.infografia .steps li b {
    color: var(--ink);
    font-weight: 600;
}

.infografia .closer {
    font-family: var(--display);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--clay-deep);
    margin-top: 0.6rem;
    border-top: 1px dotted var(--rule);
    padding-top: 0.6rem;
    text-align: center;
}

/* ---------- Footer ---------- */
.infografia .foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--rule-soft);
    padding-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--ink-faint);
}

.infografia .foot .r {
    font-style: italic;
    font-family: var(--display);
}

@media (max-width: 560px) {
    .infografia {
        padding: 1.1rem 1rem 1rem;
    }

    .infografia .trio,
    .infografia .pairs {
        grid-template-columns: 1fr;
    }

    .infografia .stage .name span {
        display: block;
        margin-left: 0;
        margin-top: 0.15rem;
    }
}

/* 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;
    }
}
