/*
 * CelticAL v2 - CSS Minimale Responsive Mobile-First
 * Stile pulito senza riferimenti Blogger
 */

/* === VARIABILI CSS === */
:root {
    --verde-celtico: #119922;
    --oro-celtico: #b45f06;
    --oro-chiaro: #f6b26b;
    --testo: #333333;
    --testo-chiaro: #666666;
    --sfondo: #f5f5f5;
    --bianco: #ffffff;
    --bordo: #dddddd;
}

/* === RESET E BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.938rem;
    line-height: 1.6;
    color: var(--testo);
    background: var(--sfondo);
}

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

a {
    color: var(--oro-celtico);
    text-decoration: none;
}

a:hover {
    color: var(--oro-chiaro);
    text-decoration: underline;
}

/* === LAYOUT CONTAINER === */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* === HEADER === */
header {
    background: linear-gradient(135deg, var(--verde-celtico), #0d7019);
    color: var(--bianco);
    padding: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

header p {
    font-size: 1rem;
    opacity: 0.95;
}

header h1 a {
    color: inherit;
    text-decoration: none;
}

header h1 a:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* === NAVIGATION === */
nav {
    background: var(--bianco);
    border-bottom: 2px solid var(--oro-celtico);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hamburger button - mobile only */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--verde-celtico);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger animation when open */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--testo);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

nav a:hover, nav a.active {
    color: var(--verde-celtico);
    border-bottom-color: var(--verde-celtico);
    text-decoration: none;
}

/* Mobile navigation - default hidden */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bianco);
        border-bottom: 2px solid var(--oro-celtico);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        gap: 0;
    }

    nav ul.open {
        max-height: 400px;
    }

    nav ul li {
        border-bottom: 1px solid var(--bordo);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav a {
        padding: 1rem 1.5rem;
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    nav a:hover, nav a.active {
        border-bottom: none;
        border-left-color: var(--verde-celtico);
        background: var(--sfondo);
    }
}

/* Desktop - hide hamburger, show horizontal menu */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    nav ul {
        position: static;
        flex-direction: row;
        max-height: none;
        overflow: visible;
        box-shadow: none;
        border: none;
    }
}

/* === MAIN CONTENT === */
main {
    background: var(--bianco);
    min-height: 60vh;
    padding: 2rem 0;
}

/* === ARTICLE CARD === */
.article-card {
    background: var(--bianco);
    border: 1px solid var(--bordo);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content {
    padding: 1.25rem;
}

.article-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--verde-celtico);
}

.article-meta {
    color: var(--testo-chiaro);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.article-excerpt {
    font-size: 0.938rem;
    line-height: 1.5;
}

/* === SHARE BUTTONS === */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bordo);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--bianco);
    transition: transform 0.2s, opacity 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
    text-decoration: none;
}

.share-fb { background: #1877f2; }
.share-wa { background: #25d366; }
.share-generic { background: var(--verde-celtico); }

/* === ARTICLE PAGE === */
article h1 {
    font-size: 2rem;
    color: var(--verde-celtico);
    margin-bottom: 1rem;
    line-height: 1.3;
}

article .meta {
    border-bottom: 1px solid var(--bordo);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: var(--testo-chiaro);
}

article .content {
    font-size: 1.05rem;
    line-height: 1.8;
}

article .content h2, article .content h3 {
    color: var(--verde-celtico);
    margin: 1.5rem 0 1rem;
}

article .content img {
    margin: 1.5rem auto;
    border-radius: 4px;
}

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

/* === SECTIONS HOMEPAGE === */
.section {
    margin: 3rem 0;
}

.section h2 {
    font-size: 1.75rem;
    color: var(--verde-celtico);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--oro-celtico);
    padding-left: 1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

/* === WIDGET BOXES === */
.widget {
    background: var(--bianco);
    border: 1px solid var(--bordo);
    border-radius: 6px;
    padding: 1.5rem;
}

.widget h3 {
    color: var(--verde-celtico);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* === SEARCH === */
.search-box {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--bordo);
    border-radius: 4px;
    font-size: 1rem;
}

.search-box:focus {
    outline: none;
    border-color: var(--verde-celtico);
}

/* === FOOTER === */
footer {
    background: var(--testo);
    color: var(--sfondo);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer a {
    color: var(--oro-chiaro);
}

/* === UTILITIES === */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }

/* === RESPONSIVE === */
@media (min-width: 640px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    nav ul { gap: 1rem; }
}

@media (min-width: 1024px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    header h1 { font-size: 2.5rem; }
    nav a { padding: 1rem 1.5rem; }
}
