/*
Theme Name: Shekinà Hub Giovani
Theme URI: https://yoursite.com
Author: Christian Perera
Description: Tema WordPress personalizzato per Shekinà Hub Giovani
Version: 1.4
License: GNU General Public License v2 or later
Text Domain: shekina-hub-giovani
*/

/* ==========================================================================
   1. RESET E IMPOSTAZIONI DI BASE
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    font-family: 'Open Sans', sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
}

h1, h2, h3, .brand-font {
    font-family: 'Montserrat', sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Evita piccoli spazi bianchi sotto le immagini */
}

/* ==========================================================================
   2. COMPONENTI COMUNI (TITOLI SEZIONE)
   ========================================================================== */
.section-title {
    text-align: center;
    color: #0F172A; /* Blu scuro/notte elegante */
    position: relative;
    display: block; /* Modificato per la centratura */
    width: max-content; /* Si adatta alla lunghezza del testo */
    max-width: 100%;
    margin: 0 auto 40px auto; /* Centra orizzontalmente e dà spazio sotto */
    padding-bottom: 15px;
    font-size: 2.5rem; /* Reso molto più grande e d'impatto */
    font-weight: 800;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px; /* Linea leggermente più larga per bilanciare il titolo grande */
    height: 4px; 
    background-color: #FF8C00; /* Arancione Shekinà */
    border-radius: 2px;
}

/* ==========================================================================
   3. HEADER & NAVBAR
   ========================================================================== */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    min-height: 100px;
}

.logo .main-logo {
    display: block;
    width: 200px;
    transition: transform 0.3s ease;
}

.logo a .main-logo:hover {
    transform: scale(1.05);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 45px;
}

.main-navigation li a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.main-navigation li a:hover {
    color: #F97316;
}

.main-navigation li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2563EB;
    transition: width 0.3s ease;
}

.main-navigation li a:hover::after {
    width: 100%;
}

.menu-mobile-btn button {
    background: #f3f4f6;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: none;
    font-size: 20px;
    color: #1f2937;
}

/* ==========================================================================
   4. HERO SLIDER
   ========================================================================== */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #000;
    margin-bottom: 0 !important; /* Forza la rimozione dello spazio vuoto sotto */
}

.slide {
    position: absolute;
    width: 100%; 
    height: 100%;
    opacity: 0; 
    transition: opacity 1s ease;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover; 
}

.slide.slide-postcard {
    background-size: contain; 
    background-color: #000;   
}

.slide.active { opacity: 1; z-index: 1; }

.slide::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;  
    justify-content: center;  
    align-items: center;      
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    text-align: center;       
}

.slide-text { 
    color: #fff; 
}

.slide-badge {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-block;
}

.badge-blue { background: #2563EB; }

.slide-text h1 {
    font-size: 56px; /* Pulito il doppione: mantenuto il più grande */
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 800;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.5);
}

.slide-text p {
    font-size: 22px;
    opacity: 0.95;
    margin: 0 auto 35px auto;
    max-width: 650px;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.5);
}

.slide-btn {
    display: inline-block;
    background: #F97316;
    color: #fff;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.slide-btn:hover {
    background: #ea580c;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

/* ==========================================================================
   5. SEZIONE POST E NEWS
   ========================================================================== */
#news {
    background-color: #F4F7FC; 
    border-bottom: 2px solid #E5E7EB; 
    margin-top: 0 !important;
    padding: 80px 20px 60px 20px; /* Dà ampio respiro sopra e sotto */
}  

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.post-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden; 
    background-color: #e5e7eb;
}

.post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; 
}

.post-card:hover .post-image-wrapper img {
    transform: scale(1.1);
}

/* Badge Data a Calendario in Homepage */
.post-date-badge {
    position: absolute;
    top: 15px; 
    left: 15px;
    background: #ffffff;
    padding: 10px;
    border-radius: 10px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    display: flex;
    flex-direction: column;
    min-width: 50px;
    line-height: 1;
}

.post-date-badge .day {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #2563EB;
}

.post-date-badge .month {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #F97316;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-content h2 {
    margin-top: 0;
    font-size: 20px;
    color: #111827;
}

.post-category {
    color: #F97316;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.read-more-link {
    color: #2563EB;
    font-weight: 700;
    text-decoration: none;
    margin-top: auto;
    display: inline-block;
    padding-top: 15px;
}

.read-more-link {
    display: inline-block;
    background-color: #2563EB; /* Il tuo blu */
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin-top: auto;
    text-align: center;
    border: none;
}

