/*
Theme Name: Etheria Theme (o Perkysex V1)
Theme URI: http://iltuosito.com
Description: Tema custom basato su BlankSlate, modificato per gestire layout editoriali unici.
Version: 1.0
Author: Il Tuo Nome
Author URI: http://instagram.com/iltuoprofilo
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom, editorial, blankslate-fork
*/
:root {
    --primary-color: #0f1b34;
    --brand-red: #aa3a3a;
    --accent-color: #ffffff;
    --text-color: #ffffff;
    --font-heading: 'Anton', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --transition-speed: 0.4s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1px;
}

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

a:hover {
    color: var(--brand-red);
}

/* Header Styles */
#header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.5rem 1rem;
    /* Reduced top/bottom padding */
    background: transparent;
}

/* Header on Articles Page */
.page-template-page-articles #header {
    background: rgba(15, 27, 52, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

#site-title a {
    display: block;
    width: 150px;
    height: 50px;
    /* Fixed height to crop top/bottom */
    overflow: hidden;
}

#logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1.6) translateX(-10px);
    /* Zoom in and shift left to crop */
}

/* Page Transition Overlay */
#page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--primary-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    /* Start visible */
    pointer-events: all;
    transition: opacity 0.5s ease-in-out;
}

#page-transition.hidden {
    opacity: 0;
    pointer-events: none;
}

.transition-logo {
    width: 300px;
    /* Increased size */
    animation: pulse 2s infinite;
}

.transition-logo img {
    width: 100%;
    height: auto;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.desktop-nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
    background: transparent;
    border: none;
    text-transform: uppercase;
}

.nav-btn:hover {
    color: var(--brand-red);
    text-decoration: none;
    transform: translateY(-2px) scale(1.1);
    text-shadow: 0 0 15px rgba(170, 58, 58, 0.8);
}

/* Mobile Toggle */
#mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

#mobile-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
#mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--primary-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-nav a {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.mobile-nav a:hover {
    color: var(--brand-red);
    -webkit-text-stroke: 1px #fff;
}

#mobile-menu-overlay.active .mobile-nav a {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for mobile links */
#mobile-menu-overlay.active .mobile-nav a:nth-child(1) {
    transition-delay: 0.1s;
}

#mobile-menu-overlay.active .mobile-nav a:nth-child(2) {
    transition-delay: 0.2s;
}

#mobile-menu-overlay.active .mobile-nav a:nth-child(3) {
    transition-delay: 0.3s;
}

#mobile-menu-overlay.active .mobile-nav a:nth-child(4) {
    transition-delay: 0.4s;
}

#mobile-menu-overlay.active .mobile-nav a:nth-child(5) {
    transition-delay: 0.5s;
}

/* Hamburger Animation when active */
body.menu-open #mobile-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

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

body.menu-open #mobile-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Responsive Header */
@media (max-width: 1024px) {
    .desktop-nav {
        display: none;
    }

    #header {
        padding-left: 0;
    }

    #mobile-toggle {
        display: flex;
    }

    #site-title a {
        font-size: 2rem;
        width: 120px;
        /* Crop left/right by reducing width */
    }

    #logo-img {
        transform: scale(1);
        /* Reset scale on mobile */
    }
}

/* =========================================
   SINGLE ARTICLE STYLES (REBUILT)
   ========================================= */

#single-article-wrapper {
    padding-top: 120px;
    /* Space for fixed header */
    padding-bottom: 5rem;
    background-color: var(--primary-color);
    /* Ensure bg is dark */
    color: #fff;
    min-height: 100vh;
}

/* Header */
/* Header (Hero Style) */
.custom-article-header.article-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    /* Mini hero height */
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    /* Vertically center content */
    justify-content: center;
    text-align: center;
    /* Center text */
    margin-bottom: 4rem;
    padding: 0;
    max-width: 100%;
    /* Full width */
    margin-left: 0;
    margin-right: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 27, 52, 0.6);
    /* Darker uniform overlay for contrast */
    z-index: 1;
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    padding: 3rem 1rem;
    margin: 0 auto;
    text-align: center;
    /* Center text block too */
}

.article-hero .meta-info {
    margin-bottom: 1.5rem;
}

