/* ════════════════════════════════════════
   Togan Template — v1.5
   Bootstrap 5 + Font Awesome 6.6 loaded before this file
   ════════════════════════════════════════ */

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

body {
    font-family: 'Nunito', sans-serif;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #333;
}

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

.togan-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── HEADER ──────────────────────────────────────────────── */

#togan-header {
    background: #3a3837;
    position: sticky;
    top: 0;
    z-index: 100;
    
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

#togan-logo a { display: block; line-height: 0; }
#togan-logo img { height: 90px; transition: height 0.3s ease; }

/* Right column: social, contact, nav — all right-aligned */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.header-social { display: flex; gap: 10px; overflow: hidden; max-height: 40px; opacity: 1; transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease; }
.header-social a {
    color: #888;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}
.header-social a:hover { color: #ccc; }

.header-contact { display: flex; gap: 14px; font-size: 0.74rem; overflow: hidden; max-height: 40px; opacity: 1; transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease; }
.header-contact a {
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}
.header-contact a:hover { color: #bbb; }
.header-contact i { margin-right: 3px; }

/* ── SCROLLED HEADER STATE ───────────────────────────────────── */

#togan-header.scrolled .header-inner { padding: 6px 0; }
#togan-header.scrolled #togan-logo img { height: 50px; }
#togan-header.scrolled .header-social { max-height: 0; opacity: 0; margin: 0; }
#togan-header.scrolled .header-contact { max-height: 0; opacity: 0; margin: 0; }

/* ── DESKTOP NAV ─────────────────────────────────────────── */

#togan-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    justify-content: flex-end;
}

#togan-nav ul li a {
    display: block;
    padding: 6px 12px;
    color: #ccc;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 3px;
    transition: color 0.2s, background 0.2s;
}
#togan-nav ul li a:hover,
#togan-nav ul li.active a {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Hamburger — hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 102;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #aaa;
    transition: transform 0.25s, opacity 0.25s, background 0.25s;
}
.nav-toggle.open span { background: #333; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE DRAWER ───────────────────────────────────────── */

#nav-drawer {
    display: none; /* hidden on desktop */
}

/* Blur/dim overlay */
#nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99;
    cursor: pointer;
}
#nav-overlay.active { display: block; }

/* ── PAGE TITLE HERO ─────────────────────────────────────────── */

#togan-page-title {
    background: #3a3837;
    padding: 40px 0;
    text-align: center;
}

#togan-page-title h1 {
    color: #8dc63f;
    font-size: 2rem;
    font-style: italic;
    font-weight: 700;
    margin: 0;
    padding: 0;
}

/* ── MAIN ─────────────────────────────────────────────────── */

#togan-main { min-height: 400px; }

/* Wrapper for standard Joomla pages (category blogs, articles, etc.) */
.togan-content-wrap { padding: 30px 0; }

.with-sidebar {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}
#togan-sidebar { flex: 0 0 220px; }
#togan-content  { flex: 1; min-width: 0; }

/* Joomla 5 category blog columns */
@media (min-width: 768px) {
    .com-content-category-blog__items {
        display: flex !important;
        flex-wrap: wrap;
        gap: 24px;
    }

    /* 1-column */
    .com-content-category-blog__items.masonry-1
    .com-content-category-blog__item {
        flex: 0 0 100%;
    }

    /* 2-column */
    .com-content-category-blog__items.masonry-2
    .com-content-category-blog__item {
        flex: 0 0 calc(50% - 12px);
        max-width: calc(50% - 12px);
    }

    /* 3-column (default) */
    .com-content-category-blog__items.masonry-3
    .com-content-category-blog__item,
    .com-content-category-blog__items:not([class*="masonry"])
    .com-content-category-blog__item {
        flex: 0 0 calc(33.333% - 16px);
        max-width: calc(33.333% - 16px);
    }

    /* 4-column */
    .com-content-category-blog__items.masonry-4
    .com-content-category-blog__item {
        flex: 0 0 calc(25% - 18px);
        max-width: calc(25% - 18px);
    }
}

/* ── CATEGORY BLOG CARDS ─────────────────────────────────────── */

/* Card border and padding around each blog item */
.com-content-category-blog__item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Article title: dark, no blue underline */
.com-content-category-blog__item h2 {
    font-size: 1.25rem;
    margin: 0 0 14px;
}

.com-content-category-blog__item h2 a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-weight: 700;
    line-height: 1.3;
}

.com-content-category-blog__item h2 a:hover {
    color: #555 !important;
    text-decoration: none !important;
}

/* Page-header wrapper inside item: remove Bootstrap border */
.com-content-category-blog__item .page-header {
    border: none;
    margin: 0 0 12px;
    padding: 0;
}

