/* Melodica News - Global Styles */

:root {
    --primary-color: #635BFF;
    --primary-dark: #4D45CC;
    --primary-darker: #3D35AA;
    --primary-light: #7A73FF;
    --secondary-color: #FF6B9D;
    --secondary-dark: #FF5585;
    --text-color: #333;
    --muted-color: #666;
    --light-gray: #f5f5f5;
    --border-color: #ddd;

    --font-serif: Georgia, 'Times New Roman', serif;
    --font-sans: 'Helvetica Neue', Arial, sans-serif;
    --font-ui: 'Plus Jakarta Sans', var(--font-sans);
    --font-display: 'Bebas Neue', Impact, sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-serif);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

img {
    max-width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-light);
}

/* Shared buttons */
.header-actions a,
.ad-cta {
    display: inline-block;
    color: white;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    border-radius: 4px;
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-actions a:hover,
.ad-cta:hover {
    color: white;
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.read-more,
.subscribe-btn {
    display: inline-block;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(99, 91, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.read-more {
    padding: 0.75rem 2rem;
}

.subscribe-btn {
    padding: 1rem 3rem;
    border-radius: 5px;
}

.read-more:hover,
.subscribe-btn:hover {
    color: white;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    box-shadow: 0 6px 15px rgba(99, 91, 255, 0.4);
    transform: translateY(-2px);
}

/* ========================================
   HEADER
   ======================================== */

.header-swiss {
    background: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-top-swiss {
    padding: 1rem 2rem 0.5rem;
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s ease, font-size 0.3s ease;
}

.current-date-swiss,
.hub-link {
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.hub-link:hover {
    color: white;
    text-decoration: underline;
}

.logo-container-swiss {
    padding: 1.25rem 2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    transition: padding 0.3s ease;
}

.logo-swiss {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 8px;
    line-height: 0.85;
    display: block;
    position: relative;
    transition: font-size 0.3s ease, letter-spacing 0.3s ease, line-height 0.3s ease;
}

.logo-swiss:hover {
    color: #fff;
}

.logo-swiss::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3));
    transition: width 0.3s ease;
}

.logo-swiss:hover::after {
    width: 120px;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.header-actions a {
    padding: 0.4rem 0.9rem;
    font-size: 0.75rem;
}

/* Navigation */
.nav-swiss {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-swiss ul {
    list-style: none;
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-swiss li {
    flex: 1;
    text-align: center;
}

.nav-swiss a {
    display: block;
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease, padding 0.3s ease;
}

.nav-swiss li:last-child a {
    border-right: none;
}

.nav-swiss a:hover,
.nav-swiss a.active {
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
}

/* Minimized header (after scrolling) */
.header-minimized .header-top-swiss {
    padding: 0.5rem 2rem 0.25rem;
    font-size: 0.6rem;
}

.header-minimized .logo-container-swiss {
    padding: 0.5rem 2rem 0.75rem;
}

.header-minimized .logo-swiss {
    font-size: 2.5rem;
    letter-spacing: 4px;
    line-height: 1;
}

.header-minimized .logo-swiss::after {
    height: 4px;
    width: 40px;
    bottom: -4px;
}

.header-minimized .header-actions a {
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
}

.header-minimized .nav-swiss a {
    padding: 0.5rem 1rem;
    font-size: 0.65rem;
    letter-spacing: 2px;
}

/* ========================================
   LAYOUT & LISTINGS
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
    border-bottom: 3px double var(--primary-light);
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--muted-color);
    font-style: italic;
}

.section-title {
    border-bottom: 3px solid var(--primary-light);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: white;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article-card-content {
    padding: 1.5rem;
}

.article-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: #000;
}

.article-card p {
    color: var(--muted-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--muted-color);
}

.article-section {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-light);
}

.article-date {
    color: #999;
}

.plus-badge,
.premium-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    padding: 0.25rem 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.plus-badge { background: var(--secondary-color); }
.premium-badge { background: var(--primary-color); }

.badge-inline {
    position: relative;
    top: auto;
    right: auto;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

/* Featured article */
.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.featured-article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-article-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-article-content .read-more {
    align-self: flex-start;
}

.featured-article-content h2 {
    font-size: 2.5rem;
}

.featured-article-content p {
    font-size: 1.1rem;
    color: var(--muted-color);
    margin-bottom: 1.5rem;
}

/* ========================================
   ARTICLE PAGE
   ======================================== */

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.article-main {
    min-width: 0;
}

.article-header {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    text-align: center;
}

.article-author {
    color: var(--muted-color);
    margin-bottom: 1rem;
}

.article-author strong {
    color: var(--primary-color);
}

.article-featured-image {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 2rem;
    display: block;
}

.article-content {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    margin-top: 2rem;
}

.article-inline-image {
    display: block;
    width: 100%;
    margin: 2rem 0;
}

/* Piano paywall gradient */
.template-shown {
    position: relative;
}

.template-shown::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 200px;
    background-image: linear-gradient(to top, #fff 0%, #fff 30%, rgba(255, 255, 255, 0) 100%);
}

/* Recommendations (Piano Content) */
#recommendations {
    margin-top: 3rem;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#recommendations::before {
    content: 'Read Next';
    display: block;
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
}

/* Sidebar ads */
.article-sidebar {
    position: sticky;
    top: 184px; /* clears the minimized sticky header */
    align-self: start;
}

.ad-banner {
    background: var(--light-gray);
    border: 2px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ad-banner:hover {
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.2);
    border-color: var(--primary-color);
}

.ad-banner p {
    font-size: 0.9rem;
    color: var(--muted-color);
}

.ad-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.ad-visual {
    padding: 2rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    color: white;
}

.ad-visual h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.ad-visual p {
    color: white;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.ad-visual-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.ad-visual--orange { background: linear-gradient(135deg, #ff6b35, #f7931e); }
.ad-visual--violet { background: linear-gradient(135deg, #667eea, #764ba2); }
.ad-visual--navy { background: linear-gradient(135deg, #0B162A, #C83803); }

.ad-cta {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

/* ========================================
   SUBSCRIPTION & ACCOUNT PAGES
   ======================================== */

.account-container {
    max-width: 900px;
    margin: 0 auto;
}

.account-actions {
    margin-bottom: 2rem;
    text-align: center;
}

.account-btn {
    margin: 0 0.5rem;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: linear-gradient(135deg, var(--primary-darker), var(--primary-dark));
    color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem 1rem;
    margin-top: 4rem;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    margin: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .header-top-swiss,
    .header-minimized .header-top-swiss {
        padding: 0.5rem 1rem 0.25rem;
    }

    .logo-container-swiss {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .header-minimized .logo-container-swiss {
        flex-direction: row;
        padding: 0.75rem 1rem;
        text-align: left;
    }

    .logo-swiss {
        font-size: 3.5rem;
        letter-spacing: 4px;
    }

    .logo-swiss::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .header-minimized .logo-swiss {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .header-minimized .logo-swiss::after {
        display: none;
    }

    /* Nav: one horizontally scrollable row */
    .nav-swiss ul {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav-swiss li {
        flex: 0 0 auto;
    }

    .nav-swiss a,
    .header-minimized .nav-swiss a {
        padding: 0.6rem 1rem;
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .article-grid,
    .featured-article,
    .article-layout {
        grid-template-columns: 1fr;
    }

    .page-header h1,
    .article-header h1,
    .featured-article-content h2 {
        font-size: 2rem;
    }

    .article-sidebar {
        position: static;
        margin-top: 2rem;
    }

    #recommendations {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    #recommendations::before {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}
