/* Cameroon Tribune - Professional Unified Styles for Both Templates */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary-green: #2e7d32;
    --primary-red: #d32f2f;
    --dark-gray: #333333;
    --light-gray: #f8f9fa;
    --medium-gray: #666666;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-heavy: 0 8px 30px rgba(0,0,0,0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-small: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: white;
    min-height: 100vh;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Professional Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
    font-weight: 400;
}

/* Professional Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Image Loading Optimization */
img {
    max-width: 100%;
    height: auto;
    loading: lazy;
    transition: opacity 0.3s ease;
}

img[data-loaded="false"] {
    opacity: 0;
}

img[data-loaded="true"] {
    opacity: 1;
}

/* Header Styles - Professional */
.header {
    background: white;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

/* Template 1 Header */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease;
}

/* Template 2 Header */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease;
}

.menu-toggle {
    font-size: 18px;
    cursor: pointer;
    color: #333;
    display: none;
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: #333;
    font-weight: bold;
}

.language-selector span {
    margin-right: 15px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.language-selector span:hover,
.language-selector .active {
    color: #2e7d32;
}

/* Logo Styles - Unified Professional Design */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo h1 {
    font-size: 2.8rem;
    color: var(--primary-green);
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    transition: var(--transition);
    cursor: pointer;
    margin: 0;
    line-height: 1;
    text-transform: capitalize;
}

.logo h1:hover {
    transform: scale(1.02);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.15);
}

.logo .tribune {
    color: var(--primary-red);
    font-style: italic;
    position: relative;
    text-transform: lowercase;
    margin-left: 8px;
}

.logo .tribune::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-red), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.logo:hover .tribune::after {
    transform: scaleX(1);
}

/* Ensure consistent logo styling across both templates */
.logo h1,
body:has(.header-content) .logo h1,
body:has(.header-top) .logo h1 {
    font-size: 2.8rem;
    color: var(--primary-green);
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    text-transform: capitalize;
    margin: 0;
    line-height: 1;
}

.logo .tribune,
body:has(.header-content) .logo .tribune,
body:has(.header-top) .logo .tribune {
    color: var(--primary-red);
    font-style: italic;
    text-transform: lowercase;
    margin-left: 8px;
}

/* Social Links - Professional */
.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    color: var(--medium-gray);
    font-size: 18px;
    text-decoration: none;
    transition: var(--transition);
    padding: 8px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-green), var(--primary-red));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-links a:hover {
    color: white;
    transform: translateY(-2px);
}

.social-links a:hover::before {
    opacity: 1;
}

/* Template 2 Social Links - Enhanced */
body:has(.header-content) .social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

body:has(.header-content) .social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-medium);
}

.social-links .facebook {
    background: linear-gradient(135deg, #3b5998, #4c70ba);
}
.social-links .google {
    background: linear-gradient(135deg, #dd4b39, #ea6153);
}
.social-links .linkedin {
    background: linear-gradient(135deg, #0077b5, #0099d4);
}

/* Navigation - Professional */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    position: relative;
}

.main-nav::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 35px;
    position: relative;
}

/* Template 2 Navigation */
body:has(.header-content) .main-nav {
    justify-content: center;
}

body:has(.header-content) .main-nav ul {
    gap: 40px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

/* Template 2 Navigation Links */
body:has(.header-content) .main-nav a {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: #2e7d32;
    border-bottom-color: #2e7d32;
}

.search-icon {
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

.search-icon:hover {
    color: #2e7d32;
}

/* Hero Section - Professional Template 1 */
.hero {
    height: 450px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3)),
                url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        rgba(46, 125, 50, 0.1) 0%,
        transparent 25%,
        transparent 75%,
        rgba(211, 47, 47, 0.1) 100%);
    animation: pulse 4s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, rgba(245, 245, 245, 0.3), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 16px;
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-content .date {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 500;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    display: inline-block;
    margin-top: 8px;
}

/* Featured Article - Template 2 */
.featured-article {
    margin-bottom: 40px;
}

.featured-content {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    cursor: pointer;
}

.featured-content img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 40px 30px 30px;
}

.featured-text h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
    line-height: 1.2;
}

/* Main Content */
.main-content {
    padding: 40px 0;
    background: white;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2e7d32;
    display: inline-block;
}