/* Intro text */
.com-content-category-blog__item p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #444;
    margin: 0 0 16px;
}

/* Read more: subtle text, strip Bootstrap button styling */
.com-content-category-blog__item .readmore {
    margin: 0;
    padding: 0;
}

.com-content-category-blog__item .readmore a,
.com-content-category-blog__item .readmore a.btn,
.com-content-category-blog__item .readmore a.btn-secondary {
    display: inline !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #777 !important;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.2s;
}

.com-content-category-blog__item .readmore a:hover,
.com-content-category-blog__item .readmore a.btn:hover {
    color: #333 !important;
    background: none !important;
}

/* Icon next to read more */
.com-content-category-blog__item .readmore .icon-chevron-right {
    font-size: 0.75em;
    margin-right: 2px;
}

/* Page header h1 on category listing pages */
.com-content-category-blog .page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    border: none;
    margin: 0 0 24px;
    padding: 0;
}

/* ── THANKS ───────────────────────────────────────────────── */

#togan-thanks {
    padding: 20px 0;
    background: #fff;
    text-align: center;
    font-weight: 600;
}

/* ── SPONSORS ─────────────────────────────────────────────── */

#togan-sponsors { padding: 40px 0; background: #fff; }

.togan-sponsors-row {
    display: flex !important;
    flex-wrap: wrap;
    gap: 20px 30px;
    align-items: center;
    justify-content: center;
}

.togan-sponsors-row .custom {
    /* (100% - 5 gaps of 30px) / 6 columns = exactly 6 per row */
    flex: 0 0 calc((100% - 5 * 30px) / 6);
    max-width: calc((100% - 5 * 30px) / 6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.togan-sponsors-row .custom img {
    max-width: 100%;
    max-height: 110px;
    width: auto;
    height: auto;
}

/* ── FOOTER ───────────────────────────────────────────────── */

#togan-footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 50px 0 0;
    font-size: 0.9rem;
}

#footer-cols { display: flex; gap: 20px; }
.footer-col  { flex: 1; }

/* Footer column headings */
.footer-col-heading {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 14px;
    padding: 0;
    border: none;
    background: none;
    font-family: 'Nunito', sans-serif;
}

/* display:table shrinks the inner block to content width; margin:auto centres it */
.footer-col-inner {
    display: table;
    margin: 0 auto;
}

/* .custom sits inside footer-col-inner — just let it be normal block flow */
.footer-col .custom {
    display: block;
}

.footer-col .custom h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 14px;
    padding: 0;
    border: none;
    background: none;
}

/* Tighten paragraph spacing inside footer modules */
.footer-col .custom p { margin: 2px 0; }

/* Muted grey links — .footer-col a + !important beats Bootstrap's a { color: #0d6efd } */
.footer-col a {
    color: #999 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.footer-col a:hover { color: #fff !important; }

#footer-bar {
    background: #111;
    margin-top: 40px;
    padding: 14px 0;
    font-size: 0.8rem;
    color: #555;
}

.footer-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-bar-links a { color: #777; text-decoration: none; }
.footer-bar-links a:hover { color: #aaa; }

/* ── SCROLL TO TOP ────────────────────────────────────────── */

#scroll-top {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 999;
    transition: background 0.2s;
}
#scroll-top:hover { background: rgba(255,255,255,0.3); }

/* ── CONTENT UTILITY CLASSES (ported from Helix custom CSS) ─────── */

/* Used in articles and SP Page Builder content */
.centered-block {
    padding: 20px 0;
    text-align: center;
}

.poem-block {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    padding: 20px 15px;
    line-height: 1.6;
}

.thanks_padding {
    padding: 50px 50px 0 0;
    margin-top: 30px;
}

.article-full-image { text-align: center; }
.article-full-image img { display: inline-block; }

/* Green CTA button used in article content */
.my-custom-button2 {
    display: inline-block !important;
    background-color: #a2ff55 !important;
    color: #3a3837 !important;
    padding: 10px 20px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: bold !important;
}
.my-custom-button2:hover {
    background-color: #91e54c !important;
    color: #3a3837 !important;
}

@media (max-width: 768px) {
    .thanks_padding {
        padding: 10px;
        margin-top: 15px;
    }
}

/* ── HOME PAGE SPB SECTION OVERRIDES ─────────────────────────── */

/* Image hero section: fix contain+fixed+huge-margins on mobile */
@media (max-width: 767.98px) {
    #section-id-2c681f10-477d-47de-ab06-8cdc22a48233 {
        background-size: cover !important;
        background-attachment: scroll !important; /* fixed broken on iOS */
        background-position: 50% 50% !important;
        margin-top: 0 !important;
        padding-top: 40px !important;
        padding-bottom: 30px !important;
        min-height: 180px;
    }
}

