/*
Theme Name: Variety Style Theme
Theme URI: https://thevoiceofkannadiga.com
Author: Custom Theme
Author URI: https://thevoiceofkannadiga.com
Description: A professional magazine-style WordPress theme inspired by Variety.com design
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: variety-theme
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #e50914;
}

/* ============================================
   Container & Layout
   ============================================ */
.site-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 40px;
}

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

/* ============================================
   Header Styles
   ============================================ */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo Size Control - Adjust these values as needed */
.site-logo {
    font-size: 36px; /* Reduced from 48px - CHANGE THIS to adjust text logo size */
    font-weight: 900;
    font-family: 'Georgia', serif;
    font-style: italic;
    letter-spacing: -2px;
}

.site-logo a {
    color: #000;
}

/* Image Logo Size Control */
.site-logo img {
    max-height: 60px; /* CHANGE THIS to adjust image logo height (default: 60px) */
    width: auto;
    display: block;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.search-toggle,
.newsletter-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.newsletter-btn {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
}

/* ============================================
   Navigation Menu
   ============================================ */
.main-navigation {
    background: #fff;
    max-width: 1400px;
    margin: 0 auto;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding: 0 20px; /* Match site-container padding */
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    border-bottom-color: #e50914;
    color: #e50914;
}

/* Dropdown Menu */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    display: none;
    flex-direction: column;
}

.main-navigation li:hover > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-transform: none;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: #e50914;
    border: none;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    border-radius: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   Pagination Styles
   ============================================ */
.pagination {
    margin: 60px 0 40px;
    padding: 30px 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination-prev,
.pagination-next {
    font-size: 16px;
    font-weight: 600;
}

.pagination-prev a,
.pagination-next a {
    padding: 10px 20px;
    background: #f5f5f5;
    border-radius: 5px;
    color: #333;
    transition: all 0.3s ease;
}

.pagination-prev a:hover,
.pagination-next a:hover {
    background: #e50914;
    color: #fff;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-number {
    display: inline-block;
    padding: 8px 14px;
    background: #f5f5f5;
    border-radius: 5px;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-number:hover {
    background: #e50914;
    color: #fff;
}

.page-number.current {
    background: #e50914;
    color: #fff;
}

.page-dots {
    padding: 0 5px;
    color: #999;
    font-weight: bold;
}

/* ============================================
   Hero Slideshow (16:9 Ratio Enforced)
   ============================================ */
.hero-slideshow {
    margin: 30px 0; /* Changed from 'auto' to '0' - aligns with content flow */
    position: relative;
    width: 100%;
    max-width: 800px; /* CRITICAL: Limit width for proper 16:9 ratio */
    aspect-ratio: 16/9; /* CRITICAL: Enforces 16:9 ratio */
    max-height: 450px; /* Limits max height */
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.hero-slides-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.hero-slide-image {
    width: 100%;
    height: 100%;
}

.hero-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crops to fit 16:9 container */
    object-position: center; /* Centers the image */
    display: block;
}

.hero-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px; /* Reduced from 40px */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    color: #fff;
    z-index: 2;
}

.hero-category {
    display: inline-block;
    padding: 4px 10px; /* Slightly smaller */
    background: #e50914;
    color: #fff;
    font-size: 11px; /* Reduced from 12px */
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    border-radius: 3px;
}

.hero-title {
    font-size: 24px; /* Reduced from 32px for better proportions */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px; /* Increased spacing before meta */
}

.hero-title a {
    color: #fff;
}

.hero-meta {
    font-size: 13px; /* Reduced from 14px */
    opacity: 0.8;
}

/* Slideshow Navigation Arrows */
.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 32px; /* Reduced from 40px */
    width: 45px; /* Reduced from 50px */
    height: 45px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(229,9,20,0.9);
    transform: translateY(-50%) scale(1.1);
}

.hero-prev {
    left: 15px; /* Reduced from 20px */
}

.hero-next {
    right: 15px;
}

/* Slide Indicators */
.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-indicator.active {
    background: #e50914;
    width: 30px;
    border-radius: 6px;
}

