/*************************************
** TYPOGRAPHY & GENERAL STYLES      **
*************************************/
:root {
    --primary: #76C21E;
    --primary-dark: #1D4F1F;
    --navy: #0057A8;
    --orange: #F7941D;
    --secondary: #A7D52F;
    --yellow: #FFD200;
    --red: #E53935;

    --gray-700: #5F6368;
    --gray-200: #E8ECE7;
    --background: #F8FAF5;
    --surface: #FFFFFF;

    --font-heading: "Inter", sans-serif;
    --font-body: "Montserrat", sans-serif;
}

body {
    font-family: var(--font-body);
    color: #555;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}

img {
    max-width: 100%;
    height: auto;
}

header {
    background: var(--gray-200);
    color: var(--navy);
    box-shadow: 0px 3px 16px black;
}

.navbar-brand {
    max-width: 300px;
}

.topbar {
    background: #fff;
    color: #000;
    padding: 10px 0;
    font-size: 13px
}

.topbar a {
    color: #000
}

.logo-placeholder {
    width: 220px;
    height: 70px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center
}

.navbar-nav>.nav-item>.nav-link {
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-700);
}

/* Scope the underline/hover effect to TOP-LEVEL nav items only */
.navbar-nav>.nav-item>.nav-link:hover,
.navbar-nav>.nav-item.active>.nav-link {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

/* Explicitly cancel it for anything inside a dropdown (2nd/3rd level) */
.dropdown-menu .nav-link:hover,
.dropdown-menu .nav-link.dropdown-toggle:hover,
.dropdown-menu .active .nav-link,
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item.active {
    border-bottom: none;
    color: var(--primary);
}

/* ===== 3RD-LEVEL DROPDOWN FIX (desktop) ===== */

/* Nested dropdown-menu should flyout to the side, not stack below */
.dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.5rem;
    margin-left: 0;
}

.dropdown-menu .dropdown-menu.show {
    display: block;
}

.dropdown-menu>.nav-item.dropdown {
    position: relative;
    padding-left: .65rem;
}

.navbar,
.navbar .collapse,
.dropdown-menu {
    overflow: visible;
}

.dropdown-menu>.dropdown>.dropdown-toggle::after {
    transform: rotate(-90deg);
    margin-left: 0.5rem;
}

.dropdown-menu .dropdown-menu.dropdown-menu-flip {
    left: auto;
    right: 100%;
}

/* ===== MOBILE MENU FIX ===== */
@media (max-width: 991.98px) {

    /* On mobile, submenus should NOT flyout — they should expand inline */
    .dropdown-menu .dropdown-menu {
        position: static;
        left: auto;
        top: auto;
        margin: 0;
        width: 100%;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        /* indent to show hierarchy */
    }

    /* Collapsed by default */
    .dropdown-menu .dropdown-menu:not(.show) {
        display: none;
    }

    /* Top-level dropdown-menu also needs to behave inline in the mobile collapse */
    .navbar-collapse .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        box-shadow: none;
        border: none;
    }

    /* Give nested toggles a bit more tap area on touch devices */
    .dropdown-menu .dropdown-toggle {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    /* Rotate the caret back down on mobile (no side-flyout there) */
    .dropdown-menu>.dropdown>.dropdown-toggle::after {
        transform: none;
    }
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    transform: scale(1.4);
}

/* MODULE STYLING */

.moduletable {
    margin-bottom: 3rem;
}

.moduletable h3 {
    padding: 0;
    color: var(--navy);
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.03em;
    position: relative;
}

.moduletable h3::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    margin-top: 0.75rem;
    background: var(--primary);
    border-radius: 2px;
}


/* HERO SECTION */
.hero {
    max-height: 80vh;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: auto;
}

.hero h2 {
    color: #fff;
    text-transform: uppercase;
    font-size: 4rem;
}

.hero p {
    color: #fff;
    font-size: 2rem;
}

/* HERO */
.hero .moduletable {
    margin: 0;
}

.hero #mod-custom129>div {
    position: relative;
    overflow: hidden;
}

.hero #mod-custom129 img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Dark overlay so white text stays readable over any part of the image */
.hero #mod-custom129>div::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.4) 100%);
}

.hero #mod-custom129 h3,
.hero #mod-custom129 h2 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    text-align: left;
    color: #fff;
    margin: 0;
    z-index: 1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero #mod-custom129 h3 {
    top: 38%;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero #mod-custom129 h3:after {
    display: none;
}

.hero #mod-custom129 h2 {
    top: 48%;
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 2px;
    border-bottom: 3px solid var(--primary);
}

@media (max-width: 767px) {
    .hero #mod-custom129 h2 {
        font-size: 2rem;
    }

    .hero #mod-custom129 h3 {
        font-size: 0.9rem;
    }
}

