/* ==========================================================
   RIC IL RICCIO — RISORSE GRATUITE
   VERSIONE DEFINITIVA
   ========================================================== */

#ric-free-resources,
#ric-free-resources *,
#ric-free-resources *::before,
#ric-free-resources *::after {
    box-sizing: border-box;
}

#ric-free-resources {
    --ric-navy: #153f38;
    --ric-navy-dark: #0d2f2a;
    --ric-green: #5f8b62;
    --ric-green-soft: #edf5e9;
    --ric-gold: #c89112;
    --ric-gold-soft: #fbf1d7;
    --ric-blue: #4d86b8;
    --ric-blue-soft: #eaf3fb;
    --ric-cream: #fffdf7;
    --ric-white: #ffffff;
    --ric-text: #33443f;
    --ric-muted: #68756f;
    --ric-border: rgba(21, 63, 56, 0.11);
    --ric-shadow: 0 10px 28px rgba(21, 63, 56, 0.08);
    --ric-shadow-hover: 0 17px 40px rgba(21, 63, 56, 0.15);

    width: 100%;
    margin: 0;
    padding: 0 0 40px;
    overflow: hidden;
    color: var(--ric-text);
    font-family: inherit;
    line-height: 1.6;
}

#ric-free-resources a {
    text-decoration: none;
}

#ric-free-resources .ric-page-wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* HERO */

#ric-free-resources .ric-resources-hero {
    position: relative;
    overflow: hidden;
    padding: 62px 0 58px;
    background:
        radial-gradient(circle at 12% 20%, rgba(201, 145, 18, 0.13), transparent 27%),
        radial-gradient(circle at 88% 80%, rgba(95, 139, 98, 0.15), transparent 30%),
        linear-gradient(135deg, #fffdf7 0%, #f8f5e9 48%, #edf5eb 100%);
    border: 1px solid rgba(21, 63, 56, 0.08);
    border-radius: 30px;
}

#ric-free-resources .ric-hero-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
    gap: 54px;
}

#ric-free-resources .ric-overline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 13px;
    color: var(--ric-green);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

#ric-free-resources .ric-overline::before {
    content: "✦";
    color: var(--ric-gold);
}

#ric-free-resources .ric-resources-hero h1 {
    margin: 0;
    color: var(--ric-navy);
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

#ric-free-resources .ric-hero-lead {
    max-width: 710px;
    margin: 22px 0 0;
    color: #3e554e;
    font-size: clamp(1.04rem, 1.7vw, 1.2rem);
    line-height: 1.72;
}

#ric-free-resources .ric-hero-small {
    max-width: 680px;
    margin: 14px 0 0;
    color: var(--ric-muted);
    font-size: 0.93rem;
    line-height: 1.68;
}

#ric-free-resources .ric-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 25px;
}

#ric-free-resources .ric-jump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    padding: 9px 16px;
    color: var(--ric-navy);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(21, 63, 56, 0.15);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

#ric-free-resources .ric-hero-art {
    width: 100%;
    height: 300px;
    background-image: url("https://ricilriccio.it/wp-content/uploads/2026/07/01-05-34-01-01-Copertina-scaled.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 18px 28px rgba(21, 63, 56, 0.16));
}

/* SEZIONI */

#ric-free-resources .ric-resource-section {
    padding: 70px 0 0;
    scroll-margin-top: 100px;
}

#ric-free-resources .ric-section-panel {
    position: relative;
    overflow: hidden;
    padding: 32px;
    border: 1px solid rgba(21, 63, 56, 0.08);
    border-radius: 25px;
}

#ric-free-resources .ric-color-panel {
    background: linear-gradient(135deg, #f8fbf5, #eef5eb);
}

#ric-free-resources .ric-activity-panel {
    background: linear-gradient(135deg, #fffaf0, #fbf1d6);
}

#ric-free-resources .ric-parent-panel {
    background: linear-gradient(135deg, #f5faff, #e9f3fb);
}

#ric-free-resources .ric-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 430px);
    align-items: end;
    gap: 42px;
    margin-bottom: 27px;
}

#ric-free-resources .ric-heading-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

#ric-free-resources .ric-section-number {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 47px;
    color: #ffffff;
    background: var(--ric-green);
    border-radius: 50%;
    font-size: 0.87rem;
    font-weight: 800;
}

#ric-free-resources .ric-activity-panel .ric-section-number {
    background: var(--ric-gold);
}