.hero-indicator:hover {
    background: rgba(255,255,255,0.8);
}

/* Hide slideshow on mobile */
@media (max-width: 768px) {
    .hero-slideshow {
        display: none;
    }
}

/* ============================================
   Article Grid
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-thumbnail {
    position: relative;
    overflow: hidden;
}

.article-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9; /* 16:9 ratio for better visibility */
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    bottom: 10px; /* Changed from top to bottom */
    left: 10px; /* Keep at left */
    padding: 5px 12px;
    background: #e50914;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 2; /* Ensure it appears above image */
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.article-title a {
    color: #000;
}

.article-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.article-meta {
    font-size: 13px;
    color: #999;
}

.article-author {
    color: #e50914;
    font-weight: 600;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e50914;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.sidebar-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.sidebar-post-meta {
    font-size: 12px;
    color: #999;
}

/* ============================================
   Single Post
   ============================================ */
.single-post-header {
    max-width: 800px;
    margin: 40px auto;
    text-align: center;
}

.post-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.post-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

.post-featured-image {
    max-width: 800px; /* Match text content width */
    margin: 40px auto; /* Center it like the content */
    border-radius: 8px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9; /* Maintain 16:9 ratio */
    object-fit: cover;
    display: block;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 40px 0 20px;
}

.post-content h3 {
    font-size: 26px;
    font-weight: 700;
    margin: 30px 0 15px;
}

.post-content img {
    margin: 30px 0;
    border-radius: 8px;
}

.post-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 4px solid #e50914;
    background: #f9f9f9;
    font-size: 20px;
    font-style: italic;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #ccc;
    font-size: 14px;
}

.footer-widget a:hover {
    color: #e50914;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.footer-bottom nav {
    margin-top: 15px;
}

.footer-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0 0 0;
    padding: 0;
}

.footer-menu li {
    margin: 0;
    padding: 0;
}

.footer-menu li::before {
    content: none; /* Remove any bullets */
}

.footer-menu a {
    color: #ccc;
    font-size: 14px;
    padding: 5px 0;
    display: inline-block;
}

.footer-menu a:hover {
    color: #e50914;
}

/* ============================================
   Category Tags
   ============================================ */
.post-tags,
.post-categories {
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tags a,
.post-categories a {
    display: inline-block;
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

.post-tags a:hover,
.post-categories a:hover {
    background: #e50914;
    color: #fff;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    /* Hero slideshow maintains 16:9 ratio on tablets */
    .hero-slideshow {
        max-height: 380px; /* Reduced for tablets */
        max-width: 675px; /* Width for 16:9 ratio: 380px × 16/9 */
    }
    
    .hero-title {
        font-size: 20px; /* Reduced for tablets */
    }
    
    .hero-slide-content {
        padding: 25px;
    }
    
    .hero-prev,
    .hero-next {
        width: 38px;
        height: 38px;
        font-size: 26px;
    }
    
    .hero-prev {
        left: 10px;
    }
    
    .hero-next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .site-logo {
        font-size: 28px; /* Smaller logo on mobile */
    }
    
    .site-logo img {
        max-height: 45px; /* Smaller logo image on mobile */
    }
    
    /* Mobile Menu Toggle Button */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide navigation by default on mobile */
    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 0;
        margin: 0;
        z-index: 999;
    }
    
    /* Show menu when toggle is active */
    .main-navigation ul.mobile-active {
        display: flex;
    }
    
    .main-navigation {
        position: relative;
    }
    
    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-navigation a {
        padding: 15px 20px;
        border-bottom: none;
    }
    
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        background: #f9f9f9;
        min-width: 100%;
    }
    
    .header-top {
        position: relative;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .post-title {
        font-size: 32px;
    }
    
    /* Single post featured image on mobile */
    .post-featured-image {
        max-width: 100%; /* Full width on mobile */
        margin: 30px auto; /* Reduced margins */
    }
    
    .post-content {
        font-size: 16px; /* Slightly smaller on mobile */
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .pagination-wrapper {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: center;
}

.mt-40 {
    margin-top: 40px;
}

.mb-40 {
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e50914;
}
