/*
Theme Name: WebSardinia Child Starter
Theme URI: https://websardinia.it
Author: WebSardinia
Author URI: https://websardinia.it
Description: Starter Kit per nuovi progetti basati su WebSardinia Performance Theme.
Template: websardinia-theme-v4
Version: 1.1.8
Text Domain: websardinia-child
*/

/* ==========================================================================
   CSS OVERRIDES (NUCLEAR OPTION)
   ========================================================================== */

/* --------------------------------------------------------------------------
   DESKTOP NAVIGATION
   -------------------------------------------------------------------------- */
.glass-header .nav-menu {
    display: flex !important;
    align-items: center !important;
    gap: 45px !important;
    /* Further increased spacing */
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.glass-header .nav-menu li a {
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 1.1rem !important;
    text-decoration: none !important;
}

/* Bottone CTA Desktop - Extra Spacing */
.glass-header .nav-menu li.nav-btn {
    margin-left: 20px !important;
    /* Extra separation from other items */
}

/* Bottone CTA Desktop Style */
/* Reset Parent Theme styles on the LI container */
.glass-header .nav-menu li.nav-btn {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-left: 20px !important;
}

/* Apply Brand Styles to the Link inside */
.glass-header .nav-menu li.nav-btn a {
    background-color: var(--sand-gold) !important;
    color: #0b1121 !important;
    padding: 6px 18px !important;
    /* Reduced padding */
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    /* Slightly smaller text */
    text-transform: uppercase !important;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4) !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
}

.glass-header .nav-menu li.nav-btn a:hover {
    background-color: #f59e0b !important;
    /* Darker Gold on Hover */
    color: #ffffff !important;
    /* White Text on Hover */
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6) !important;
}

/* Bandierine Desktop */
.glass-header .pll-parent-menu-item a {
    display: flex !important;
    align-items: center !important;
}

.glass-header .pll-parent-menu-item img {
    width: 24px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}


/* --------------------------------------------------------------------------
   MOBILE SIDEBAR (IL NOSTRO TARGET)
   -------------------------------------------------------------------------- */
body .mobile-sidebar {
    text-align: center !important;
}

/* 1. Lista Menu Mobile */
body .mobile-sidebar .mobile-nav-menu,
body .mobile-sidebar .mobile-nav-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    width: 100% !important;
}

/* 2. Link Mobile (Home, Chi Siamo...) */
body .mobile-sidebar .mobile-nav-menu li {
    width: 100% !important;
    text-align: center !important;
    /* Questo è il segreto per il testo */
    display: block !important;
    /* Niente flex qui, usiamo block standard */
    margin: 0 !important;
}

body .mobile-sidebar .mobile-nav-menu li a {
    color: #ffffff !important;
    font-size: 1.4rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-block !important;
    /* Si centra col text-align del genitore */
    width: auto !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-bottom: 10px !important;
}

/* Rimuovi bordo dall'ultimo elemento */
body .mobile-sidebar .mobile-nav-menu li:last-child a {
    border-bottom: none !important;
}

/* 3. Bottone CTA Mobile (Book Now) */
body .mobile-sidebar .mobile-nav-menu li.nav-btn {
    margin-top: 30px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    /* ECCOLO IL COLPEVOLE! Via l'ombra dal contenitore */
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    padding: 0 !important;
    outline: none !important;
}

body .mobile-sidebar .mobile-nav-menu li.nav-btn a {
    background-color: var(--sand-gold) !important;
    color: #0b1121 !important;
    padding: 15px 50px !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    border: none !important;
    /* SICURO al 100% */
    outline: none !important;
    /* Via il bordo blu di selezione */
    font-weight: 700 !important;
    display: inline-block !important;
    width: auto !important;
}


/* 4. Bandierine Mobile */
body .mobile-sidebar .pll-parent-menu-item {
    order: -1 !important;
    /* Sposta le bandiere IN CIMA se vuoi, o togli per lasciare sotto */
    margin-bottom: 20px !important;
}


/* --------------------------------------------------------------------------
   FOOTER MENU FIXES (NUCLEAR OPTION)
   -------------------------------------------------------------------------- */
body .site-footer .footer-links,
body .site-footer .footer-links ul {
    display: flex !important;
    justify-content: center !important;
    gap: 30px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 30px 0 !important;
    flex-wrap: wrap !important;
}

body .site-footer .footer-links li {
    padding: 0 !important;
    margin: 0 !important;
}

body .site-footer .footer-links li a {
    color: #cbd5e1 !important;
    /* text-secondary del tema */
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
}

body .site-footer .footer-links li a:hover {
    color: var(--sand-gold) !important;
}

/* ==========================================================================
   THE BLOG (ARCHIVE & SINGLE)
   ========================================================================== */