.article-hero .cat-link a {
    display: inline-block;
    background: transparent;
    /* Clean transparent bg */
    color: #fff;
    padding: 0.5rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 2px solid #fff;
    /* Visible white border */
    backdrop-filter: blur(5px);
    transition: all var(--transition-speed);
}

.article-hero .cat-link a:hover {
    background: #fff;
    color: var(--primary-color);
    text-decoration: none;
}

.article-hero .date {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {

    .custom-article-header,
    .article-body {
        padding: 0 1.5rem;
        /* Add padding on mobile */
    }

    .custom-article-header .main-title {
        font-size: 2.5rem;
    }

    .visuals-top-grid {
        grid-template-columns: 1fr;
    }

    .visual-box {
        height: 300px;
    }
}

.custom-article-header .meta-info {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #aaa;
    margin-bottom: 1rem;
}

.custom-article-header .meta-info a {
    color: var(--brand-red);
    text-decoration: none;
}

.custom-article-header .main-title {
    font-family: 'Anton', sans-serif;
    font-size: 4rem;
    line-height: 1.1;
    text-transform: uppercase;
    margin: 0;
}

/* Top Visuals Grid */
.visuals-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 3rem;
}

.visual-box {
    width: 100%;
    height: 400px;
    /* Fixed height to ensure visibility */
    overflow: hidden;
    background-color: #000;
    /* Fallback bg */
}

.visual-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Inline Images */
.inline-img-right {
    float: right;
    margin: 0 0 1.5rem 2rem;
    width: 45%;
    max-width: 500px;
    clear: right;
}

.inline-img-left {
    float: left;
    margin: 0 2rem 1.5rem 0;
    width: 45%;
    max-width: 500px;
    clear: left;
}

.inline-img-right img,
.inline-img-left img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Clearfix for article body */
.article-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive Inline Images */
@media (max-width: 768px) {

    .inline-img-right,
    .inline-img-left {
        float: none;
        width: 100%;
        margin: 2rem 0;
        max-width: 100%;
    }
}

/* Article Body */
.article-body {
    max-width: 800px;
    margin: 0 auto 4rem auto;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2,
.article-body h3 {
    font-family: 'Anton', sans-serif;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

/* Bottom Visual */
.visual-bottom-full {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    height: auto;
    min-height: 200px;
}

.visual-bottom-full img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {

    .custom-article-header,
    .article-body {
        padding: 0 1.5rem;
    }

    .custom-article-header .main-title {
        font-size: 2.5rem;
    }

    .visuals-top-grid {
        grid-template-columns: 1fr;
    }

    .visual-box {
        height: 300px;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 27, 52, 0.7);
    /* Primary color with opacity */
}

.hero-content {
    text-align: center;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
    padding-top: 15vh;
}

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-title {
    font-size: 8rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.outline-text {
    -webkit-text-stroke: 2px var(--brand-red);
    color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 3rem;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    border: 2px solid #fff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    transition: all var(--transition-speed);
}

.cta-button:hover {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
}

/* Content Sections */
.content-section {
    padding: 6rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 4rem;
    margin-bottom: 4rem;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.highlight {
    color: transparent;
    -webkit-text-stroke: 1px var(--brand-red);
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.post-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-speed);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative;
}

.post-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.post-card:hover {
    border-color: var(--brand-red);
}



.post-info {
    padding: 1.5rem;
}

.post-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    position: relative;
    z-index: 2;
}

.post-category a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-category a:hover {
    color: var(--brand-red);
}

.post-title {
    font-size: 1.8rem;
    margin: 0.5rem 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;

    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 4.4rem;
    /* Adjusted for 1.8rem font * 1.2 line-height * 2 lines */
    line-height: 1.2;
    transition: color var(--transition-speed);
}

.post-card:hover .post-title,
.post-card:hover .post-title a {
    color: var(--brand-red);
}

.post-title a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}


.post-excerpt {
    font-size: 0.9rem;
    color: #ccc;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.5rem;
}


/* Categories Section */
#latest-news {
    background-color: #0a1224;
}

.dark-alt {
    background: #0a1224;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.category-item {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Added to center multi-line text */
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 2rem;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all var(--transition-speed);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.category-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.category-item:hover {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Power Ranking Section */
.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.ranking-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: transform var(--transition-speed);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.ranking-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.ranking-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--brand-red);
}

.rank-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.8rem;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #fff;
}