/* Category Labels - Professional */
.category {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.category:hover::before {
    left: 100%;
}

.category.politics {
    background: linear-gradient(135deg, #333, #555);
    color: white;
}
.category.economy {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
}
.category.international {
    background: linear-gradient(135deg, #1976d2, #2196f3);
    color: white;
}
.category.elections {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    color: white;
}
.category.social {
    background: linear-gradient(135deg, #7b1fa2, #9c27b0);
    color: white;
}
.category.society {
    background: linear-gradient(135deg, #f57c00, #ff9800);
    color: white;
}

/* News Grid - Template 1 */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* News Grid - Template 2 */
body:has(.featured-article) .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* News Items - Professional */
.news-item.large {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
}

.news-item.large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-red));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-item.large:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.news-item.large:hover::before {
    transform: scaleX(1);
}

.news-item.large img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* News Cards - Professional Template 2 */
.news-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease;
}

.news-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.05), rgba(211, 47, 47, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.news-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.news-card:hover::after {
    opacity: 1;
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-content {
    padding: 24px;
    position: relative;
}

.card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.card-content h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-top: 12px;
    color: var(--dark-gray);
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-card:hover .card-content h3 {
    color: var(--primary-green);
}

.news-content {
    padding: 15px;
}

.news-content .date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.news-content h4 {
    font-size: 1.1rem;
    line-height: 1.4;
    color: #333;
}

/* News List - Template 1 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item-horizontal {
    display: flex;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
}

.news-item-horizontal img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Template 2 Sidebar */
body:has(.featured-article) .sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: white;
    padding: 0;
    box-shadow: none;
}

.sidebar-news {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.sidebar-item .time {
    background: #2e7d32;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.sidebar-item h4 {
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Newsletter */
.newsletter {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.newsletter h3 {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.newsletter p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.newsletter-form button {
    background: #333;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #2e7d32;
}

/* Most Popular */
.most-popular {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.most-popular h3 {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.most-popular ul {
    list-style: none;
}

.most-popular li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.most-popular li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.most-popular .bullet {
    color: #2e7d32;
    font-weight: bold;
    margin-top: 2px;
}

.most-popular a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.most-popular a:hover {
    color: #2e7d32;
}

/* Bottom Section - Template 2 */
.bottom-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Editor's Pick */
.editors-pick h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pick-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.pick-item:hover {
    transform: translateY(-3px);
}

.pick-item.large {
    display: flex;
    flex-direction: column;
}

.pick-item.large img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.pick-item.small {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pick-item.small img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}

.pick-content {
    padding: 20px;
}

.pick-content h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-top: 10px;
    color: #333;
}

.pick-content h4 {
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
    margin-bottom: 5px;
}

.pick-content .date {
    color: #666;
    font-size: 0.9rem;
}

/* Featured Sport */
.featured-sport {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    cursor: pointer;
}

.featured-sport img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.sport-content {
    padding: 15px;
}

/* More News */
.more-news {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item-small {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
}

.news-item-small .number {
    background: #2e7d32;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Professional Loading States */
.loading {
    background: linear-gradient(90deg,
        var(--light-gray) 25%,
        rgba(46, 125, 50, 0.1) 50%,
        var(--light-gray) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255,255,255,0.6),
        transparent);
    animation: shine 2s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Professional Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: pageLoad 0.8s ease forwards;
}

@keyframes pageLoad {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Professional Scroll Indicators */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--border-color);
    z-index: 1000;
}

.scroll-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-red));
    width: 0%;
    transition: width 0.1s ease;
}

/* Professional Focus States */
*:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Professional Selection */
::selection {
    background: var(--primary-green);
    color: white;
}

::-moz-selection {
    background: var(--primary-green);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .content-grid,
    .bottom-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h2,
    .featured-text h1 {
        font-size: 2rem;
    }
    
    .main-nav ul {
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .main-nav a {
        font-size: 0.9rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .pick-item.small {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pick-item.small img {
        width: 100%;
        height: 150px;
    }
    
    .main-nav.mobile-active {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 20px;
    }
    
    .main-nav.mobile-active ul {
        flex-direction: column;
        gap: 10px;
    }
}
