/*
Theme Name:   GP Tube Portal (GeneratePress Child)
Theme URI:    https://generatepress.com
Description:  A premium, high-performance, dark-mode-first WordPress theme designed in a tube-portal grid layout (inspired by sexvid.pro design).
Author:       Antigravity AI
Author URI:   https://github.com/google-deepmind
Template:     generatepress
Version:      1.0.0
Text Domain:  gp-tube-portal
*/

/* ==========================================================================
   1. Theme Variables & Reset
   ========================================================================== */
:root {
    --bg-primary: #111111;      /* True black background */
    --bg-secondary: #1d1d1d;    /* Charcoal panels and cards */
    --bg-tertiary: #2a2a2a;     /* Lighter slate-grey inputs & widgets */
    --border-color: #333333;    /* Thin clean borders */
    --accent-color: #ff8a00;    /* xHamster Signature Orange */
    --accent-hover: #ffa600;    /* Bright Orange hover state */
    --text-primary: #f5f6fa;    /* High contrast text for titles and headings */
    --text-secondary: #cccccc;  /* Light grey body text */
    --text-muted: #777777;      /* Muted text for dates, views, tags */
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --card-hover-shadow: 0 10px 30px rgba(255, 138, 0, 0.15);
    --border-radius-lg: 12px;
    --border-radius-md: 8px;
    --border-radius-sm: 4px;
    --font-heading: 'Outfit', 'Noto Sans Devanagari', sans-serif;
    --font-body: 'Outfit', 'Noto Sans Devanagari', sans-serif;
}

/* Light Theme Variables Override */
body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --accent-color: #ff2a2a;
    --accent-hover: #e01b1b;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Base resets & Fonts */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

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

/* ==========================================================================
   2. Header & Sticky Navigation
   ========================================================================== */