/* --- Blog Archive (home.php) --- */
.blog-hero {
    padding: 8rem 2rem 4rem;
    text-align: center;
    background: radial-gradient(circle at top, #1e293b, #0b1121);
    margin-top: 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .blog-grid {
        padding: 1rem;
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }

    .post-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

.post-card {
    background: rgba(18, 30, 60, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(251, 191, 36, 0.3);
}

.post-thumbnail {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.post-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--sand-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #fff;
}

.post-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.post-title a:hover {
    color: var(--sand-gold);
}

.post-excerpt {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.read-more-btn {
    align-self: flex-start;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--sand-gold);
    padding-bottom: 2px;
    transition: all 0.3s;
}

.read-more-btn:hover {
    color: var(--sand-gold);
    padding-bottom: 5px;
}

/* --- Single Article (single.php) --- */
.article-hero {
    height: 70vh;
    min-height: 500px;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, #0b1121 0%, rgba(11, 17, 33, 0.4) 100%);
}

.article-header-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.article-meta {
    display: inline-block;
    background: rgba(251, 191, 36, 0.1);
    color: var(--sand-gold);
    backdrop-filter: blur(4px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

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

.article-container {
    max-width: 900px;
    margin: -3rem auto 0;
    position: relative;
    z-index: 10;
    padding: 0 2rem;
}

.article-glass-box {
    background: rgba(18, 30, 60, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem 4rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    margin-bottom: 4rem;
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e2e8f0;
}

/* WP Editor Elements Support */
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5 {
    color: #fff;
    margin: 2.5rem 0 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 2rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

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

/* Lists */
.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: #e2e8f0;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Images & Figures */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-content figure {
    margin: 2rem 0;
}

/* Quando l'immagine è dentro un figure, rimuovi il margin extra dall'img */
.article-content figure img {
    margin: 0;
}

/* Links nel testo */
.article-content a {
    color: var(--sand-gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.article-content a:hover {
    color: #fff;
}

.article-content blockquote {
    border-left: 4px solid var(--sand-gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.25rem;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link-post {
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-link-post strong {
    display: block;
    color: #fff;
    font-size: 1.1rem;
    margin-top: 0.3rem;
}

.nav-link-post:hover {
    color: var(--sand-gold);
}

/* Social & Contact */
.article-contact-box {
    margin-top: 4rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(12, 74, 110, 0.4));
    border: 1px solid var(--sand-gold);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-buttons a {
    transition: transform 0.2s;
}

.contact-buttons a:hover {
    transform: scale(1.05);
}

/* Mobile Adjustments for Article */
@media (max-width: 768px) {
    .article-glass-box {
        padding: 2rem 1.5rem;
    }

    .article-hero {
        height: 50vh;
    }

    .post-navigation {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav-link-post {
        display: block;
        width: 100%;
        text-align: center !important;
        background: rgba(255, 255, 255, 0.05);
        padding: 1rem;
        border-radius: 10px;
    }
}

/* ==========================================================================
   CORPORATE FOOTER
   ========================================================================== */
.site-footer {
    background: #0b1121 !important;
    color: #e2e8f0 !important;
    padding: 4rem 0 2rem !important;
    border-top: 2px solid var(--sand-gold) !important;
}

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

.footer-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 3rem !important;
    margin-bottom: 3rem !important;
}

.footer-col h3 {
    color: #fff !important;
    font-size: 1.2rem !important;
    margin-bottom: 1.5rem !important;
    font-weight: 600 !important;
}

.footer-info p {
    margin-bottom: 1rem !important;
    line-height: 1.6 !important;
}

.footer-info strong {
    color: #fff !important;
}

.footer-menu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-menu li {
    margin-bottom: 0.8rem !important;
}

.footer-menu a {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    transition: color 0.3s !important;
}

.footer-menu a:hover {
    color: var(--sand-gold) !important;
    padding-left: 5px !important;
}

.footer-contact {
    text-align: center !important;
}

.footer-contact li {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-bottom: 1rem !important;
}

.footer-contact svg {
    color: var(--sand-gold) !important;
    flex-shrink: 0 !important;
    margin-top: 4px !important;
}

.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding-top: 2rem !important;
    text-align: center !important;
    font-size: 0.9rem !important;
    color: #cbd5e1 !important;
}

.footer-legal a {
    color: #e2e8f0 !important;
    text-decoration: none !important;
    margin: 0 10px !important;
    transition: color 0.3s !important;
}

.footer-legal a:hover {
    color: var(--sand-gold) !important;
}

.designer-link {
    color: var(--sand-gold) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

/* FORCE DESIGNER LINK COLOR */
.designer-link,
.designer-link:visited,
.designer-link:active,
.designer-link:hover {
    color: var(--sand-gold) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}