/*
Theme Name: Orionnews
Theme URI: https://orionnews.com
Author: Antigravity
Author URI: https://google.com
Description: A high-performance, SEO-friendly WordPress news theme optimized for speed and accessibility.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: orionnews
Tags: news, magazine, responsive, seo-friendly, fast
*/

/* 
 * This theme uses Tailwind CSS. 
 * Ensure to include the CDN or build process in functions.php 
 */

/* CLS & Layout Stability Management */
.ad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    /* gray-50 fallback */
    min-height: 100px;
    /* Minimum perceived height for ads */
    overflow: hidden;
}

.ad-header-wrapper {
    min-height: 90px;
    /* Standard leadboard height */
    width: 100%;
}

.ad-home-mid-wrapper {
    min-height: 250px;
    /* Standard rectangle height */
    width: 100%;
}

.ad-sidebar-wrapper {
    min-height: 250px;
}

/* Ensure font swap doesn't cause jumpy text */
body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Content Tables Optimization */
.article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    border: 1px solid #e5e7eb;
    /* gray-200 */
    border-radius: 0.75rem;
    overflow: hidden;
    font-size: 0.95rem;
}

.article-content th,
.article-content td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.article-content th {
    background-color: #f9fafb;
    /* gray-50 */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #111827;
    /* gray-900 */
    font-size: 0.8rem;
}

.article-content tr:last-child td {
    border-bottom: 0;
}

.article-content tr:nth-child(even) {
    background-color: #fcfcfd;
}

.article-content tr:hover {
    background-color: #f3f4f6;
    /* gray-100 */
    transition: background-color 0.2s ease;
}

/* Dark Mode support */
.dark .article-content table {
    border-color: #374151;
    /* gray-700 */
}

.dark .article-content th {
    background-color: #1f2937;
    /* gray-800 */
    color: #f9fafb;
}

.dark .article-content td {
    border-color: #374151;
}

.dark .article-content tr:nth-child(even) {
    background-color: #1a202c;
}

.dark .article-content tr:hover {
    background-color: #2d3748;
}

/* Fix for mobile responsiveness */
.article-content .table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
}

.article-content .table-wrapper table {
    margin: 0;
    min-width: 600px;
    /* Force scroll on small screens */
}

/* Content Images Optimization */
.article-content img {
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    margin: 2.5rem 0;
    max-width: 100%;
    height: auto;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.article-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
}

/* Handle WordPress Alignment Classes */
.article-content .aligncenter,
.article-content img.aligncenter,
.article-content .size-full,
.article-content img.size-full {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.article-content .alignleft,
.article-content img.alignleft {
    float: left;
    margin: 0.5rem 2rem 1.5rem 0;
}

.article-content .alignright,
.article-content img.alignright {
    float: right;
    margin: 0.5rem 0 1.5rem 2rem;
}

.article-content figure {
    margin: 2.5rem 0;
}

.article-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    /* gray-500 */
    margin-top: 0.75rem;
    font-weight: 600;
    font-style: italic;
}

.article-content figure img {
    margin: 0;
}

/* Premium Finance Card Styles (from card.html) */
.card-premium-container {
    --purple-primary: #8A05BE;
    --purple-dark: #6B0496;
    --purple-light: #A855F7;
    --orange-cta: #FF6B2C;
    --orange-hover: #FF8554;
    --gray-100: #F8F8F9;
    --gray-200: #E8E8EB;
    --gray-400: #A3A3AA;
    --gray-700: #4A4A52;
    --gray-900: #1F1F23;
    --white: #FFFFFF;

    background: var(--white);
    border-radius: 24px;
    padding: 48px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.03),
        0 20px 40px -10px rgba(138, 5, 190, 0.08),
        0 0 0 1px rgba(138, 5, 190, 0.04);
    position: relative;
    overflow: hidden;
    animation: orionSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'DM Sans', sans-serif !important;
}

.card-premium-container::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(138, 5, 190, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes orionSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-premium-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.card-premium-image {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 10px 25px -5px rgba(138, 5, 190, 0.15),
        0 0 0 1px rgba(138, 5, 190, 0.05);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    flex-shrink: 0;
}

.card-premium-image:hover {
    transform: scale(1.05) rotate(-2deg);
}

.card-premium-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
}

.card-premium-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-premium-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.premium-bank-name {
    font-family: 'Archivo', sans-serif !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    color: var(--gray-900) !important;
    letter-spacing: -0.5px !important;
    margin: 0 !important;
    border: none !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.premium-rating-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    padding: 8px 14px;
    border-radius: 12px;
    animation: orionFadeIn 0.6s 0.2s both;
}

@keyframes orionFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.premium-stars {
    display: flex;
    gap: 4px;
}

.premium-star {
    color: #F59E0B;
    font-size: 18px !important;
    transition: transform 0.2s;
    line-height: 1 !important;
}

.premium-rating-score {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 15px;
}

.card-premium-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    animation: orionFadeIn 0.6s 0.3s both;
}

.premium-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.premium-badge:hover {
    background: var(--purple-primary);
    color: var(--white);
    border-color: var(--purple-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(138, 5, 190, 0.2);
}

.card-premium-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    animation: orionFadeIn 0.6s 0.4s both;
}

.premium-cta-button {
    background: linear-gradient(135deg, var(--orange-cta) 0%, #FF5722 100%);
    color: var(--white) !important;
    padding: 16px 32px !important;
    border: none !important;
    border-radius: 14px !important;
    font-family: 'Archivo', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer;
    box-shadow:
        0 10px 25px -5px rgba(255, 107, 44, 0.35),
        0 0 0 1px rgba(255, 107, 44, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    display: inline-block;
}

.premium-cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.premium-cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.premium-cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 35px -5px rgba(255, 107, 44, 0.45),
        0 0 0 1px rgba(255, 107, 44, 0.2);
}

.premium-cta-note {
    font-size: 12px;
    color: var(--gray-400);
    text-align: right;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 500;
}

@media (max-width: 768px) {
    .card-premium-container {
        padding: 32px 24px;
    }

    .card-premium-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .card-premium-image {
        margin: 0 auto;
    }

    .card-premium-info {
        text-align: center;
    }

    .card-premium-header {
        flex-direction: column;
        gap: 12px;
    }

    .card-premium-cta {
        align-items: center;
        width: 100%;
    }

    .premium-cta-button {
        width: 100%;
        text-align: center;
    }

    .premium-cta-note {
        text-align: center;
    }
}

/* Pros & Cons icons alignment */
.orion-pros-cons ul li span {
    font-size: 1.2rem;
    font-variation-settings: 'wght' 700;
}

/* Category/Archive Page Refinements */
.archive-title-underline {
    position: relative;
    display: inline-block;
}

.archive-title-underline::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 80px;
    height: 6px;
    background-color: var(--color-primary, #135bec);
    border-radius: 3px;
}

.shadow-refined {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 12px -2px rgba(0, 0, 0, 0.03);
}

.shadow-card-hover:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Highlight box custom border */
.orion-highlight {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}