/* ===========================
   Tighter Golf - Article Styles
   Based on tightergolf.com design
   =========================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.8;
    color: #1a1a1a;
    background: #ffffff;
    max-width: 50rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Top Navigation - Simple Breadcrumb Style */
body > nav {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 3rem;
}

body > nav a {
    color: #0066cc;
    text-decoration: none;
}

body > nav a:hover {
    text-decoration: underline;
}

/* Main Heading */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #000;
}

/* Subtitle */
h1 + p {
    font-size: 1.3rem;
    color: #555;
    margin-bottom: 1rem;
}

/* Article Meta (Published date, etc.) */
h1 + p + p {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

/* Section Headings */
h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: #000;
    line-height: 1.3;
}

h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #000;
    line-height: 1.3;
}

h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #000;
}

/* Paragraphs */
p {
    margin-bottom: 1.5rem;
}

/* Links */
a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Strong/Bold */
strong {
    font-weight: 700;
    color: #000;
}

/* Emphasis */
em {
    font-style: italic;
}

/* Blockquotes */
blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid #0066cc;
    background: #f5f7fa;
    font-size: 1.1rem;
    font-style: italic;
    color: #2c3e50;
}

blockquote p {
    margin-bottom: 0;
}

blockquote p:not(:last-child) {
    margin-bottom: 1rem;
}

/* Emphasis Boxes / Callouts */
.emphasis-box {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: #f0f4f8;
    border-left: 4px solid #0066cc;
}

.emphasis-box strong {
    color: #0052a3;
}

/* Key Points / Highlighted Paragraphs */
h2 + p strong:first-child,
h3 + p strong:first-child {
    color: #0052a3;
}

/* Lists */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

li p {
    margin-bottom: 0.5rem;
}

/* Tables */
table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: #fff;
}

thead {
    background: #f0f4f8;
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #ddd;
    background: #f0f4f8;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e8e8e8;
}

tbody tr:nth-child(even) {
    background: #fafbfc;
}

tbody tr:hover {
    background: #f5f7fa;
}

/* Horizontal Rule */
hr {
    margin: 3rem 0;
    border: 0;
    border-top: 1px solid #e0e0e0;
}

/* Code */
code {
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    font-size: 0.9em;
    background: #f5f7fa;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    color: #2c3e50;
}

pre {
    background: #f5f7fa;
    padding: 1.25rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #e1e4e8;
}

pre code {
    background: none;
    padding: 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
}

/* Footer */
footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

footer a {
    color: #666;
    margin: 0 0.75rem;
}

/* Special Formatting */

/* "Read Next" or final CTA sections */
h2:last-of-type,
h3:last-of-type {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

/* CTA Links (usually at end of article) */
p a[href*="fivebar"],
p a[href*="book"],
p a[href*="articles"] {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #0066cc;
    color: white !important;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

p a[href*="fivebar"]:hover,
p a[href*="book"]:hover,
p a[href*="articles"]:hover {
    background: #0052a3;
    text-decoration: none;
}

/* Mathematical/Technical emphasis */
.theorem,
.proposition {
    font-style: italic;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
    
    body {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    
    body {
        padding: 1rem 0.75rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
}