/* ── CONTENT UTILITY CLASSES (ported from Helix custom CSS) ─────── */

/* Used in articles and SP Page Builder content */
.centered-block {
    padding: 20px 0;
    text-align: center;
}

.poem-block {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    padding: 20px 15px;
    line-height: 1.6;
}

.thanks_padding {
    padding: 50px 50px 0 0;
    margin-top: 30px;
}

.article-full-image { text-align: center; }
.article-full-image img { display: inline-block; }

/* Green CTA button used in article content */
.my-custom-button2 {
    display: inline-block !important;
    background-color: #a2ff55 !important;
    color: #3a3837 !important;
    padding: 10px 20px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: bold !important;
}
.my-custom-button2:hover {
    background-color: #91e54c !important;
    color: #3a3837 !important;
}

@media (max-width: 768px) {
    .thanks_padding {
        padding: 10px;
        margin-top: 15px;
    }
}

/* ── HOME PAGE SPB SECTION OVERRIDES ─────────────────────────── */

/* Image hero section: fix contain+fixed+huge-margins on mobile */
@media (max-width: 767.98px) {
    #section-id-2c681f10-477d-47de-ab06-8cdc22a48233 {
        background-size: cover !important;
        background-attachment: scroll !important; /* fixed broken on iOS */
        background-position: 50% 50% !important;
        margin-top: 0 !important;
        padding-top: 40px !important;
        padding-bottom: 30px !important;
        min-height: 180px;
    }
}


/* ── BLOG INTRO IMAGES (figure.item-image) ─────────────────────────────── */

.com-content-category-blog__item figure.item-image {
    margin: 0 0 15px 0;
    padding: 0;
    width: 100%;
    text-align: center;
    float: none !important; /* override Joomla's left/right float in card layout */
}

.com-content-category-blog__item figure.item-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
    display: block;
}

/* Push image flush to card top (remove card's own top padding above image) */
.com-content-category-blog__item .blog-card:has(figure.item-image) {
    padding-top: 0;
}

@media (max-width: 767.98px) {
    .com-content-category-blog__item figure.item-image img {
        height: 180px;
    }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */

@media (max-width: 900px) {

    /* Header */
    #togan-logo img  { height: 50px; }
    .header-inner    { padding: 10px 0; }
    .header-social   { display: none; }
    .header-contact  { display: none; }
    #togan-nav       { display: none; } /* desktop nav hidden; drawer used instead */
    .nav-toggle      { display: flex; }

    /* Slide-in drawer */
    #nav-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 65%;
        max-width: 320px;
        background: #fff;
        z-index: 100;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        padding: 0;
    }

    #nav-drawer.open { transform: translateX(0); }

    /* Close button */
    #drawerClose {
        position: absolute;
        top: 14px;
        right: 14px;
        background: none;
        border: none;
        font-size: 1.8rem;
        line-height: 1;
        color: #aaa;
        cursor: pointer;
        padding: 4px 8px;
        transition: color 0.2s;
    }
    #drawerClose:hover { color: #333; }

    /* Logo inside drawer */
    .drawer-logo {
        padding: 20px 24px 16px;
        border-bottom: 1px solid #eee;
    }
    .drawer-logo img { height: 44px; }
    .drawer-logo a   { display: block; line-height: 0; }

    /* Nav items */
    .drawer-nav {
        list-style: none;
        margin: 0;
        padding: 8px 0;
        flex: 1;
    }

    .drawer-nav li a {
        display: block;
        padding: 14px 24px;
        color: #555;
        font-size: 1.05rem;
        font-weight: 400;
        text-decoration: none;
        transition: background 0.15s, color 0.15s;
    }

    .drawer-nav li a:hover,
    .drawer-nav li.active a {
        background: #f5f5f5;
        color: #111;
    }

    /* Contact info */
    .drawer-contact {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 14px 24px;
        border-top: 1px solid #eee;
    }

    .drawer-contact a {
        color: #666;
        font-size: 0.85rem;
        text-decoration: none;
        padding: 4px 0;
    }
    .drawer-contact a:hover { color: #333; }
    .drawer-contact i { margin-right: 6px; width: 14px; }

    /* Social icons */
    .drawer-social {
        display: flex;
        gap: 18px;
        padding: 14px 24px 24px;
        border-top: 1px solid #eee;
    }

    .drawer-social a {
        color: #777;
        font-size: 1.2rem;
        text-decoration: none;
        transition: color 0.2s;
    }
    .drawer-social a:hover { color: #333; }

    /* Other responsive */
    .with-sidebar  { flex-direction: column; }
    #footer-cols   { flex-direction: column; gap: 30px; }
    .footer-bar-inner { flex-direction: column; text-align: center; }

    .blog .items-row { display: block !important; }
    .blog .item-col  { max-width: 100% !important; }
}