.site-header {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

/* Glowing Neon Top Line */
.site-header::before {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #ffaa33, #ffd633, var(--accent-color));
    background-size: 300% 100%;
    animation: neon-gradient-flow 8s linear infinite;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

@keyframes neon-gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Main Navigation Style Overrides */
.main-navigation, 
.main-navigation ul ul {
    background-color: var(--bg-secondary) !important;
}

.main-navigation .main-nav ul li a {
    color: var(--text-secondary);
    font-weight: 500;
    font-family: var(--font-heading);
    font-size: 15px;
    padding: 12px 20px;
    position: relative;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a {
    color: var(--text-primary) !important;
    background-color: transparent !important;
}

/* Bottom highlight bar for active/hover menu items */
.main-navigation .main-nav ul li > a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.main-navigation .main-nav ul li:hover > a::after,
.main-navigation .main-nav ul li.current-menu-item > a::after {
    transform: scaleX(1);
}

/* Responsive Header Toggle */
.menu-toggle {
    color: var(--text-primary) !important;
    background-color: var(--bg-tertiary) !important;
}

.menu-toggle:hover {
    background-color: var(--accent-color) !important;
    color: #fff !important;
}

/* ==========================================================================
   3. Custom Portal Header Search Bar
   ========================================================================== */
.gp-tube-search-section {
    background-color: var(--bg-primary);
    padding: 25px 0 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.gp-tube-search-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 15px;
}

.gp-tube-search-form {
    display: flex;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background-color: var(--bg-tertiary);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.gp-tube-search-form:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 56, 56, 0.2);
}

.gp-tube-search-input {
    flex-grow: 1;
    background-color: transparent !important;
    border: none !important;
    padding: 14px 25px !important;
    color: var(--text-primary) !important;
    font-size: 16px;
    outline: none !important;
    height: auto !important;
}

.gp-tube-search-input::placeholder {
    color: var(--text-muted);
}

.gp-tube-search-button {
    background-color: var(--accent-color);
    border: none;
    padding: 0 30px;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.gp-tube-search-button:hover {
    background-color: var(--accent-hover);
}

.gp-tube-search-button i {
    margin-right: 8px;
}

@media (max-width: 768px) {
    .gp-tube-search-button span {
        display: none; /* Hide text on mobile, keep icon */
    }
    .gp-tube-search-button {
        padding: 0 20px;
    }
}

/* ==========================================================================
   4. Post Grid & Cards (Homepage & Archives)
   ========================================================================== */
.generate-columns-container {
    margin-left: -12px !important;
    margin-right: -12px !important;
}

.generate-columns {
    padding-left: 12px !important;
    padding-right: 12px !important;
    margin-bottom: 24px !important;
}

/* Card Styling */
.inside-article {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-lg) !important;
    overflow: hidden;
    padding: 0 !important;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                border-color 0.3s ease;
}

.inside-article:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(255, 138, 0, 0.3) !important;
}

/* Image Container */
.post-image {
    margin: 0 !important;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-image a, 
.post-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.inside-article:hover .post-image img {
    transform: scale(1.06);
}

/* Card Badge Overlay (Top Left) */
.inside-article .post-image::before {
    content: attr(data-category);
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Video/Post Duration/Read-time Overlay (Bottom Right) */
.gp-badge-read-time {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(12, 15, 23, 0.85);
    color: #ffffff;
    padding: 3px 6px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 500;
    z-index: 5;
    pointer-events: none;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gp-badge-read-time i {
    margin-right: 4px;
    font-size: 10px;
    color: var(--accent-color);
}

/* Card Content Area */
.inside-article .entry-header {
    padding: 15px 15px 5px 15px !important;
}

.inside-article .entry-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0 0 10px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px; /* Uniform height for title spacing */
}

.inside-article .entry-title a {
    color: var(--text-primary) !important;
}

.inside-article .entry-title a:hover {
    color: var(--accent-color) !important;
}

/* Card Metadata (Views, Date) */
.inside-article .entry-meta {
    padding: 0 15px 15px 15px !important;
    margin: 0 !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
    border-top: 1px solid var(--border-color);
    padding-top: 10px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inside-article .entry-meta span {
    display: inline-flex;
    align-items: center;
}

.inside-article .entry-meta i {
    margin-right: 5px;
    color: var(--text-muted);
}

.inside-article .entry-meta .gp-views-count i {
    color: var(--accent-color);
}

.inside-article .entry-summary {
    display: none; /* Hide summary excerpt on home/grid to match sexvid style */
}

/* Headline headers for homepage blocks */
.gp-section-headline {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gp-section-headline h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    position: relative;
}

.gp-section-headline h2::after {
    content: "";
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
}

/* ==========================================================================
   5. Sidebar Widgets (Glassmorphic Blocks)
   ========================================================================== */
.sidebar .widget {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-lg) !important;
    padding: 20px !important;
    margin-bottom: 25px !important;
    box-shadow: var(--card-shadow);
}

.sidebar .widget-title {
    font-size: 16px !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px !important;
    margin-bottom: 15px !important;
    position: relative;
}

.sidebar .widget-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

/* Sidebar lists styling */
.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar .widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar .widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar .widget ul li a {
    color: var(--text-secondary);
}

.sidebar .widget ul li a:hover {
    color: var(--accent-color);
}

/* Category counter badges */
.sidebar .widget ul li .post-count {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   6. Single Post Page Layout
   ========================================================================== */
.single-post .inside-article {
    padding: 30px !important;
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-lg) !important;
}

@media (max-width: 768px) {
    .single-post .inside-article {
        padding: 15px !important;
    }
}

.single-post .entry-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px !important;
    margin-bottom: 25px !important;
}

.single-post .entry-title {
    font-size: 28px !important;
    line-height: 1.3 !important;
    margin-bottom: 15px !important;
}

/* Single meta bar */
.single-post .entry-meta {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.single-post .entry-meta a {
    color: var(--text-secondary);
}

.single-post .entry-meta i {
    margin-right: 5px;
    color: var(--accent-color);
}

/* Large Featured Image / Video Container */
.gp-single-media-container {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    background-color: #000000;
    box-shadow: var(--card-shadow);
}

.gp-single-media-container img,
.gp-single-media-container iframe,
.gp-single-media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Readable Content Styling */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary) !important;
}

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

.entry-content h2, 
.entry-content h3 {
    margin: 35px 0 15px 0;
    position: relative;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.entry-content h2::before {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: var(--accent-color);
}

/* Bullet lists in content */
.entry-content ul, 
.entry-content ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.entry-content ul li {
    margin-bottom: 8px;
    position: relative;
}

/* Premium styled blockquotes */
.entry-content blockquote {
    background-color: var(--bg-tertiary);
    border-left: 4px solid var(--accent-color);
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    font-style: italic;
}

.entry-content blockquote p {
    margin-bottom: 0;
    color: var(--text-primary) !important;
}

/* Modern tables styling */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.entry-content table th {
    background-color: var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
    font-size: 14px;
    border-bottom: 2px solid var(--accent-color);
}

.entry-content table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

.entry-content table tr:last-child td {
    border-bottom: none;
}

.entry-content table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Callout Box Widgets */
.gp-callout {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: var(--border-radius-md);
    border-left: 4px solid #fff;
    background-color: var(--bg-tertiary);
}

.gp-callout-info {
    border-left-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}

.gp-callout-warning {
    border-left-color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.05);
}

.gp-callout-important {
    border-left-color: var(--accent-color);
    background-color: rgba(255, 56, 56, 0.05);
}

.gp-callout-title {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.gp-callout-title i {
    margin-right: 8px;
}

/* Premium PDF / File Downloader Card */
.gp-download-card {
    background-color: var(--bg-tertiary);
    border: 1px dashed var(--accent-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin: 25px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.gp-download-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gp-download-icon {
    font-size: 32px;
    color: var(--accent-color);
}

.gp-download-filename {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 3px;
}

.gp-download-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.gp-download-button {
    background-color: var(--accent-color);
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.3);
}

.gp-download-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 138, 0, 0.4);
}

@media (max-width: 600px) {
    .gp-download-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .gp-download-button {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   7. Related Posts Grid
   ========================================================================== */
.gp-related-posts-section {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 40px;
}

.gp-related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Related card structure */
.gp-related-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gp-related-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 138, 0, 0.25);
    box-shadow: var(--card-hover-shadow);
}

.gp-related-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.gp-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gp-related-card:hover .gp-related-thumb img {
    transform: scale(1.05);
}

.gp-related-body {
    padding: 12px;
}

.gp-related-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
}

