/* Import Classic Newspaper Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Old+Standard+TT:ital,wght@0,400;0,700;1,400&display=swap');

/* CSS Variables for Newspaper Theme */
:root {
    --newspaper-bg: #f8f6f0;
    --paper-white: #fefefe;
    --ink-black: #1a1a1a;
    --ink-dark: #2c2c2c;
    --ink-medium: #4a4a4a;
    --ink-light: #666666;
    --border-color: #d4d4d4;
    --accent-red: #8b0000;
    --vintage-yellow: #f4e4bc;
    --sepia-tone: #8b7355;
    --shadow-vintage: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Crimson Text', 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--ink-black);
    background: var(--newspaper-bg);
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,.15) 1px, transparent 0);
    background-size: 20px 20px;
}

/* Newspaper Header */
header {
    background: var(--paper-white);
    border-bottom: 4px double var(--ink-black);
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow-vintage);
}

header div {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 80px;
    height: 80px;
    border: 3px solid var(--ink-black);
    border-radius: 50e;
    display: none;
    filter: sepia(20%);
}

/* Newspaper Title */
header::before {
    content: "TOORAN";
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--ink-black);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

header::after {
    content: "ESTABLISHED 2024 • PRODUCTIVITY & TASK MANAGEMENT • DAILY EDITION";
    display: block;
    font-family: 'Old Standard TT', serif;
    font-size: 0.9rem;
    color: var(--ink-medium);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    margin-top: 1rem;
}

/* Navigation as Newspaper Sections */
.navbar {
    margin-top: 1rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--ink-black);
    text-decoration: none;
    font-family: 'Old Standard TT', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border: 2px solid var(--ink-black);
    background: var(--paper-white);
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    background: var(--ink-black);
    color: var(--paper-white);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.bar {
    background: var(--ink-black);
    height: 3px;
    width: 25px;
    margin: 3px 0;
}

/* Main Content as Newspaper Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--paper-white);
    box-shadow: var(--shadow-vintage);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* Newspaper Sections */
section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

section:last-child {
    border-bottom: none;
}

/* Newspaper Headlines */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--ink-black);
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    border-bottom: 3px double var(--ink-black);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    position: relative;
}

h2::before,
h2::after {
    content: "❦";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--accent-red);
}

h2::before {
    left: -2rem;
}

h2::after {
    right: -2rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--accent-red);
    text-transform: capitalize;
    border-left: 4px solid var(--accent-red);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

/* Newspaper Columns */
.newspaper-columns {
    columns: 2;
    column-gap: 2rem;
    column-rule: 1px solid var(--border-color);
    text-align: justify;
}

.newspaper-columns p {
    margin-bottom: 1rem;
    text-indent: 1.5rem;
}

/* Typography */
p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--ink-dark);
    text-align: justify;
    margin-bottom: 1rem;
}

.drop-cap {
    float: left;
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    line-height: 3rem;
    padding-right: 8px;
    padding-top: 4px;
    color: var(--accent-red);
    font-weight: 700;
}

/* Lists as Newspaper Items */
ul, ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--ink-dark);
    position: relative;
}

ul li::before {
    content: "▪";
    color: var(--accent-red);
    font-weight: bold;
    position: absolute;
    left: -1rem;
}

/* What's New as Breaking News */
#whats-new {
    background: var(--vintage-yellow);
    border: 3px double var(--accent-red);
    padding: 2rem;
    position: relative;
}

#whats-new::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-red);
    color: var(--paper-white);
    padding: 0.5rem 2rem;
    font-family: 'Old Standard TT', serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.notification-box {
    background: rgba(139, 0, 0, 0.1) !important;
    border: 2px solid var(--accent-red);
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    position: relative;
}

.notification-box::before {
    content: "⚠";
    position: absolute;
    top: -10px;
    left: 1rem;
    background: var(--paper-white);
    color: var(--accent-red);
    font-size: 1.5rem;
    padding: 0 0.5rem;
}

/* Download Section as Classified Ads */
#download {
    background: var(--paper-white);
    border: 2px solid var(--ink-black);
    padding: 2rem;
}

#download h2::before {
    content: "CLASSIFIED";
    position: absolute;
    top: -20px;
    left: 51%;
    transform: translateX(-50%);
    background: var(--ink-black);
    color: var(--paper-white);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

#download ul {
    list-style: none;
    margin-left: 0;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 1rem;
}

#download a {
    display: block;
    background: var(--paper-white);
    color: var(--ink-black);
    padding: 1rem;
    text-decoration: none;
    border: 1px solid var(--border-color);
    margin: 0.5rem 0;
    font-family: 'Old Standard TT', serif;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}

#download a:hover {
    background: var(--ink-black);
    color: var(--paper-white);
}

.latestVersion {
    background: var(--vintage-yellow) !important;
    border: 2px solid var(--accent-red) !important;
    font-weight: 700 !important;
}

.latestVersion::after {
    content: "NEW!";
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-red);
    color: var(--paper-white);
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    transform: rotate(15deg);
}

