/* Base Theme Styles - Minimal and Clean */

:root {
    /* ==========================================
       SPACING SYSTEM - UNIFORM ACROSS ALL PAGES
       ========================================== */
    
    /* Section spacing - gap between major sections/boxes */
    --section-gap: 3rem;             /* 48px - Desktop spacing between sections */
    --section-gap-mobile: 2.25rem;   /* 36px - Mobile spacing between sections */
    
    /* Page wrapper padding - top/bottom of page wrappers */
    --page-padding-desktop: 0 0 1.5rem 0;  /* 0px top, 24px bottom - Desktop page padding (no top spacing) */
    --page-padding-mobile: 0 0 1rem 0; /* 0px top, 16px bottom - Mobile page padding (no top spacing) */
    
    /* Footer spacing - distance from last content to footer */
    --footer-gap: 3rem;           /* 48px - Desktop spacing before footer */
    --footer-gap-mobile: 2.25rem; /* 36px - Mobile spacing before footer */
    
    /* Box sizing - uniform across all pages */
    --box-max-width: 1400px;
    --box-padding-desktop: 2.5rem;
    --box-padding-mobile: 1.5rem 1rem;
    --box-border-radius: 24px;
    --box-border-radius-mobile: 16px;
    --card-border-radius: 12px;
    --card-border-radius-mobile: 10px;
    --button-border-radius: 12px;
    
    /* Wrapper horizontal padding */
    --wrapper-padding-desktop: 0 2rem;
    --wrapper-padding-mobile: 0 1rem;
    
    /* Header/Title spacing within boxes */
    --title-margin-bottom: 2rem;     /* Space below section titles */
    --title-margin-bottom-mobile: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================
   ACCESSIBILITY - FOCUS STATES
   ========================================== */
/* Visible focus for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove default focus outline (we use focus-visible instead) */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
    outline: none;
}

body {
    font-family: 
        -apple-system,       /* Font per i dispositivi Apple (iPhone, iPad, macOS) */
        BlinkMacSystemFont,  /* Supporto per Safari su macOS */
        "SF Pro Text",       /* Specifico per macOS */
        "SF Pro Display",    /* Specifico per macOS */
        "Segoe UI",          /* Font per Windows */
        Roboto,              /* Font per Android */
        Ubuntu,              /* Font per Linux */
        "Helvetica Neue",    /* Fallback per Helvetica */
        Arial,               /* Fallback generico */
        system-ui,           /* Font di sistema per altri dispositivi */
        sans-serif;          /* Fallback finale */
    line-height: 1.6;
    color: #ffffff;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 50%, #1c1c1e 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

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

.site-main {
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* ==========================================
   GLOBAL BOX TITLE STYLE
   ========================================== */
.box-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

@media (max-width: 1024px) {
    .box-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .box-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Entry Content */
.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    font-size: 2.5rem;
}

.entry-content {
    font-size: 1.125rem;
}

/* No Content Message */
.no-content {
    text-align: center;
    padding: 4rem 2rem;
}

.no-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ==========================================
   HEADER STYLES
   ========================================== */

.site-header {
    position: relative;
    width: 100%;
    min-height: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.header-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-brand-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    min-height: auto;
    padding: 0;
    margin: 0;
}

.header-brand-link {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.header-brand-link:hover {
    opacity: 0.8;
}

.header-brand-link:active {
    opacity: 0.9;
}

.header-brand-image {
    max-width: 800px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    /* Dark shadow for depth and contrast */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) 
            drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3))
            drop-shadow(0 8px 24px rgba(0, 0, 0, 0.2));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.header-brand-image:hover {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)) 
            drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35))
            drop-shadow(0 12px 32px rgba(0, 0, 0, 0.25));
    transform: scale(1.02);
    display: block;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        min-height: auto;
        padding: 0;
    }
    
    .header-container {
        padding: 0 0.25rem;
        max-width: 100%;
    }
    
    .header-brand-container {
        min-height: auto;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .header-brand-image {
        max-width: 100%;
        width: auto;
        max-height: 130px;
        height: auto;
        display: block;
        margin: 0 auto;
        object-fit: contain;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) 
                drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
    }
}

/* ==========================================
   GLOBAL PAGE WRAPPER - FOOTER SPACING
   Uniforme su tutte le pagine
   ========================================== */

/* Apply uniform footer spacing to all page wrappers */
.homepage-wrapper,
.brand-page-wrapper,
.brands-page-wrapper,
.legal-page-wrapper,
.xrated-lab-page-wrapper,
.xrated-lab-single-article-wrapper,
.article-page-wrapper,
.prompt-generator-page-wrapper {
    padding-bottom: var(--footer-gap) !important;
}

/* Remove margin-bottom from last child of containers to avoid double spacing */
.homepage-container > *:last-child,
.brand-page-container > *:last-child,
.brands-page-container > *:last-child,
.legal-page-container > *:last-child,
.xrated-lab-page-container > *:last-child,
.xrated-lab-single-article-container > *:last-child,
.article-page-container > *:last-child,
.prompt-generator-page-container > *:last-child {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .homepage-wrapper,
    .brand-page-wrapper,
    .brands-page-wrapper,
    .legal-page-wrapper,
    .xrated-lab-page-wrapper,
    .xrated-lab-single-article-wrapper,
    .article-page-wrapper,
    .prompt-generator-page-wrapper {
        padding-bottom: var(--footer-gap-mobile) !important;
    }
}
