/*
Theme Name: Green Island Youth
Theme URI: https://greenisland.cloud
Author: Eleonora Pomponi & Carlo Pomponi
Author URI: https://greenisland.cloud/chi-siamo
Description: Tema minimalista per Green Island - Insieme verso un mondo migliore. Design approvato da Eleonora.
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: greenisland-youth
Tags: blog, portfolio, photography, custom-colors, custom-menu, featured-images, theme-options

Green Island Youth Theme v2 - Minimal Design by Eleonora
*/

/* ==========================================================================
   CSS VARIABLES - Design System Approvato
   ========================================================================== */

:root {
    /* Colors - Green Island Palette */
    --green-light: #4ADE80;
    --green-medium: #22C55E;
    --green-dark: #166534;
    --green-darker: #14532D;
    --white: #ffffff;
    --gray-light: #f0fdf4;
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(22, 101, 52, 0.05);
    --shadow-md: 0 4px 20px rgba(22, 101, 52, 0.1);
    --shadow-lg: 0 20px 50px rgba(22, 101, 52, 0.12);
    --shadow-btn: 0 4px 20px rgba(22, 101, 52, 0.3);
    
    /* Transitions */
    --transition: all 0.2s ease;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--green-dark);
    background-color: var(--green-light);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--green-dark);
    text-decoration: none;
    transition: var(--transition);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--green-dark);
    letter-spacing: -0.03em;
}

/* ==========================================================================
   NAVIGATION - Glassmorphism su verde
   ========================================================================== */

.gi-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(74, 222, 128, 0.95);
    backdrop-filter: blur(20px);
    padding: 16px 40px;
    display: flex;
    justify-content: center; /* Menu centrato */
    align-items: center;
    border-bottom: 1px solid rgba(22, 101, 52, 0.1);
}

.gi-nav__logo {
    position: absolute; /* Logo posizionato a sinistra */
    left: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.gi-nav__logo-icon {
    width: 40px;
    height: 40px;
}

.gi-nav__logo-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--green-dark);
    letter-spacing: -0.02em;
}

.gi-nav__links {
    display: flex;
    gap: 32px;
    list-style: none;
    /* Menu centrato automaticamente grazie a justify-content: center */
}

.gi-nav__link {
    text-decoration: none;
    color: var(--green-dark);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.gi-nav__link:hover,
.gi-nav__link--active {
    opacity: 1;
}

/* Language Switcher - Stile minimalista pulito */
.gi-lang-switcher {
    position: absolute; /* Posizionato a destra */
    right: 40px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gi-lang-switcher ul {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Nasconde pallini, flag e qualsiasi icona Polylang */
.gi-lang-switcher li::before,
.gi-lang-switcher li::marker,
.gi-lang-switcher .lang-item-first::before,
.gi-lang-switcher img,
.gi-lang-switcher .pll-no-flag::before {
    display: none !important;
    content: none !important;
}

.gi-lang-switcher a,
.gi-lang-switcher__link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--green-dark);
    text-decoration: none;
    text-transform: uppercase;
    opacity: 0.5;
    transition: all 0.2s;
    padding: 0;
}

.gi-lang-switcher a:hover,
.gi-lang-switcher__link:hover {
    opacity: 1;
    color: var(--green-dark);
}

.gi-lang-switcher .current-lang a,
.gi-lang-switcher__link--active {
    opacity: 1;
    color: var(--green-dark);
}

.gi-lang-switcher__divider {
    color: var(--green-dark);
    opacity: 0.3;
    margin: 0 2px;
}

/* ==========================================================================
   HERO SECTION - Sfondo verde chiaro (Design Eleonora)
   ========================================================================== */

.gi-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 40px 80px;
    position: relative;
    background: linear-gradient(180deg, 
        #4ADE80 0%,
        #86EFAC 50%,
        #BBF7D0 100%
    );
}

.gi-hero__decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    border-radius: 50%;
    z-index: 0;
}

.gi-hero__logo {
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
    z-index: 1;
    filter: drop-shadow(0 4px 20px rgba(22, 101, 52, 0.2));
}

/* Titolo bicolore: "Green" verde scuro, "Island" bianco */
.gi-hero__title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    z-index: 1;
}

.gi-hero__title .green {
    color: var(--green-dark);
}

.gi-hero__title .island {
    color: var(--white);
    text-shadow: 0 2px 10px rgba(22, 101, 52, 0.2);
}

.gi-hero__tagline {
    text-align: center;
    margin-bottom: 40px;
    z-index: 1;
    max-width: 550px;
    margin-top: -8px; /* Riduce spazio dopo il titolo */
}

/* Riga principale - la mission della community */
.gi-hero__mission {
    font-family: var(--font-main);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 300; /* Light weight per eleganza */
    color: var(--green-darker);
    margin-bottom: 16px;
    padding-bottom: 16px;
    letter-spacing: 0.04em; /* Spaziatura ampia per raffinatezza */
    text-transform: uppercase; /* Tutto maiuscolo per impatto */
    position: relative;
}