/* Sidebar */
aside {
    padding: 2rem 3rem;
    border-left: 5px solid var(--primary);
    border-radius: 1rem;

    background:
        linear-gradient(90deg,
            rgba(118, 194, 30, .16) 0%,
            rgba(118, 194, 30, .08) 18%,
            #fff 100%);

    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

/* CONTENT */
.layout-blog .blog-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.layout-blog .blog-items.items-leading {
    grid-template-columns: repeat(1, 1fr);
}

@media (max-width: 991px) {
    .layout-blog .blog-items {
        grid-template-columns: 1fr;
    }
}

.blog-item {
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 3rem;
    font-weight: 100;
}

.item-image {
    margin: 0 0 1.5rem;
}

.item-image img {
    border-radius: 5px;
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.486);
}

.page-header {
    margin-bottom: 1rem;
}


.float-end>div>a[aria-describedby^="editarticle"] {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    background: #f5f5f5;
    border-radius: 4px;
    color: #333;
}

.float-end>div>a[aria-describedby^="editarticle"]:hover {
    background: #e5e5e5;
    color: #000;
}

.float-end>div>a[aria-describedby^="editarticle"] .icon-edit {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
}

.float-end>div>a[aria-describedby^="editarticle"] [role="tooltip"] {
    display: none;
}

.float-end>div>a[aria-describedby^="editarticle"] {
    font-size: 0;
}

.float-end>div>a[aria-describedby^="editarticle"] .icon-edit {
    font-size: 1rem;
}


/* Modal */
.sp-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.sp-modal.is-open {
    display: flex;
}

.sp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.sp-modal-dialog {
    position: relative;
    z-index: 10000;
    background: #fff;
    border-radius: 4px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.sp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ddd;
}

.sp-modal-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.sp-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: #666;
}

.sp-modal-close:hover {
    color: #000;
}

.sp-modal-body {
    padding: 1rem;
    overflow-y: auto;
}


/* Footer */
footer.footer {
    padding: 4rem 0 2rem;
    background: linear-gradient(180deg,
            #0d1b2a 0%,
            #08131f 100%);
    color: rgba(255, 255, 255, .85);
}

footer .moduletable {
    margin-bottom: 2rem;
}

footer h3 {
    margin-bottom: 1.5rem !important;
    margin-left: 0 !important;
    color: #fff !important;
    font-size: 1.25rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}


footer .navbar-nav {
    display: block;
}

footer .nav-item {
    margin-bottom: .6rem;
}

footer .nav-link {
    display: inline-block;
    padding: 0 !important;

    color: rgba(255, 255, 255, .75);
    text-transform: none;
    letter-spacing: 0;
    font-size: 1rem;

    transition: color .2s ease,
        transform .2s ease;
}

footer .nav-link:hover {
    color: var(--orange);
    transform: translateX(4px);
}

footer .mod-custom img {
    max-width: 220px;
    margin-bottom: 1rem;
}

footer p {
    color: rgba(255, 255, 255, .75);
    line-height: 1.7;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footerpt {
    margin: 0;
    font-size: .9rem;
    color: rgba(255, 255, 255, .6);
}

.social-link {
    display: flex;
    justify-content: flex-start;
    gap: .75rem;

    margin: 0;
    padding: 0;
    list-style: none;
}

/* Buttons */
.btn,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;

    padding: .8rem 1.6rem;

    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);

    border-radius: 6px;

    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color .25s ease,
        border-color .25s ease,
        color .25s ease,
        transform .2s ease,
        box-shadow .25s ease;
}

.btn:hover,
.btn:focus-visible,
.button:hover,
.button:focus-visible {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;

    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 79, 31, .25);
}

.btn:active,
.button:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(29, 79, 31, .2);
}

.btn:focus-visible,
.button:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(118, 194, 30, .3),
        0 8px 20px rgba(29, 79, 31, .25);
}

.btn:disabled,
.button:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* ==================================================
   Contact Page
   ================================================== */

.com-contact {
    max-width: 1200px;
    margin: 0 auto;
}

/* Page title */

.com-contact .page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.com-contact .contact-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary, #4F5D75);
}

/* ==================================================
   Contact Information
   ================================================== */

.com-contact__container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    padding: 2rem;
    margin-bottom: 3rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.com-contact__container h2 {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--primary, #4F5D75);
}

.com-contact__thumbnail {
    text-align: center;
}

.com-contact__thumbnail img {
    max-width: 180px;
    width: 100%;
    height: auto;
}

.contact-address {
    margin: 0;
}

.contact-address dt {
    display: none;
}

.contact-address dd {
    margin: 0 0 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-address a {
    color: var(--primary, #4F5D75);
    text-decoration: none;
}

.contact-address a:hover {
    text-decoration: underline;
}

/* ==================================================
   Contact Form Card
   ================================================== */

.contact-form form {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

/* Hide old Joomla legend */

.contact-form legend {
    display: none;
}

.field-spacer {
    display: none;
}

/* Form fields */

.contact-form .control-group {
    margin-bottom: 1.5rem;
}

.contact-form .control-label {
    margin-bottom: .5rem;
}

.contact-form .control-label label {
    display: block;
    font-weight: 600;
    color: #333;
}

.contact-form .controls {
    width: 100%;
}

.contact-form .form-control {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d9dee3;
    border-radius: .5rem;
    padding: .75rem 1rem;
    transition: all .2s ease;
}

.contact-form textarea.form-control {
    min-height: 180px;
    resize: vertical;
}

.contact-form .form-control:focus {
    border-color: var(--primary, #4F5D75);
    box-shadow: 0 0 0 .25rem rgba(79, 93, 117, .15);
    outline: none;
}

/* Required star */

.contact-form .star,
.contact-form .red {
    color: #dc3545;
}

/* Submit button */

.contact-form .btn-primary {
    min-width: 220px;
    min-height: 50px;
    border-radius: .5rem;
    font-weight: 600;
    border: 0;
    background: var(--primary, #4F5D75);
}

.contact-form .btn-primary:hover {
    background: #3d4a61;
}

/* ==================================================
   Mobile
   ================================================== */

@media (max-width: 768px) {

    .com-contact__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .com-contact .contact-name {
        font-size: 2rem;
    }

    .contact-form form {
        padding: 1.5rem;
    }

    .contact-form .btn-primary {
        width: 100%;
    }
}