.read-more-link:hover {
    background-color: #F97316; /* Diventa arancione al passaggio del mouse */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
    color: #fff !important;
}

/* ==========================================================================
   6. LAYOUT PAGINE E ARTICOLI SINGOLI
   ========================================================================== */
.page .site-main,
.single .site-main {
    max-width: 1000px; 
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.page .entry-title,
.single .entry-title {
    text-align: center;
    font-size: 2.5rem;
    color: #111827;
    margin-bottom: 30px;
}

/* Layout Chi Siamo */
.intro-paragraph {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #4b5563;
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-split {
    display: flex;
    align-items: center;
    gap: 50px;
}

.split-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.8;
    color: #1f2937;
    text-align: justify;
}

.split-image { flex: 1; }

.split-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Layout Post Singolo */
.single-post-container { padding: 0 !important; }

.text-center { text-align: center; margin-bottom: 40px; }

.post-flex-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 20px;
}

.post-image-side { flex: 1; }

.post-image-side img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.post-content-side {
    flex: 1.2;
    font-size: 17px;
    line-height: 1.8;
    color: #374151;
}

.post-flex-wrapper.no-thumbnail { display: block; }
.post-flex-wrapper.no-thumbnail .post-content-side { max-width: 800px; margin: 0 auto; }

/* Badge Meta Articolo Singolo */
.entry-meta { margin-top: 15px; }

.date-badge {
    background-color: #f3f4f6; 
    color: #2563EB;            
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e5e7eb;
}

.date-badge i { color: #F97316; }

/* ==========================================================================
   7. SEZIONE ATTIVITÀ
   ========================================================================== */
.attivita-row {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 60px;
}

.attivita-row.reverse { flex-direction: row-reverse; }

.attivita-img { flex: 1; }

.attivita-img img {
    width: 100%;
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Leggermente ammorbidita */
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}

.attivita-img img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.attivita-text { flex: 1; }

.attivita-text h3 {
    font-size: 2rem;
    color: #2563EB; 
    margin-top: 0;
    margin-bottom: 15px;
}

.attivita-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4b5563;
}

/* Animazioni su Scroll */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.slide-in-left { transform: translateX(-50px); }
.slide-in-right { transform: translateX(50px); }
.slide-in-up { transform: translateY(40px); }
.animate-on-scroll.is-visible { opacity: 1; transform: translate(0, 0); }

/* Freccia Contatti */
.scroll-arrow {
    font-size: 32px;
    color: #F97316; 
    animation: bounce 2s infinite;
    margin-top: 10px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer {
    background-color: #111827;
    color: #d1d5db;
    padding: 60px 20px 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo img { width: 180px; margin-bottom: 20px; }

.site-footer ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-footer li {
    margin-bottom: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-footer li i {
    color: #3b82f6;
    width: 16px;
    text-align: center;
}

.site-footer a { text-decoration: none !important; }

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icon {
    width: 45px; height: 45px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; background: #1f2937; color: #ffffff;
    transition: transform 0.3s ease, background 0.3s ease;
}

.social-icon:hover { transform: translateY(-3px); }
.social-icon.instagram:hover { background: #E1306C; }
.social-icon.facebook:hover { background: #1877F2; }
.social-icon.whatsapp:hover { background: #25D366; }

.footer-map iframe {
    width: 100%;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid #374151;
    font-size: 13px;
    color: #9ca3af;
}

/* ==========================================================================
   9. RESPONSIVE (MOBILE)
   ========================================================================== */
@media (max-width: 992px) {
    .footer-container { grid-template-columns: 1fr 1fr; }
    .footer-map-col { grid-column: span 2; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 850px) {
    .post-flex-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    .post-image-side, .post-content-side { width: 100%; }
}

@media (max-width: 768px) {
    .menu-mobile-btn button { display: block; }

    .main-navigation {
        display: none;
        width: 100%;
        position: absolute;
        top: 100px;
        left: 0;
        background: #ffffff;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .main-navigation.active-mobile { display: block; }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    .main-navigation li a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid #f3f4f6;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .site-footer li { justify-content: center; }
    .footer-social { justify-content: center; }
    .footer-map-col { grid-column: span 1; }
    .slide-text h1 { font-size: 38px; }
    
    .page .site-main, .single .site-main { padding: 20px; margin: 20px 10px; }

    .content-split {
        flex-direction: column;
        gap: 30px;
    }
    .split-text { text-align: left; }
    
    .attivita-row, .attivita-row.reverse {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .posts-grid { grid-template-columns: 1fr; }
    .navbar { min-height: 80px; }
    .logo .main-logo { width: 160px; }
}