.rank-image {
    width: 100px;
    height: 100px;
    margin: 1rem auto;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

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

.rank-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.rank-change {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rank-change.up {
    color: #00ff88;
    /* Green */
}

.rank-change.down {
    color: var(--brand-red);
    /* Brand Red */
}

.rank-change.same {
    color: #888;
}

.arrow {
    font-size: 0.8rem;
}

/* =========================================
   HUB PAGE STYLES
   ========================================= */

/* Hide standard header/footer on Hub Page to focus entirely on links */
.page-template-page-hub #header,
.page-template-page-hub #footer {
    display: none !important;
}

/* Reset main wrapper styles to allow full-screen layout on Hub Page */
.page-template-page-hub #wrapper,
.page-template-page-hub #container,
.page-template-page-hub #content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
    min-height: 100vh;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#hub-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3rem 1.5rem;
    box-sizing: border-box;
    background: linear-gradient(145deg, #C23636 0%, #A52020 40%, #8B1A1A 100%);
}

/* ---- Animated Wave Blobs ---- */
.hub-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hub-wave {
    position: absolute;
    width: 55%;
    height: 55%;
    opacity: 1;
}

.hub-wave-tl {
    top: -5%;
    left: -5%;
    animation: waveFloat1 12s ease-in-out infinite;
}

.hub-wave-tr {
    top: -5%;
    right: -5%;
    animation: waveFloat2 14s ease-in-out infinite;
}

.hub-wave-bl {
    bottom: -5%;
    left: -5%;
    animation: waveFloat3 13s ease-in-out infinite;
}

.hub-wave-br {
    bottom: -5%;
    right: -5%;
    animation: waveFloat4 11s ease-in-out infinite;
}

@keyframes waveFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, 10px) scale(1.03); }
    66% { transform: translate(-10px, 15px) scale(0.97); }
}

@keyframes waveFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-12px, 8px) scale(1.04); }
    66% { transform: translate(10px, -12px) scale(0.96); }
}

@keyframes waveFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10px, -15px) scale(1.05); }
    66% { transform: translate(-15px, -8px) scale(0.98); }
}

@keyframes waveFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-8px, -10px) scale(1.02); }
    66% { transform: translate(12px, 10px) scale(0.97); }
}

/* ---- Hub Content ---- */
.hub-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    margin: auto 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hub-logo {
    margin-bottom: 0.75rem;
    width: 160px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hub-logo img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15));
}

.hub-logo:hover {
    transform: scale(1.06);
}

.hub-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    color: #ffffff;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 0.25rem;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hub-subtitle::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    margin: 0.85rem auto 0 auto;
    border-radius: 10px;
}

.hub-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hub-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.1rem 1.5rem;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: #fff;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.hub-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    transform: translateX(-100%);
    transition: transform 0.7s ease;
}

.hub-link-card:hover::before {
    transform: translateX(100%);
}

.hub-link-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hub-link-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.hub-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hub-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    transition: all 0.4s ease;
}

.hub-link-card:hover .hub-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.hub-link-card:hover .hub-icon svg {
    stroke: #fff;
    fill: none;
}

/* Specific SVG styling for filled icons */
.hub-icon svg.fill-svg {
    fill: #fff;
    stroke: none;
}
.hub-link-card:hover .hub-icon svg.fill-svg {
    fill: #fff;
    stroke: none;
}

.hub-text {
    text-align: left;
}

.hub-text h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 1.5px;
    margin: 0;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.2;
    font-weight: 700;
}

.hub-text span {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    display: block;
    margin-top: 2px;
    transition: color 0.4s ease;
}

.hub-link-card:hover .hub-text span {
    color: rgba(255, 255, 255, 0.9);
}

.hub-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.4s ease;
}

.hub-arrow svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

.hub-link-card:hover .hub-arrow {
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

/* Responsive Hub */
@media (max-width: 480px) {
    #hub-wrapper {
        padding: 2rem 1rem;
    }

    .hub-logo {
        width: 140px;
    }

    .hub-subtitle {
        font-size: 0.8rem;
        margin-bottom: 2rem;
    }

    .hub-link-card {
        padding: 0.95rem 1.2rem;
        border-radius: 16px;
    }

    .hub-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .hub-icon svg {
        width: 18px;
        height: 18px;
    }

    .hub-text h3 {
        font-size: 1.1rem;
    }

    .hub-text span {
        font-size: 0.75rem;
    }

    .hub-wave {
        width: 65%;
        height: 65%;
    }
}


