/* Apply EB Garamond universally */
body {
    font-family: 'EB Garamond', serif;
    background-color: #EFEAE2; /* Warm sepia desk background */
    color: #242220; /* Soft charcoal print ink */
}

/* Style for the main container on all pages to apply paper color & folds */
.max-w-6xl, .max-w-4xl {
    background: linear-gradient(
        to right, 
        rgba(0, 0, 0, 0.025) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(0, 0, 0, 0.025) 100%
    ), #FAF6EE !important; /* Premium aged cream newsprint */
    color: #242220 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    border-color: #DFD9CE !important;
}

/* Custom styles for newspaper look from test.html */
.newspaper-title {
    font-family: 'EB Garamond', serif;
    font-weight: 800;
    font-size: 2.5rem; /* Base mobile size */
    text-align: center;
    border-bottom: 4px double #57534e;
    padding-bottom: 0.25rem;
    margin-bottom: 0.75rem; /* Space below title */
    line-height: 1.1;
}
@media (min-width: 768px) { .newspaper-title { font-size: 3.5rem; } }

.newspaper-headline {
    font-family: 'EB Garamond', serif;
    font-weight: 700;
    font-size: 1.5rem; /* Base mobile size */
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
@media (min-width: 768px) {
    .newspaper-headline { font-size: 1.875rem; }
    .newspaper-headline.text-2xl { font-size: 1.5rem; } /* Adjust specific headline size if needed */
}

/* Subheading style used for article subheads */
.newspaper-subhead {
    font-family: 'EB Garamond', serif;
    font-weight: 600;
    font-size: 1.125rem; /* text-lg base */
    color: #78716c; /* Stone 500 */
}
@media (min-width: 768px) { .newspaper-subhead { font-size: 1.25rem; } }

.newspaper-body {
    font-size: 1rem; /* Base mobile size */
    line-height: 1.7;
    text-align: justify;
}
@media (min-width: 768px) {
    .newspaper-body { font-size: 1.125rem; } /* Default larger size for .newspaper-body on desktop */
    .newspaper-body.text-base { font-size: 1rem; line-height: 1.6; } /* Specific smaller size when .text-base is also applied */
}

.newspaper-section-divider { 
    border-top: 1px solid #a8a29e; 
    margin-top: 1.5rem; /* Default from test.html */
    margin-bottom: 1.5rem; /* Default from test.html */
}

/* Sidebar specific styles */
.newspaper-sidebar-title {
    font-family: 'EB Garamond', serif;
    font-weight: 700;
    font-size: 1.125rem; /* text-lg base */
    border-bottom: 1px solid #78716c; padding-bottom: 0.25rem; margin-bottom: 0.75rem;
}
@media (min-width: 768px) { .newspaper-sidebar-title { font-size: 1.25rem; } }

.sidebar-subtitle { font-weight: 600; font-size: 0.875rem; color: #44403c; margin-top: 0.5rem; margin-bottom: 0.25rem; }
.sidebar-list { font-size: 0.875rem; color: #57534e; list-style-position: inside; padding-left: 0; }
.sidebar-article-body { font-size: 0.875rem; color: #57534e; line-height: 1.6; text-align: justify;}

/* Style for data lists (standings, leaders in test.html - might be different from season page tables) */
.data-list-item { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.data-list-item .value { text-align: right; min-width: 3.5em; flex-shrink: 0; font-feature-settings: 'tnum'; -webkit-font-feature-settings: 'tnum'; -moz-font-feature-settings: 'tnum'; } /* Tabular nums */
       
.sidebar-link { color: #78716c; font-size: 0.75rem; display: block; margin-top: 0.5rem; }
.sidebar-link:hover { color: #1c1917; text-decoration: underline; }

/* Dropdown Styles - (present and identical in both, so one definition is fine) */
.dropdown-menu {
    min-width: max-content; /* Auto-width based on content */
    max-height: 200px; /* Limit height and make scrollable */
    overflow-y: auto; /* Enable vertical scroll */
}
.dropdown-menu a {
    white-space: nowrap; /* Prevent link text wrapping */
}

/* Add slight rounding - (present and identical in both) */
.rounded { border-radius: 0.25rem; }
.rounded-sm { border-radius: 0.125rem; }
.rounded-lg { border-radius: 0.5rem; }

/* Social Media Icon Hover Effect */
.social-icon:hover {
    opacity: 0.7;
}

/* Responsive video container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000; /* Optional: background color for letterboxing */
    margin-bottom: 1rem; /* Space below each video */
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Styles from 1947.html (season pages) */
.section-headline { /* Used for standings, playoffs, leaders, awards headings */
    font-family: 'EB Garamond', serif; 
    font-weight: 700; 
    font-size: 1.25rem; /* Base size for mobile */
    line-height: 1.2; 
    margin-top: 1.5rem; 
    margin-bottom: 0.75rem; 
    border-bottom: 1px solid #a8a29e; 
    padding-bottom: 0.25rem;
}
@media (min-width: 768px) { .section-headline { font-size: 1.5rem; } }

/* Table Styles for season data */
.data-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 0.5rem; 
    font-size: 0.875rem; 
    line-height: 1.5; 
}
@media (min-width: 768px) { .data-table { font-size: 0.95rem; } }
.data-table th, .data-table td { 
    border: 1px solid #d6d3d1; 
    padding: 0.375rem 0.5rem; 
    text-align: left; 
}
.data-table th { 
    background-color: #f5f5f4; 
    font-weight: 600; 
}
.data-table .stat { 
    text-align: right; 
    min-width: 3.5em; 
    font-feature-settings: 'tnum'; 
    -webkit-font-feature-settings: 'tnum'; 
    -moz-font-feature-settings: 'tnum'; 
}
.data-table .rank { 
    text-align: center; 
    min-width: 2em; 
}

/* Playoff List Styling */
.playoff-list ul { 
    list-style-type: disc; 
    margin-left: 1.5rem; 
    margin-bottom: 0.5rem; 
    font-size: 1rem; 
}
.playoff-list li { 
    margin-bottom: 0.25rem; 
}
.playoff-list h4 { /* Styling for sub-headings within playoff list like "Quarterfinals" */
    font-weight: 600; 
    font-size: 1.125rem; 
    margin-bottom: 0.5rem; 
    margin-top: 1rem;
}
.playoff-list > div.grid > div > h4:first-child { 
    margin-top: 0; 
}

/* Margin for leader sections */
.leader-section > div { 
    margin-bottom: 1.5rem; 
}

/* Season Navigation Button Styling */
.season-nav-button {
     display: inline-block; padding: 0.5rem 1rem; /* py-2 px-4 */
     background-color: #e7e5e4; /* stone-200 */
     color: #44403c; /* stone-700 */
     border: 1px solid #a8a29e; /* stone-400 */
     border-radius: 0.25rem; /* rounded */
     text-decoration: none; font-size: 0.875rem; /* text-sm */
     transition: background-color 0.2s, color 0.2s;
     white-space: nowrap; /* Prevent button text wrapping */
}
.season-nav-button:hover {
    background-color: #d6d3d1; /* stone-300 */
    color: #1c1917; /* stone-900 */
}

/* Style for the placeholder span for season navigation button alignment */
.nav-placeholder {
     display: inline-block;
     width: 136px; /* Approximate width of the button */
     height: 36px; /* Approximate height of the button */
}
@media (max-width: 767px) { /* Hide placeholder on mobile */
     .nav-placeholder { display: none; }
}

/* Ensure newspaper-section-divider from 1947.html is considered if different */
/* From 1947.html: .newspaper-section-divider { border-top: 1px solid #a8a29e; margin-top: 2rem; margin-bottom: 2rem; } */
/* test.html has: .newspaper-section-divider { border-top: 1px solid #a8a29e; margin-top: 1.5rem; margin-bottom: 1.5rem; } */
/* Let's use the one from test.html as default. If specific pages need larger margins, it can be handled with utility classes or more specific selectors. */

/* ==========================================================================
   Franchise/Team Page Custom Styles
   ========================================================================== */

/* Quick Stats Box Styling */
.quick-stats-box {
    border: 1px solid #d6d3d1; /* Stone 300 */
    background-color: #f5f5f4; /* Stone 100 */
    padding: 1rem; /* p-4 */
    margin-bottom: 2rem; /* mb-8 */
    border-radius: 0.25rem; /* rounded */
}
.quick-stats-box p { margin-bottom: 0.25rem; /* mb-1 */ font-size: 1rem;}
@media (min-width: 768px) { .quick-stats-box p { font-size: 1.125rem; } }

/* All-Time Leaders List Styling */
.leader-list ul {
    list-style-type: none; /* Remove default list style */
    margin-left: 0; /* Remove default indentation */
    padding-left: 0;
}
.leader-list li {
    margin-bottom: 0.125rem;
    font-size: 0.9rem;
    line-height: 1.5;
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Push value to the right */
    align-items: baseline;
}
.leader-list .player-name { /* Span for player name */
    flex-grow: 1; /* Allow name to take up space */
    margin-right: 0.5rem; /* Space between name and value */
}
.leader-list .value {
    font-weight: 600;
    font-feature-settings: 'tnum'; /* Tabular numbers */
    -webkit-font-feature-settings: 'tnum';
    -moz-font-feature-settings: 'tnum';
    min-width: 4em; /* Ensure minimum width for alignment */
    text-align: right;
    flex-shrink: 0; /* Prevent value from shrinking */
}
@media (min-width: 768px) {
    .leader-list li { font-size: 1rem; }
}

/* Single Game Records Styling */
.record-list ul { list-style-type: none; margin-left: 0; padding-left: 0; }
.record-list li {
    margin-bottom: 0.125rem;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    display: flex; /* Use flex for alignment */
    justify-content: space-between; /* Push value to the right */
    align-items: baseline;
}
.record-list .player-info { /* Container for player name and date/year */
    flex-grow: 1; /* Allow this container to take up space */
    margin-right: 0.5rem; /* Space between info and value */
}
.record-list .player-name {
    /* Player name styles (if any specific needed) */
}
.record-list .date, .record-list .year { /* Combined date and year styling */
    margin-left: 0.35rem; /* Space between name and date/year */
    color: #57534e; /* Stone 600 */
    font-size: 0.8rem;
    flex-shrink: 0; /* Prevent shrinking */
}
.record-list .value {
    font-weight: 600;
    font-feature-settings: 'tnum'; /* Tabular numbers */
    -webkit-font-feature-settings: 'tnum';
    -moz-font-feature-settings: 'tnum';
    flex-shrink: 0; /* Prevent shrinking */
    min-width: 2.5em; /* Ensure minimum width for alignment */
    text-align: right; /* Align value to the right */
}
@media (min-width: 768px) {
    .record-list li { font-size: 1rem; }
    .record-list .date, .record-list .year { font-size: 0.875rem; }
    .record-list .value { min-width: 4em; } /* Adjusted min-width for larger numbers */
}

/* ==========================================================================
   Records Page Tab Styles
   ========================================================================== */
.tab-button {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
    color: #57534e; /* Stone 600 */
    font-weight: 600;
}
.tab-button.active {
    border-bottom-color: #1c1917; /* Stone 900 */
    color: #1c1917; /* Stone 900 */
}
.tab-button:hover:not(.active) {
    color: #44403c; /* Stone 700 */
}
.tab-content {
    display: none; /* Hidden by default */
}
.tab-content.active {
    display: block; /* Shown when active */
}

/* ==========================================================================
   Advanced Newspaper Layout & Typography Helpers
   ========================================================================== */

/* Drop Cap Styling (First letter of article) */
.drop-cap::first-letter {
    font-family: 'EB Garamond', serif;
    font-size: 3.75rem;
    font-weight: 800;
    float: left;
    line-height: 0.75;
    margin-right: 0.55rem;
    margin-top: 0.18rem;
    color: #242220;
}

/* Traditional Newspaper Column Flow */
.newspaper-body-flow {
    font-size: 1.05rem;
    line-height: 1.6;
    text-align: justify;
    column-gap: 1.75rem;
    column-rule: 1px dotted #DFD9CE; /* Elegant vertical separator rule */
}
@media (min-width: 768px) {
    .newspaper-body-flow {
        column-count: 2; /* 2-column layout on desktop */
    }
}

/* Editorial Separator Ornament */
.editorial-separator {
    text-align: center;
    font-size: 0.9rem;
    color: #9D9285;
    margin: 1.5rem 0;
    letter-spacing: 0.5em;
}

/* Sans-Serif Font Pairing Helpers */
.ui-font {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.data-value {
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}