/**
 * GIAN MARIO RAVASI - Stili Globali Sito Arti Marziali
 * Palette: Terra, Calma, Equilibrio
 */

:root {
    --primary-color: #ab9e95;      /* Beige/Tortora - Terra, stabilità */
    --primary-dark: #8b7e75;       /* Tortora scuro */
    --primary-light: #cbc4bd;      /* Tortora chiaro */
    --secondary-color: #efece5;    /* Crema - Purezza, calma */
    --background-light: #fbfbfb;   /* Bianco sporco */
    --text-dark: #3a3330;          /* Marrone scuro per testo */
    --text-medium: #666;
    --text-light: #999;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--background-light);
}

/* Header & Navbar */
.navbar {
    box-shadow: 0 2px 10px rgba(171, 158, 149, 0.1);
    background-color: var(--secondary-color) !important;
}

.navbar-brand {
    margin-right: 0;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.navbar-brand img {
    max-height: 50px;
}

.navbar-collapse {
    justify-content: flex-end;
}

.navbar-nav {
    margin-right: 0 !important;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    background-color: var(--secondary-color);
    border: 1px solid var(--primary-light);
}

.dropdown-item {
    color: var(--text-dark);
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--text-dark);
}

/* Hero Section - Homepage */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--background-light) 100%);
    padding: 80px 0;
    margin-bottom: 60px;
}

.hero img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(171, 158, 149, 0.2);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero .lead {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.hero .motto {
    font-size: 1rem;
    font-style: italic;
    color: var(--text-medium);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--primary-light);
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(171, 158, 149, 0.3);
}

/* Trust Bar */
.trust-bar {
    background-color: white;
    padding: 40px 0;
    margin-bottom: 60px;
    border-top: 1px solid var(--secondary-color);
    border-bottom: 1px solid var(--secondary-color);
}

.trust-item {
    text-align: center;
}

.trust-item .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.trust-item .label {
    font-size: 1rem;
    color: var(--text-medium);
}

/* Disciplines Section */
.disciplines {
    margin-bottom: 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--text-medium);
}

.discipline-card {
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 40px 30px;
    height: 100%;
    transition: all 0.3s;
}

.discipline-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(171, 158, 149, 0.15);
}

.discipline-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.discipline-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.discipline-card .tagline {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.discipline-card p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.discipline-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.discipline-card ul li {
    padding: 8px 0;
    color: var(--text-medium);
}

.discipline-card ul li:before {
    content: "✓ ";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 8px;
}

.btn-discipline {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-discipline:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateX(5px);
}

/* Latest Articles - Homepage */
.latest-articles {
    background-color: var(--secondary-color);
    padding: 80px 0;
    margin-bottom: 80px;
}

.article-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.read-more:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
    display: inline-block;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 12px 40px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Philosophy Section */
.philosophy {
    padding: 80px 0;
    margin-bottom: 80px;
}

.philosophy h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.philosophy-quote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-medium);
    line-height: 1.8;
    padding: 30px;
    border-left: 4px solid var(--primary-color);
    background-color: var(--secondary-color);
    border-radius: 8px;
    margin: 0 0 1.5rem 0;
}