/* Help Sections as News Articles */
.help-section {
    background: var(--paper-white);
    border-left: 4px solid var(--sepia-tone);
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.help-section h3 {
    color: var(--sepia-tone);
    border-left: none;
    padding-left: 0;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.upcoming {
    border-left-color: var(--accent-red);
    background: var(--vintage-yellow);
}

.upcoming h3 {
    color: var(--accent-red);
}

.upcoming::before {
    content: "COMING SOON";
    position: absolute;
    top: -10px;
    left: 1rem;
    background: var(--accent-red);
    color: var(--paper-white);
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Image Carousel as Photo Gallery */
.wrapper {
    border: 3px double var(--ink-black);
    margin: 2rem 0;
    position: relative;
    background: var(--paper-white);
}

.wrapper::before {
    content: "PHOTO GALLERY";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--paper-white);
    padding: 0.5rem 1rem;
    font-family: 'Old Standard TT', serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    z-index: 10;
}

.wrapper i {
    top: 50%;
    height: 50px;
    width: 50px;
    color: var(--ink-black);
    cursor: pointer;
    font-size: 1.25rem;
    position: absolute;
    text-align: center;
    line-height: 50px;
    background: var(--paper-white);
    border: 2px solid var(--ink-black);
    transform: translateY(-50%);
    transition: all 0.3s ease;
    z-index: 10;
}

.wrapper i:hover {
    background: var(--ink-black);
    color: var(--paper-white);
}

.wrapper i:first-child {
    left: 1rem;
    display: none;
}

.wrapper i:last-child {
    right: 1rem;
}

.carousel {
    font-size: 0;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    padding: 1rem;
}

.carousel img {
    object-fit: cover;
    user-select: none;
    margin-left: 14px;
    width: calc(100% / 3);
    border: 2px solid var(--ink-black);
    filter: sepia(20%);
    transition: all 0.3s ease;
}

.carousel img:first-child {
    margin-left: 0;
}

.carousel img:hover {
    filter: sepia(0%);
    transform: scale(1.02);
}

/* Contact Section as Obituary Style */
#contact {
    background: var(--paper-white);
    border: 2px solid var(--ink-black);
    padding: 2rem;
    text-align: center;
}

#contact a {
    color: var(--accent-red);
    font-weight: 600;
    text-decoration: underline;
    font-family: 'Old Standard TT', serif;
}

#contact a:hover {
    color: var(--ink-black);
}

/* Floating Button as Vintage Badge */
.floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-red);
    color: var(--paper-white);
    border: 3px solid var(--ink-black);
    padding: 1rem 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-family: 'Old Standard TT', serif;
    font-weight: 700;
    box-shadow: var(--shadow-vintage);
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-btn:hover {
    transform: rotate(5deg) scale(1.1);
}

/* Modal as Newspaper Clipping */
.modal {
    display: none;
    position: fixed;
    bottom: 120px;
    right: 2rem;
    background: var(--vintage-yellow);
    padding: 2rem;
    border: 3px double var(--ink-black);
    z-index: 1001;
    min-width: 300px;
    box-shadow: var(--shadow-vintage);
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.modal h3 {
    font-family: 'Playfair Display', serif;
    color: var(--ink-black);
    text-align: center;
    border-bottom: 1px solid var(--ink-black);
    padding-bottom: 0.5rem;
}

.modal input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--ink-black);
    background: var(--paper-white);
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
}

.modal input:focus {
    outline: none;
    box-shadow: 0 0 5px var(--accent-red);
}

.close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ink-black);
    font-weight: bold;
}

#sbc {
    background: var(--ink-black);
    color: var(--paper-white);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--ink-black);
    font-family: 'Old Standard TT', serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sbc:hover {
    background: var(--paper-white);
    color: var(--ink-black);
}

/* Notification as News Flash */
.notification {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    color: var(--paper-white);
    font-family: 'Old Standard TT', serif;
    font-weight: 700;
    border: 2px solid var(--ink-black);
    z-index: 1002;
    box-shadow: var(--shadow-vintage);
}

.hidden {
    display: none;
}

/* Footer as Newspaper Footer */
footer {
    background: var(--ink-black);
    color: var(--paper-white);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 4px double var(--paper-white);
    font-family: 'Old Standard TT', serif;
}

footer::before {
    content: "END OF EDITION";
    display: block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    header::before {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    header::after {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    
    main {
        padding: 1rem;
    }
    
    section {
        margin-bottom: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h2::before,
    h2::after {
        display: none;
    }
    
    .newspaper-columns {
        columns: 1;
    }

    
    .nav-links.active {
        display: flex;
    }
    
    
    .carousel img {
        width: calc(100% / 2);
    }
    
    .floating-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .modal {
        right: 1rem;
        bottom: 80px;
        min-width: 280px;
    }
}

@media (max-width: 550px) {
    .carousel img {
        width: 100%;
    }
    
    #download a {
        min-width: 100%;
    }
}

/* Vintage Paper Texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(139, 115, 85, 0.05) 2px, transparent 0),
        radial-gradient(circle at 75px 75px, rgba(139, 115, 85, 0.05) 2px, transparent 0);
    background-size: 100px 100px;
    pointer-events: none;
    z-index: -1;
}

/* Print-style elements */
.ornament {
    text-align: center;
    font-size: 1.5rem;
    color: var(--accent-red);
    margin: 2rem 0;
}

.ornament::before {
    content: "❦ ❦ ❦";
}