/* Separatore elegante */
.gi-hero__mission::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--green-dark), transparent);
    opacity: 0.4;
}

/* Riga secondaria - i fondatori */
.gi-hero__subtitle {
    font-family: var(--font-main);
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    font-weight: 400;
    color: var(--green-dark);
    opacity: 0.6;
    letter-spacing: 0.02em;
}

/* Wave di transizione */
.gi-hero__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.gi-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}

.gi-btn--primary {
    background: var(--green-dark);
    color: var(--white);
    box-shadow: var(--shadow-btn);
}

.gi-btn--primary:hover {
    background: var(--green-darker);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(22, 101, 52, 0.4);
}

.gi-btn svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   CONTENT SECTION - Sfondo bianco
   ========================================================================== */

.gi-content {
    padding: 80px 40px;
    background: var(--white);
}

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

.gi-section-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 10px;
}

.gi-section-header p {
    color: var(--green-dark);
    opacity: 0.7;
    font-size: 1rem;
}

/* ==========================================================================
   CONTENT CARDS
   ========================================================================== */

.gi-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.gi-card {
    background: var(--gray-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(22, 101, 52, 0.1);
}

.gi-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--green-light);
}

/* ==========================================================================
   CARD ANIMATIONS - Reveal on Scroll (Engaging!)
   ========================================================================== */

/* Cards start invisible, animate when in viewport */
.gi-card {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: none;
}

@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    60% {
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gi-card.gi-animate-in {
    animation: cardReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Staggered delays via CSS custom property */
.gi-card:nth-child(1) { --stagger: 0s; }
.gi-card:nth-child(2) { --stagger: 0.1s; }
.gi-card:nth-child(3) { --stagger: 0.2s; }
.gi-card:nth-child(4) { --stagger: 0.3s; }
.gi-card:nth-child(5) { --stagger: 0.4s; }
.gi-card:nth-child(6) { --stagger: 0.5s; }

.gi-card.gi-animate-in {
    animation-delay: var(--stagger);
}

/* Fallback: show cards if JS fails */
.no-js .gi-card,
.gi-card.gi-no-animation {
    opacity: 1;
    transform: none;
}

.gi-card__image {
    height: 180px;
    background: linear-gradient(135deg, var(--green-light), #86EFAC);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
}

/* Foto di categoria con overlay verde sottile */
.gi-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gi-card:hover .gi-card__image img {
    transform: scale(1.05);
}

/* Overlay verde per coerenza stilistica sulle foto */
.gi-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(74, 222, 128, 0.1) 0%,
        rgba(22, 101, 52, 0.15) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.gi-card__image:has(img)::after {
    opacity: 1;
}

/* Icona emoji come fallback elegante */
.gi-card__icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 8px rgba(22, 101, 52, 0.2));
}

.gi-card__body {
    padding: 24px;
}

.gi-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.gi-card__type {
    font-size: 0.8rem;
    color: var(--green-dark);
    opacity: 0.7;
}

.gi-card__tag {
    background: var(--green-light);
    color: var(--green-dark);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.gi-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--green-darker);
    margin-bottom: 8px;
    line-height: 1.4;
}

.gi-card__excerpt {
    font-size: 0.9rem;
    color: var(--green-dark);
    opacity: 0.8;
    line-height: 1.6;
}

/* ==========================================================================
   FILTERS
   ========================================================================== */

.gi-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 40px;
}

.gi-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--green-dark);
    background: var(--white);
    border: 1px solid rgba(22, 101, 52, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.gi-filter-btn:hover,
.gi-filter-btn--active {
    background: var(--green-dark);
    color: var(--white);
    border-color: var(--green-dark);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.gi-footer {
    text-align: center;
    padding: 40px;
    background: var(--green-dark);
    color: var(--white);
}

.gi-footer__logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    filter: brightness(0) invert(1);
}

.gi-footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.gi-footer a {
    color: var(--green-light);
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.gi-about {
    padding: 120px 40px 80px;
    background: var(--white);
}

.gi-about__content {
    max-width: 800px;
    margin: 0 auto;
}

.gi-about__title {
    font-size: 2.5rem;
    color: var(--green-dark);
    margin-bottom: 30px;
    text-align: center;
}

.gi-about__text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--green-darker);
}

.gi-about__founders {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 60px;
    flex-wrap: wrap;
}

.gi-founder {
    text-align: center;
    max-width: 250px;
}

.gi-founder__avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--green-light);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.gi-founder__name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 5px;
}

.gi-founder__role {
    font-size: 0.9rem;
    color: var(--green-dark);
    opacity: 0.7;
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

.gi-contact {
    padding: 120px 40px 80px;
    background: var(--white);
}

.gi-contact__content {
    max-width: 600px;
    margin: 0 auto;
}

.gi-contact__title {
    font-size: 2.5rem;
    color: var(--green-dark);
    margin-bottom: 30px;
    text-align: center;
}

.gi-form__group {
    margin-bottom: 20px;
}

.gi-form__label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.gi-form__input,
.gi-form__textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--green-darker);
    background: var(--gray-light);
    border: 1px solid rgba(22, 101, 52, 0.2);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.gi-form__input:focus,
