/*
Theme Name: GFOSS
Theme URI: https://gfoss.it
Author: GFOSS.it
Author URI: https://gfoss.it
Description: Tema personalizzato per GFOSS.it - Associazione Italiana per l'Informazione Geografica Libera
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: gfoss
Tags: gis, open-source, open-data, foss4g
*/

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --primary-dark: #004d99;
    --secondary-color: #28a745;
    --secondary-dark: #1e7e34;
    --accent-color: #ff6b35;
    --text-color: #2c3e50;
    --text-light: #6c757d;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --link-color: #0066cc;
    --link-hover: #004d99;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--light-bg);
    font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.site-title {
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.site-title a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.site-title a:hover {
    opacity: 0.9;
}

.site-description {
    color: rgba(255,255,255,0.95);
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
    font-weight: 300;
}

/* Navigation */
.main-navigation {
    margin-top: 1rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--white);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    display: block;
    transition: all 0.3s ease;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* Content */
.site-content {
    padding: 3rem 0;
    min-height: calc(100vh - 300px);
}

.content-area {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 4rem 2rem;
    margin: -3rem -20px 3rem;
    border-radius: 0 0 30px 30px;
    box-shadow: var(--shadow-lg);
}

.hero-section h1 {
    color: var(--white);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Section Headers */
.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.post-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.post-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.post-card-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card-title a:hover {
    color: var(--primary-color);
}

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

.post-excerpt {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    text-align: center;
}

.btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
    text-decoration: none;
    color: var(--white);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary-color));
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

/* Page & Single Post */
.entry-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.entry-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.entry-meta {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.entry-content {
    line-height: 1.9;
    font-size: 1.05rem;
}

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

/* Footer */
.site-footer {
    background: linear-gradient(135deg, #1a252f 0%, var(--text-color) 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--white);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-widget a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.site-info {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.site-info a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

.site-info a:hover {
    color: var(--white);
}

/* Navigation Posts */
.post-navigation,
.posts-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.posts-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-previous a,
.nav-next a {
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: var(--primary-dark);
    padding-left: 0.5rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .main-navigation ul {
        flex-direction: column;
        gap: 0.25rem;
    }

    .main-navigation a {
        border-radius: 8px;
    }

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

    .hero-section {
        padding: 3rem 1.5rem;
        margin: -3rem -20px 2rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-3 { margin-bottom: 3rem; }
