/*
Theme Name: The Best News Network
Theme URI: 
Author: BNN Theme Team
Description: A premium 3D animated news theme with spiral post layout, inspired by cutting-edge creative portfolio designs. Dark theme with vibrant accents, smooth animations, and full WordPress integration.
Version: 1.5.1
License: GNU General Public License v2
Tags: dark, news, 3d, animated, responsive, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   CSS Reset / Normalize
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */
:root {
    --color-bg: #0a0a0a;
    --color-bg-alt: #0f0f14;
    --color-surface: #141418;
    --color-card: #1a1a22;
    --color-card-hover: #22222e;
    --color-primary: #6c5ce7; /* electric purple */
    --color-secondary: #00cec9; /* cyan/teal */
    --color-accent: #fd79a8; /* coral pink */
    --color-text: #f5f5f7;
    --color-text-dim: #8a8a9a;
    --color-text-muted: #555566;
    --color-border: #2a2a35;
    
    --color-glow-purple: rgba(108, 92, 231, 0.4);
    --color-glow-cyan: rgba(0, 206, 201, 0.4);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    
    --grid-margin: 24px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;
}

/* ==========================================================================
   Base Layout & Typography
   ========================================================================== */
body {
    background-color: #0a0a0a !important;
    background-image: none !important;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

/* Lock body scroll on homepage (spiral handles its own scroll) */
body.home,
body.blog {
    overflow: hidden;
}
body.home.list-active,
body.blog.list-active {
    overflow: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}

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

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--grid-margin);
}

.visually-hidden, .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   WordPress Required Classes
   ========================================================================== */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

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

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5em;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--color-text-dim);
    text-align: center;
    margin-top: 0.5rem;
}

.gallery {
    margin-bottom: 1.5em;
}

.sticky {
    display: block;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea {
    background-color: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    width: 100%;
    transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-glow-purple);
}

button, 
input[type="button"], 
input[type="reset"], 
input[type="submit"] {
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s var(--ease-smooth), transform 0.2s var(--ease-spring), box-shadow 0.3s var(--ease-smooth);
}

button:hover, 
input[type="button"]:hover, 
input[type="reset"]:hover, 
input[type="submit"]:hover {
    background-color: var(--color-secondary);
    box-shadow: 0 4px 15px var(--color-glow-cyan);
    transform: translateY(-2px);
}

/* ==========================================================================
   Scrollbar & Selection
   ========================================================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

::selection {
    background-color: var(--color-primary);
    color: #ffffff;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes glow {
    0% { box-shadow: 0 0 5px var(--color-glow-purple); }
    50% { box-shadow: 0 0 20px var(--color-glow-purple); }
    100% { box-shadow: 0 0 5px var(--color-glow-purple); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.fade-in { animation: fadeIn 0.5s var(--ease-smooth) forwards; }
.slide-up { animation: slideUp 0.5s var(--ease-smooth) forwards; }
.scale-in { animation: scaleIn 0.5s var(--ease-spring) forwards; }