.gi-form__textarea:focus {
    outline: none;
    border-color: var(--green-dark);
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.gi-form__textarea {
    min-height: 150px;
    resize: vertical;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.gi-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gi-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   RESPONSIVE - Mobile First
   ========================================================================== */

@media (max-width: 768px) {
    /* Top nav becomes minimal on mobile */
    .gi-nav {
        padding: 12px 16px;
    }
    
    .gi-nav__logo-text {
        display: none;
    }
    
    .gi-nav__logo-icon {
        width: 36px;
        height: 36px;
    }
    
    /* Hide top nav links on mobile - use bottom bar instead */
    .gi-nav__links {
        display: none;
    }
    
    /* =========================================
       BOTTOM TAB BAR - Mobile Navigation
       ========================================= */
    .gi-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--white);
        border-top: 1px solid rgba(22, 101, 52, 0.1);
        box-shadow: 0 -4px 20px rgba(22, 101, 52, 0.1);
        padding: 8px 0;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    
    .gi-bottom-nav__links {
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .gi-bottom-nav__item {
        flex: 1;
        text-align: center;
    }
    
    .gi-bottom-nav__link {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 4px;
        color: var(--green-dark);
        opacity: 0.6;
        transition: all 0.2s ease;
        text-decoration: none;
    }
    
    .gi-bottom-nav__link:hover,
    .gi-bottom-nav__link--active {
        opacity: 1;
    }
    
    .gi-bottom-nav__link--active {
        color: var(--green-medium);
    }
    
    .gi-bottom-nav__icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .gi-bottom-nav__icon svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
    }
    
    .gi-bottom-nav__link--active .gi-bottom-nav__icon svg {
        stroke-width: 2.5;
    }
    
    .gi-bottom-nav__label {
        font-size: 0.65rem;
        font-weight: 500;
        letter-spacing: 0.02em;
    }
    
    /* Language Switcher in Bottom Nav - Stile pulito */
    .gi-bottom-nav__item--lang {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 2px;
        flex: 0.6;
        border-left: 1px solid rgba(22, 101, 52, 0.15);
        margin-left: 4px;
        padding-left: 8px;
    }
    
    .gi-bottom-nav__lang {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--green-dark);
        text-decoration: none;
        padding: 4px 6px;
        opacity: 0.4;
        transition: all 0.2s;
    }
    
    .gi-bottom-nav__lang--active {
        opacity: 1;
    }
    
    /* Divider tra IT e EN */
    .gi-bottom-nav__item--lang .gi-lang-divider {
        color: var(--green-dark);
        opacity: 0.25;
        font-size: 0.7rem;
    }
    
    /* Hide desktop lang switcher on mobile */
    .gi-lang-switcher {
        display: none;
    }
    
    /* Add bottom padding to content for bottom nav */
    body {
        padding-bottom: 80px;
    }
    
    .gi-footer {
        padding-bottom: 100px;
    }
    
    /* Hero adjustments */
    .gi-hero {
        padding: 80px 20px 60px;
        min-height: calc(100vh - 80px);
    }
    
    .gi-hero__logo {
        width: 100px;
        height: 100px;
    }
    
    .gi-hero__title {
        font-size: clamp(2.2rem, 12vw, 3.5rem);
    }
    
    .gi-hero__tagline {
        padding: 0 16px;
    }
    
    .gi-hero__mission {
        font-size: 1.1rem;
    }
    
    .gi-hero__subtitle {
        font-size: 0.85rem;
    }
    
    /* Content adjustments */
    .gi-content {
        padding: 50px 16px 60px;
    }
    
    .gi-section-header h2 {
        font-size: 1.5rem;
    }
    
    /* Cards get more dramatic animation on mobile */
    .gi-card {
        transform: translateY(60px) scale(0.9);
    }
    
    @keyframes cardRevealMobile {
        0% {
            opacity: 0;
            transform: translateY(60px) scale(0.9);
        }
        50% {
            transform: translateY(-8px) scale(1.03);
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    .gi-card.gi-animate-in {
        animation-name: cardRevealMobile;
        animation-duration: 0.7s;
    }
    
    /* About & Contact pages */
    .gi-about,
    .gi-contact {
        padding: 80px 20px 60px;
    }
    
    .gi-about__founders {
        flex-direction: column;
        align-items: center;
    }
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
    .gi-bottom-nav {
        display: none;
    }
}

/* ==========================================================================
   WORDPRESS SPECIFICS
   ========================================================================== */

/* Alignment classes */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Post navigation */
.post-navigation {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(22, 101, 52, 0.1);
}

/* Comments */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(22, 101, 52, 0.1);
}

.comment-list {
    list-style: none;
}

.comment {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--gray-light);
    border-radius: var(--radius-lg);
}