.gp-related-title a {
    color: var(--text-primary);
}

.gp-related-title a:hover {
    color: var(--accent-color);
}

.gp-related-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* ==========================================================================
   8. Footer Override
   ========================================================================== */
.site-footer {
    background-color: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted) !important;
    padding: 40px 0 !important;
}

.site-footer a {
    color: var(--text-secondary);
}

.site-footer a:hover {
    color: var(--accent-color);
}

.footer-widgets {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px !important;
    margin-bottom: 30px !important;
}

.footer-widgets .widget-title {
    color: var(--text-primary) !important;
    font-size: 14px !important;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 20px !important;
}

.site-info {
    font-size: 13px;
    text-align: center;
    background-color: transparent !important;
    color: var(--text-muted) !important;
    padding: 0 !important;
}

/* ==========================================================================
   9. Miscellaneous / Pagination & WP Defaults
   ========================================================================== */
/* Pagination styling */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.nav-links .page-numbers {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-links .page-numbers:hover,
.nav-links .page-numbers.current {
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
    border-color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(255, 138, 0, 0.2);
}

/* Back to Top button */
.generate-back-to-top {
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    width: 45px;
    height: 45px;
    line-height: 45px;
    box-shadow: 0 4px 15px rgba(255, 138, 0, 0.3);
}

.generate-back-to-top:hover {
    background-color: var(--accent-hover) !important;
    transform: translateY(-3px);
}