/* Chi Siamo Page Styles */
/* Chi Siamo Page Styles (Immersive) */
#chi-siamo-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    color: #fff;
    padding-bottom: 5rem;
}

.chi-siamo-main {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.chi-siamo-hero {
    position: relative;
    height: 60vh;
    /* Shorter hero as requested */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.chi-siamo-hero h1 {
    font-size: 8rem;
    line-height: 1;
    letter-spacing: 5px;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Glitch Effect (Simple) */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 90px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(40px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(90px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(20px, 9999px, 70px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(50px, 9999px, 20px, 0);
    }

    40% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    60% {
        clip: rect(90px, 9999px, 10px, 0);
    }

    80% {
        clip: rect(60px, 9999px, 30px, 0);
    }

    100% {
        clip: rect(70px, 9999px, 40px, 0);
    }
}

.chi-siamo-manifesto {
    padding: 4rem 0;
}

.manifesto-block h2 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 4rem;
    text-align: left;
}

.manifesto-text {
    font-size: 1.5rem;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    /* Align right */
    text-align: right;
}

.manifesto-text p {
    margin-bottom: 2rem;
    color: #ddd;
}

.manifesto-text strong {
    color: #fff;
    font-weight: 600;
}

.lead-text {
    font-size: 1.8rem;
    color: #fff !important;
}

.chi-siamo-signature {
    margin-top: 4rem;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 3px;
    color: var(--brand-red);
}

/* Responsive Chi Siamo */
@media (max-width: 768px) {
    .chi-siamo-hero h1 {
        font-size: 4rem;
    }

    .manifesto-block h2 {
        font-size: 2.5rem;
    }

    .manifesto-text {
        font-size: 1.2rem;
        text-align: left;
        /* Reset alignment on mobile */
    }
}

/* Social Section */
/* Limita la griglia social a 4 post su mobile e imposta 2x2 */
@media (max-width: 768px) {
    .social-grid .insta-post:nth-child(n+5) {
        display: none !important;
    }
    .social-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
}
.social-section {
    padding-bottom: 8rem;
}

.insta-feed {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.insta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    /* Minimal Social Grid */
    .social-grid {
        max-width: 1200px;
        margin: 0 auto;
    }

    .insta-posts {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        /* Increased gap for cleaner look */
    }

    .insta-post {
        position: relative;
        aspect-ratio: 1/1;
        overflow: hidden;
        border-radius: 0;
        /* Sharp edges for minimal look */
        display: block;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .insta-post img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .post-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 2;
    }

    .post-overlay .icon {
        color: #fff;
        font-weight: bold;
        font-size: 1.1rem;
    }

    .insta-post:hover .post-overlay {
        opacity: 1;
    }

    .insta-post:hover img {
        transform: scale(1.1);
    }

    /* Responsive Social */
    @media (max-width: 768px) {
        .insta-posts {
            grid-template-columns: repeat(2, 1fr);
        }

        .insta-header {
            display: none;
        }

        .insta-profile {
            display: none;
        }

        /* Reduce section padding on mobile */
        .content-section {
            padding: 4rem 1rem;
        }

        /* Force 2 columns on mobile for Ranking ONLY */
        .ranking-grid {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 0.5rem;
            justify-content: center;
        }

        /* Articles: 1 column, no image */
        .grid-layout {
            grid-template-columns: 1fr !important;
            gap: 1rem;
        }

        /* Limit to 3 articles on mobile */
        #latest-news .grid-layout .post-card:nth-child(n+4) {
            display: none;
        }

        .ranking-card {
            padding: 0.5rem;
        }

        .post-card {
            padding: 1.5rem;
            display: block;
        }

        .post-info {
            padding: 0;
            width: 100%;
        }

        .post-title {
            font-size: 1.2rem;
            margin: 0 0 0.5rem;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            height: 2.9rem;
            /* 1.2rem * 1.2 line-height * 2 lines = ~2.88rem */
            overflow: hidden;
        }

        .post-category {
            font-size: 0.7rem;
            margin-bottom: 0.5rem;
            display: block;
        }

        .post-excerpt {
            font-size: 0.9rem;
            color: #ccc;
            display: -webkit-box;
            -webkit-line-clamp: 5;
            /* Increased from 3 to make it "taller" */
            line-clamp: 5;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-top: 0.5rem;
        }
    }

    /* Social Buttons */
    .social-buttons-container {
        width: 100%;
        /* Ensure full width for centering */
        display: flex;
        justify-content: center;
        align-items: center;
        /* Vertical alignment */
        gap: 2rem;
        margin-top: 6rem;
        /* Increased from 3rem */
        flex-wrap: wrap;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .social-buttons-container.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .social-btn {
        min-width: 250px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    /* =========================================
   ARTICLES PAGE STYLES
   ========================================= */

    .article-hero-section {
        padding: 15vh 0 5rem;
        text-align: center;
    }

    .filter-section {
        padding: 2rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 3rem;
    }

    .filter-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .search-box {
        position: relative;
        width: 100%;
        max-width: 500px;
    }

    .search-box input {
        width: 100%;
        padding: 1rem 3rem 1rem 1.5rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 30px;
        color: #fff;
        font-family: var(--font-body);
        font-size: 1rem;
        outline: none;
        transition: all var(--transition-speed);
    }

    .search-box input:focus {
        border-color: var(--brand-red);
        background: rgba(255, 255, 255, 0.1);
    }

    .search-icon {
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.5;
    }

    .category-filters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .filter-btn {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #fff;
        padding: 0.5rem 1.5rem;
        border-radius: 20px;
        cursor: pointer;
        font-family: var(--font-heading);
        font-size: 0.9rem;
        letter-spacing: 1px;
        transition: all var(--transition-speed);
    }

    .filter-btn:hover,
    .filter-btn.active {
        background: var(--brand-red);
        border-color: var(--brand-red);
    }

    .articles-page-section {
        padding-top: 0;
    }

    .load-more-container {
        text-align: center;
        margin-top: 4rem;
    }

    #articles-loader {
        margin-top: 1rem;
        color: #aaa;
        font-style: italic;
    }

    .social-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(170, 58, 58, 0.3);
    }

    @media (max-width: 768px) {
        .social-buttons-container {
            flex-direction: column;
            align-items: center;
            gap: 1.5rem;
        }

        .social-btn {
            width: 100%;
            max-width: 300px;
        }
    }

    /* =========================================
   SINGLE ARTICLE REDESIGN STYLES
   ========================================= */

    /* Header on Single Post */
    .single #header {
        background: rgba(15, 27, 52, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .article-hero {
        position: relative;
        width: 100%;
        height: 80vh;
        /* Immersive height */
        min-height: 500px;
        background-size: cover;
        background-position: center;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin-bottom: 4rem;
        margin-top: 66px;
        /* 50px header + 16px padding (0.5rem top + 0.5rem bottom approx) */
    }

    .hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        /* Gradient from transparent/dark to primary color for readability */
        background: linear-gradient(to bottom,
                rgba(15, 27, 52, 0.4) 0%,
                rgba(15, 27, 52, 0.8) 60%,
                rgba(15, 27, 52, 1) 100%);
        z-index: 1;
    }

    .hero-content-wrapper {
        position: relative;
        z-index: 2;
        max-width: 900px;
        padding: 0 2rem;
    }

    .article-hero .meta-info {
        margin-bottom: 1.5rem;
        font-family: var(--font-heading);
        letter-spacing: 2px;
        text-transform: uppercase;
        font-size: 0.9rem;
        color: #ccc;
    }

    .article-hero .cat-link a {
        color: var(--brand-red);
        margin-right: 1rem;
        font-weight: bold;
    }

    .article-hero .date {
        opacity: 0.8;
    }

    .article-title {
        font-size: 4rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
        color: #fff;
        text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    }



    /* Content Typography */
    .article-content {
        max-width: 800px;
        margin: 0 auto;
        font-size: 1.2rem;
        line-height: 1.8;
        color: #e0e0e0;
    }

    .article-content p {
        margin-bottom: 2rem;
    }

    .article-content h2,
    .article-content h3 {
        margin-top: 3rem;
        margin-bottom: 1.5rem;
        color: #fff;
    }

    .article-content blockquote {
        border-left: 4px solid var(--brand-red);
        padding-left: 2rem;
        margin: 3rem 0;
        font-size: 1.5rem;
        font-style: italic;
        color: #fff;
    }

    .article-content img {
        max-width: 100%;
        height: auto;
        border-radius: 10px;
        margin: 2rem 0;
    }

    /* Drop Cap for first paragraph */
    .article-content>p:first-of-type::first-letter {
        float: left;
        font-family: var(--font-heading);
        font-size: 5rem;
        line-height: 0.8;
        padding-right: 1rem;
        padding-top: 0.5rem;
        color: var(--brand-red);
    }

    /* Footer / Nav */
    .article-footer {
        max-width: 800px;
        margin: 4rem auto 6rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 2rem;
    }

    .tags-list a {
        display: inline-block;
        background: rgba(255, 255, 255, 0.1);
        padding: 0.3rem 1rem;
        border-radius: 20px;
        font-size: 0.9rem;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        color: #ccc;
    }

    .tags-list a:hover {
        background: var(--brand-red);
        color: #fff;
    }

    .read-next-nav {
        display: flex;
        justify-content: space-between;
        margin-top: 3rem;
    }

    .read-next-nav a {
        font-family: var(--font-heading);
        font-size: 1.2rem;
        text-transform: uppercase;
    }

    @media (max-width: 768px) {
        .article-title {
            font-size: 2.5rem;
        }

        .article-hero {
            height: 60vh;
        }

        .article-content {
            font-size: 1.1rem;
            padding: 0 1rem;
        }
    }

    /* Hub Page Specifics: Hide Header/Footer, No Scroll */
    .page-template-page-hub {
        overflow: hidden;
        /* Disable scroll */
        height: 100vh;
    }

    .page-template-page-hub #header,
    .page-template-page-hub #footer,
    .page-template-page-hub #copyright {
        display: none !important;
    }

    .page-template-page-hub #wrapper {
        padding: 0;
        margin: 0;
        height: 100vh;
    }

    .page-template-page-hub #container {
        height: 100%;
    }

    .page-template-page-hub main {
        height: 100%;
    }

    /* Power Ranking Images */
    .ranking-image {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        overflow: hidden;
        margin-right: 1rem;
        flex-shrink: 0;
        border: 2px solid var(--brand-red);
    }

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

    /* Footer Styles */
    #footer {
        background: #000;
        padding: 4rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: auto;
        /* Push to bottom if content is short */
        position: relative;
        z-index: 10;
    }

    .footer-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem;
    }

    .footer-content {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .footer-column h3 {
        font-family: var(--font-heading);
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
        color: #fff;
        letter-spacing: 1px;
    }

    .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .footer-links li {
        margin-bottom: 0.8rem;
    }

    .footer-links a {
        color: #aaa;
        text-decoration: none;
        font-size: 0.95rem;
        transition: color 0.3s ease;
    }

    .footer-links a:hover {
        color: var(--brand-red);
    }

    .copyright,
    .dev-credit {
        color: #666;
        font-size: 0.85rem;
        display: block;
    }

    .dev-credit {
        margin-top: 0.5rem;
        font-style: italic;
    }

    /* Responsive Footer */
    @media (max-width: 768px) {
        .footer-content {
            grid-template-columns: 1fr;
            text-align: center;
            gap: 3rem;
        }
    }

    /* =========================================
       INSTAGRAM PLUGIN CUSTOMIZATION & FIXES
       ========================================= */

    /* Hide Plugin Header and Follow Button */
    #sb_instagram .sb_instagram_header,
    #sb_instagram .sbi_header,
    #sb_instagram #sbi_load .sbi_follow_btn,
    #sb_instagram .sbi_follow_btn,
    #sb_instagram .sbi_follow_btn a,
    .sbi_follow_btn,
    .sbi_follow_btn a {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        opacity: 0 !important;
    }

    /* Center Social Buttons */
    .social-buttons-container {
        display: flex;
        justify-content: center;
        gap: 2rem;
        width: 100%;
        margin-top: 3rem;
        flex-wrap: wrap;
    }

    /* Fix Footer / Section Clearing */
    .social-section {
        overflow: hidden;
        /* Contains floats/margins */
        width: 100%;
        position: relative;
        clear: both;
    }

    /* Ensure Footer is pushed down */
    #footer {
        clear: both;
        width: 100%;
    }