#ric-free-resources .ric-parent-panel .ric-section-number {
    background: var(--ric-blue);
}

#ric-free-resources .ric-section-heading h2 {
    margin: 0;
    color: var(--ric-navy);
    font-size: clamp(1.85rem, 3.3vw, 2.9rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

#ric-free-resources .ric-section-heading > p {
    margin: 0;
    color: var(--ric-muted);
    font-size: 0.91rem;
    line-height: 1.7;
}

/* GRIGLIA MINIATURE */

#ric-free-resources .ric-mini-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

#ric-free-resources .ric-mini-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--ric-border);
    border-radius: 15px;
    box-shadow: var(--ric-shadow);
}

#ric-free-resources .ric-thumb {
    display: block;
    width: 100%;
    height: 142px;
    overflow: hidden;
    background-color: #ffffff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-bottom: 1px solid rgba(21, 63, 56, 0.08);
}

#ric-free-resources .ric-mini-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 13px;
}

#ric-free-resources .ric-mini-type {
    margin: 0 0 5px;
    color: var(--ric-green);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

#ric-free-resources .ric-mini-card h3 {
    min-height: 2.7em;
    margin: 0 0 12px;
    color: var(--ric-navy);
    font-size: 0.82rem;
    line-height: 1.35;
}

#ric-free-resources .ric-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 33px;
    margin-top: auto;
    padding: 8px 12px;
    color: #ffffff;
    background: var(--ric-green);
    border: 1px solid var(--ric-green);
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 800;
    line-height: 1;
}

#ric-free-resources .ric-download::after {
    content: "↓";
}

/* CARD ORIZZONTALI */

#ric-free-resources .ric-feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: stretch;
    gap: 18px;
}

#ric-free-resources .ric-feature-card {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--ric-border);
    border-radius: 16px;
    box-shadow: var(--ric-shadow);
}

#ric-free-resources .ric-feature-thumb {
    min-height: 185px;
    background-color: #ffffff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#ric-free-resources .ric-feature-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 25px 28px;
}

#ric-free-resources .ric-feature-content h3 {
    margin: 0 0 8px;
    color: var(--ric-navy);
    font-size: 1.3rem;
}

#ric-free-resources .ric-feature-content p {
    margin: 0 0 18px;
    color: var(--ric-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

#ric-free-resources .ric-activity-download {
    background: var(--ric-gold);
    border-color: var(--ric-gold);
}

#ric-free-resources .ric-parent-download {
    background: var(--ric-blue);
    border-color: var(--ric-blue);
}

#ric-free-resources .ric-side-note {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
    color: var(--ric-navy);
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(21, 63, 56, 0.08);
    border-radius: 16px;
}

#ric-free-resources .ric-side-note p {
    margin: 0;
    font-size: 0.86rem;
    font-style: italic;
    line-height: 1.62;
}

/* CTA */

#ric-free-resources .ric-final {
    padding: 24px 0 0;
}

#ric-free-resources .ric-final-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 34px;
    padding: 38px 40px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--ric-navy-dark), var(--ric-navy));
    border-radius: 24px;
}

#ric-free-resources .ric-final h2 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
}

#ric-free-resources .ric-final p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

#ric-free-resources .ric-final-buttons {
    display: flex;
    gap: 9px;
}

#ric-free-resources .ric-final-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    color: var(--ric-navy);
    background: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

#ric-free-resources .ric-final-button-secondary {
    color: #ffffff;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    #ric-free-resources .ric-mini-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    #ric-free-resources .ric-mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #ric-free-resources .ric-section-heading,
    #ric-free-resources .ric-feature-layout,
    #ric-free-resources .ric-final-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    #ric-free-resources .ric-page-wrap {
        width: min(100% - 26px, 1180px);
    }

    #ric-free-resources .ric-hero-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #ric-free-resources .ric-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #ric-free-resources .ric-feature-card {
        grid-template-columns: 1fr;
    }

    #ric-free-resources .ric-final-buttons {
        justify-content: flex-start;
    }
}

/* Immagini reali: necessarie dentro WordPress */
#ric-free-resources .ric-real-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
}

#ric-free-resources .ric-hero-art {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none !important;
}

#ric-free-resources .ric-hero-cover-image {
    display: block !important;
    width: auto !important;
    height: 300px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

@media (max-width: 680px) {
    #ric-free-resources .ric-hero-cover-image {
        height: 210px !important;
    }
}
