@charset "utf-8";

/* The Defiant - Classic Newspaper Styling */

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: #1a1a1a;
    background-image: url('../images/thedefiant/defiantBG.jpg');
    background-repeat: repeat;
    background-attachment: fixed;
    color: #1a1a1a;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

#defiantApp {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #faf8f3;
    background-image: url('../images/thedefiant/paper.jpg');
    background-repeat: repeat;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    border: 2px solid #333;
}

/* Masthead */
.masthead {
    text-align: center;
    border-bottom: 4px double #000;
    padding-bottom: 20px;
    margin-bottom: 30px;
    position: relative;
}

.masthead h1 {
    font-family: 'Georgia', serif;
    font-size: 72px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin: 10px 0;
    color: #000;
}

.masthead .tagline {
    font-size: 14px;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 10px 0;
}

.masthead .issue-info {
    font-size: 11px;
    text-transform: uppercase;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 5px 0;
}

/* Newspaper Grid Layout */
.newspaper-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 30px;
    grid-auto-flow: dense; /* Pack items to fill gaps */
    align-items: start; /* Align to top, not stretch */
}

/* Article Boxes */
.article {
    border: 2px solid #000;
    padding: 12px;
    background: #fff;
    position: relative;
    height: fit-content;
}

/* Column Spanning - Newspaper hierarchy */
/* Large articles appear early */
.article.large {
    grid-column: span 6; /* Full width */
    order: -10; /* Prefer top */
}

/* Medium paired with small fills width: medium=4 cols, small=2 cols */
.article.medium {
    grid-column: span 4; /* Width of 2 smalls + gap */
    order: 0; /* Normal flow */
}

/* Three smalls fill full width: 2+2+2=6 */
.article.small {
    grid-column: span 2; /* Third width */
    order: 0; /* Normal flow */
}

/* Tiny articles prefer bottom but can fill gaps */
.article.tiny {
    grid-column: span 6; /* Full width */
    order: 10; /* Prefer bottom */
}

/* Headlines */
.article-headline {
    font-family: 'Georgia', serif;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase !important;
    line-height: 1.1;
    margin-bottom: 8px;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    letter-spacing: 0.5px;
}

.article.large .article-headline {
    font-size: 32px;
    letter-spacing: 1px;
}

.article.small .article-headline {
    font-size: 18px;
}

.article.tiny .article-headline {
    font-size: 20px;
}

.article-subheadline {
    font-style: italic;
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.3;
}

.article-byline {
    font-size: 11px;
    text-transform: uppercase !important;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    font-weight: bold;
}

.article-meta {
    font-size: 10px;
    color: #666;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Article Images */
.article-image {
    border: 2px solid #000;
    margin-bottom: 12px;
    display: block;
    /* Apply newspaper filter via CSS */
    filter: grayscale(100%) contrast(1.3) brightness(1.1);
    -webkit-filter: grayscale(100%) contrast(1.3) brightness(1.1);
}

.small-image {
    width: 150px;
    height: 100px;
    object-fit: cover;
    float: right;
    margin: 0 0 10px 15px;
    shape-outside: margin-box;
}

.medium-image {
    max-width: 300px;
    width: 300px;
    height: auto;
    float: left;
    margin: 0 15px 10px 0;
    shape-outside: margin-box;
}

.large-image {
    width: 100%;
    height: auto;
}

/* Article Content */
.article-content {
    font-size: 14px;
    line-height: 1.5;
    text-align: justify;
    column-count: 1;
    overflow: auto; /* Clearfix for floated images */
    hyphens: auto;
    -webkit-hyphens: auto;
}

.article-content::after {
    content: "";
    display: table;
    clear: both;
}

.article.large .article-content {
    column-count: 2;
    column-gap: 20px;
}

/* Drop cap for large articles - classic newspaper style */
.article.large .article-content::first-letter {
    font-size: 3.5em;
    line-height: 0.9;
    float: left;
    margin: 0.1em 0.1em 0 0;
    font-weight: bold;
}

.article-category {
    position: absolute;
    top: -10px;
    left: 10px;
    background: #000;
    color: #fff;
    padding: 3px 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

/* Header Actions */
.header-actions {
    text-align: center;
    margin-bottom: 20px;
}

.defiant-btn {
    background: #000;
    color: #fff;
    border: 2px solid #000;
    padding: 10px 20px;
    font-family: 'Georgia', serif;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    margin: 0 5px;
    transition: all 0.2s;
}

.defiant-btn:hover {
    background: #fff;
    color: #000;
}

/* Login/Submit Form */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border: 3px double #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #000;
    background: #faf8f3;
    font-family: 'Georgia', serif;
    font-size: 14px;
}

.form-textarea {
    min-height: 200px;
    resize: vertical;
}

/* Archive Link */
.archive-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #000;
}

.archive-link a {
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    font-size: 12px;
}

.archive-link a:hover {
    text-decoration: underline;
}

/* Error/Success Messages */
.error-message {
    background: #ffebee;
    border: 2px solid #c62828;
    padding: 15px;
    margin-bottom: 20px;
    color: #c62828;
}

.success-message {
    background: #e8f5e9;
    border: 2px solid #2e7d32;
    padding: 15px;
    margin-bottom: 20px;
    color: #2e7d32;
}

/* Responsive */
@media (max-width: 768px) {
    .newspaper-grid {
        grid-template-columns: 1fr;
    }
    
    .article.large,
    .article.medium,
    .article.small {
        grid-column: span 1;
    }
    
    .article.large .article-content {
        column-count: 1;
    }
    
    .masthead h1 {
        font-size: 48px;
        letter-spacing: 4px;
    }
}

/* Tiny articles - full width but compact */
.article.tiny .article-headline {
    font-size: 20px;
}

.article.tiny .article-content {
    font-size: 13px;
}