.philosophy .signature {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* CTA Final */
.cta-final {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-final h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-final p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-cta-white {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    margin: 20px 0;
}

.btn-cta-white:hover {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ========================================
   ARTICLES PAGE (articles.php)
   ======================================== */

.articles-hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, white 100%);
    padding: 4rem 2rem 3rem;
    text-align: center;
    margin-bottom: 3rem;
}

.articles-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.articles-hero .description {
    font-size: 1.2rem;
    color: var(--text-medium);
    max-width: 700px;
    margin: 0 auto;
}

.articles-section {
    background: var(--background-light);
    padding: 0 0 5rem;
}

.article-card {
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.article-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(171, 158, 149, 0.15);
}

.article-card .badge-private {
    background: rgba(171, 158, 149, 0.2);
    color: var(--primary-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.article-card .badge-draft {
    background: rgba(255, 193, 7, 0.2);
    color: #cc9a06;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    display: inline-block;
    margin-left: 0.5rem;
}

.article-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.article-card h2 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card h2 a:hover {
    color: var(--primary-color);
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-meta .badge {
    background: rgba(171, 158, 149, 0.15);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    margin-right: 0.5rem;
    font-weight: 500;
    border-radius: 4px;
}

.article-excerpt {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.btn-read-more {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
}

.btn-read-more:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateX(5px);
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.per-page-selector label {
    color: var(--text-medium);
    margin: 0;
    font-size: 0.9rem;
}

.per-page-selector select {
    background: white;
    border: 2px solid var(--secondary-color);
    color: var(--text-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination .page-item a,
.pagination .page-item span {
    background: white;
    border: 2px solid var(--secondary-color);
    color: var(--text-dark);
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-item.active a {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item a:hover:not(.active) {
    background: var(--secondary-color);
    border-color: var(--primary-color);
}

.pagination .page-item.disabled a,
.pagination .page-item.disabled span {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.9rem;
}

.sidebar-card {
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.sidebar-card h5 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.sidebar-text {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 0.8rem;
}

.category-list a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.6rem 1rem;
    display: block;
    background: var(--background-light);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.category-list a:hover,
.category-list a.active {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.no-articles {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
}

.no-articles i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* ========================================
   POST PAGE (post.php)
   ======================================== */

.post-hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, white 100%);
    padding: 3rem 2rem 2rem;
    margin-bottom: 3rem;
}

.post-hero .badge-private {
    background: rgba(171, 158, 149, 0.2);
    color: var(--primary-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.post-hero .badge-draft {
    background: rgba(255, 193, 7, 0.2);
    color: #cc9a06;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
    margin-left: 0.5rem;
}

.post-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-meta {
    color: var(--text-light);
    font-size: 1rem;
}

.post-meta .badge {
    background: rgba(171, 158, 149, 0.15);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    margin-right: 1rem;
    font-weight: 500;
    border-radius: 4px;
}

.post-meta .updated-meta {
    margin-left: 1rem;
}

.breadcrumb-nav {
    margin-top: 1.5rem;
}

.breadcrumb-nav a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    color: var(--primary-dark);
}

.breadcrumb-nav span {
    color: var(--text-light);
    margin: 0 0.5rem;
}

.breadcrumb-nav .current {
    color: var(--text-medium);
}

.post-section {
    background: var(--background-light);
    padding: 0 0 5rem;
}

.post-content-card {
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.post-featured-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    color: var(--text-dark);
    font-size: 1.15rem;
    line-height: 1.9;
}

.post-content h2 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.post-content h3 {
    color: var(--text-dark);
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.post-content strong {
    color: var(--text-dark);
    font-weight: 700;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--primary-dark);
}

.post-content blockquote {
    background: var(--secondary-color);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-medium);
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.8rem;
}

.admin-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--secondary-color);
}

.related-list {
    list-style: none;
    padding: 0;
}

.related-list li {
    margin-bottom: 1rem;
}

.related-list a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 1rem;
    display: block;
    background: var(--background-light);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.related-list a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.related-list .title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.related-list .date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.related-list .lock-icon {
    color: var(--primary-color);
    margin-right: 0.3rem;
}

.related-list .draft-icon {
    color: #cc9a06;
    margin-right: 0.3rem;
}

/* Access Denied Page */
.access-denied {
    background: var(--background-light);
    padding: 6rem 2rem;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.access-denied i {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    opacity: 0.5;
}

.access-denied h2 {
    color: var(--text-dark);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.access-denied p {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.access-denied .small-text {
    font-size: 1rem;
    opacity: 0.7;
}

/* Footer */
#footeralto {
    background-color: var(--text-dark);
    color: var(--text-light);
    padding: 40px 0 20px;
}

#footeralto h5 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

#footeralto ul {
    list-style: none;
    padding: 0;
}

#footeralto ul li {
    margin-bottom: 0.5rem;
}

#footeralto a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s;
}

#footeralto a:hover {
    color: var(--secondary-color);
}

#footerbasso {
    background-color: #2a2320;
    color: var(--text-light);
    padding: 20px 0;
}

#footerbasso a {
    color: var(--primary-light);
    text-decoration: none;
}

#footerbasso a:hover {
    color: var(--secondary-color);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    left: 50%;
    transform: translateX(-50%);
    bottom: 15px;
    z-index: 996;
    background: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50px;
    transition: all 0.4s;
}

.back-to-top i {
    font-size: 28px;
    color: #fff;
    line-height: 0;
}

.back-to-top:hover {
    background: var(--primary-dark);
    color: #fff;
}

.back-to-top.active {
    visibility: visible;
    opacity: 1;
}

/* Responsive */
@media (max-width: 991px) {
    .articles-hero h1,
    .post-hero h1 {
        font-size: 2.2rem;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-content-card {
        padding: 2rem 1.5rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
        margin-top: 2rem;
    }
    
    .hero .lead {
        font-size: 1.1rem;
    }
    
    .hero .row {
        flex-direction: column-reverse;
    }
    
    .brand-text {
        font-size: 1.2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .philosophy-quote {
        font-size: 1.1rem;
    }
}
