/*
Theme Name: TechSurfex
Theme URI: https://techsurfex.com
Author: Abir
Author URI: https://techsurfex.com
Description: A modern responsive WordPress theme for news and magazine websites, featuring breaking news ticker, responsive navbar, ad slots, and grid layout.
Version: 1.0.0
License: GPL v2 or later
Text Domain: techsurfex
*/

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --white: #fff;
    --black: #000;
    --gray: #95a5a6;
    --light-gray: #f5f5f5;
    --border-radius: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
}

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

a:hover {
    color: var(--secondary-color);
}

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo img {
    height: 40px;
    width: auto;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.site-description {
    font-size: 12px;
    color: var(--text-light);
}

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav li {
    margin-left: 0;
}

.main-nav a {
    font-weight: 600;
    padding: 5px 0;
    position: relative;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--secondary-color);
}

.main-nav a.active:after,
.main-nav a:hover:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--primary-color);
}

/* Ad Banner Styles */
.ad-banner {
    margin: 20px 0;
    text-align: center;
}

.ad-placeholder {
    background-color: var(--light-gray);
    border: 1px dashed var(--gray);
    display: inline-block;
    position: relative;
    overflow: hidden;
    background: #f0f2f5;
    border-radius: 6px;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
    padding: 10px;
}

.top-banner .ad-placeholder,
.mid-banner .ad-placeholder {
    width: 728px;
    height: 90px;
    line-height: 90px;
}

.bottom-banner .ad-placeholder {
    width: 970px;
    height: 250px;
    line-height: 250px;
}

/* Breaking News Ticker */
.breaking-news {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 0;
}

.breaking-label {
    font-weight: bold;
    margin-right: 10px;
    background: rgba(0,0,0,0.2);
    padding: 3px 8px;
    border-radius: 20px;
}

.ticker {
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 100px);
    overflow: hidden;
}

.ticker ul {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 25s linear infinite;
}

.ticker li {
    display: inline-block;
    margin-right: 40px;
}

.ticker a {
    color: var(--white);
}

.ticker a:hover {
    text-decoration: underline;
}

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

/* Main Content Layout */
.main-content {
    display: flex;
    flex-wrap: wrap;
    margin: 30px auto;
    gap: 30px;
}

.featured-article {
    width: 100%;
    margin-bottom: 0;
}

.sidebar {
    width: 30%;
}

.news-grid {
    width: 70%;
}

/* Featured Article Styles */
.featured {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.featured-image {
    width: 50%;
    position: relative;
}

.featured-content {
    width: 50%;
    padding: 20px;
}

.featured h1 {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured h1 a {
    color: var(--dark-color);
}

.featured .meta {
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-light);
}

.featured .meta span {
    margin-right: 15px;
}

.read-more {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: 600;
}

.read-more:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Category Badges */
.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
.category-politics { background-color: #3498db; }
.category-technology { background-color: #2ecc71; }
.category-sports { background-color: #e67e22; }
.category-business { background-color: #9b59b6; }
.category-entertainment { background-color: #f1c40f; color: var(--dark-color); }

/* Sidebar Widgets */
.sidebar-widget {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.ad-widget .ad-placeholder {
    width: 300px;
    height: 250px;
    line-height: 250px;
}

/* News Grid */
.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.news-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 8px;
}

.pagination a,
.pagination span {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--text-color);
    box-shadow: var(--box-shadow);
}

.pagination .current,
.pagination a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 40px;
}

.footer a {
    color: var(--white);
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    gap: 30px;
}

.footer-widget {
    flex: 1;
    min-width: 180px;
}

.footer-widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
}

.footer-widget h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-image, .featured-content { width: 100%; }
    .sidebar { width: 35%; }
    .news-grid { width: 65%; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 999;
        gap: 15px;
    }
    .main-nav ul.show { display: flex; }
    .main-nav li { margin: 0; }
    .sidebar, .news-grid { width: 100%; padding: 0; }
    .sidebar { margin-top: 30px; }
    .grid-container { grid-template-columns: 1fr; }
    .top-banner .ad-placeholder,
    .mid-banner .ad-placeholder { width: 468px; height: 60px; line-height: 60px; }
    .bottom-banner .ad-placeholder { width: 728px; height: 90px; line-height: 90px; }
}

@media (max-width: 576px) {
    .featured h1 { font-size: 22px; }
    .top-banner .ad-placeholder,
    .mid-banner .ad-placeholder { width: 320px; height: 50px; line-height: 50px; }
    .bottom-banner .ad-placeholder { width: 300px; height: 250px; line-height: 250px; }
    .ad-widget .ad-placeholder { width: 250px; height: 200px; line-height: 200px; }
}

.img-responsive {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alignleft {
    float: left;
    margin-right: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
}

.wp-caption {
    max-width: 100%;
}
