/* ========================================================================
   THE TEXAS ASSEMBLY — CUSTOM FRONTEND & ADMIN UI STYLING
   Engineered by James Allen Homyak (on Minnesota) — June 2026
   This file overrides template defaults safely and cleanly.
   ======================================================================== */

/* ========================================================================
   1. HEADER BRANDING — LOGO + TAGLINE
   ======================================================================== */

/* Center the entire branding block */
.container-header .navbar-brand {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo image size */
.container-header .navbar-brand img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

/* Tagline with gold shadow (right + bottom only) */
.container-header .navbar-brand .site-description {
    font-style: italic;
    color: #000;
    margin-top: 5px;
    text-shadow:
        0.1rem 0   #d4af37,
        0   0.1rem #d4af37;
}

/* Remove underline from logo link */
.container-header .navbar-brand a {
    text-decoration: none !important;
}

/* Header background white */
.container-header {
    background-color: #ffffff !important;
    background-image: none !important;
}

/* ========================================================================
   2. MENU LAYOUT — CENTERED HORIZONTAL NAVIGATION
   ======================================================================== */

.container-header .container-nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

.container-header .mod-menu {
    display: flex;
    gap: 2px;
}

/* ========================================================================
   3. MENU ITEMS — DEFAULT STATE
   ======================================================================== */

.container-header .mod-menu a {
    font-weight: 600 !important;
    color: #333333 !important;
    padding: 10px 1px !important;
    border-radius: 5px !important;
    border: 0.1rem solid transparent !important;
    background-color: transparent !important;
    text-decoration: none !important;
    display: inline-block;
    white-space: nowrap !important;
}

/* Hover: gold text */
.container-header .mod-menu a:hover {
    color: #d4af37 !important;
}

/* Active menu item — matches top menu gold */
.container-header .mod-menu li.current a,
.container-header .mod-menu li.active a {
    background-color: #d4af37 !important;
    color: #ffffff !important;
    border-color: #d4af37 !important;
}

/* ========================================================================
   4. THREE‑COLUMN LAYOUT — RESPONSIVE, CENTERED, BALANCED
   ======================================================================== */

.three-col-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 40px;
    margin: 40px auto;
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

/* Each column */
.three-col-item {
    flex: 1 1 0;
    min-width: 220px;
}

/* Title text */
.col-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Subtitle text */
.col-sub {
    font-size: 1rem;
    color: #555;
}

/* Responsive stacking */
@media (max-width: 768px) {
    .three-col-wrapper {
        flex-direction: column !important;
        gap: 25px;
    }
}

/* ========================================================================
   5. GLOBAL LINK STYLING — SITE‑WIDE BLACK LINKS
   ======================================================================== */

a,
a:link,
a:visited {
    color: #000 !important;
    text-decoration: none;
}

/* ========================================================================
   6. HORIZONTAL RULE — THICK BLACK LINE
   ======================================================================== */

hr {
    border: 0;
    height: 5px;
    background: #000;
    margin: 0;
}

/* ========================================================================
   7. JOOMLA ADMIN UI — GOLD HOVER BUTTONS
   Matches top menu gold (#d4af37)
   ======================================================================== */

/* Hover state — metallic gold + white text */
.btn:hover,
.button:hover,
.btn-primary:hover,
.btn-success:hover,
.button-new:hover,
.button-save:hover,
.button-apply:hover,
.btn-toolbar .btn:hover {
    background-color: #d4af37 !important;
    border-color: #d4af37 !important;
    color: #ffffff !important;
}

/* ========================================================================
   8. DONATE BUTTON
   ======================================================================== */

.donate-button a {
    display: inline-block;
    background: #28a745;          /* Green */
    color: #fff !important;       /* WHITE TEXT */
    padding: 14px 22px;
    font-size: 20px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid #fff;
    font-weight: 400;
}

.donate-button a:hover {
    background: #23963e;          /* Slightly darker green */
    color: #fff !important;
}

.donate-button a:visited {
    color: #fff !important;       /* KEEP WHITE AFTER VISITING */
}

.donate-button i {
    margin-right: 8px;
    color: #fff !important;       /* Ensures the icon stays white too */
}

/* ========================================================================
   9. QUICK WAY / SLOWER WAY BOXES
   ======================================================================== */

.quick-way {
    text-align: center;
    margin: 10px 0;
    color: #fff;
    font-family: Poppins, sans-serif;
}

.slower-way {
    text-align: center;
    margin: 10px 0;
    color: #000;
    font-family: Poppins, sans-serif;
}

.quick-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.quick-box {
    background: #e8f3f0;          /* light green/blue */
    border: 1px solid #000;
    border-radius: 10px;
    padding: 10px;
    width: 220px;
    height: 300px;
    color: #000;
    text-align: center;
}

.qb-num {
    font-size: 40px;
    font-weight: 700;
}

.qb-gender {
    font-size: 22px;
    margin-bottom: 10px;
}

.qb-title {
    font-size: 18px;
    font-weight: 700;
    margin: 10px 0;
}

.qb-download {
    display: inline-block;
    background: #1f8a39;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid #fff;
    margin: 10px 0;
}

.qb-download:hover {
    background: #18702f;
}

.quick-box p {
    margin-top: 5px;
    line-height: 1.3;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
    .quick-row,
    .three-col-wrapper {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .quick-row > *,
    .three-col-wrapper > .col {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-bottom: 20px; /* clean spacing between stacked sections */
    }

    .col-3,
    .col-2,
    .col-1 {
        text-align: center !important;
    }
}

/* Jiggle animation on quick boxes */
.quick-box:hover {
    animation: jiggle 1s cubic-bezier(.36,.07,.19,.97);
}

@keyframes jiggle {
    0%   { transform: rotate(0deg); }
    12%  { transform: rotate(4deg); }
    24%  { transform: rotate(-4deg); }
    36%  { transform: rotate(4deg); }
    48%  { transform: rotate(-4deg); }
    60%  { transform: rotate(2deg); }
    72%  { transform: rotate(-2deg); }
    84%  { transform: rotate(1deg); }
    100% { transform: rotate(0deg); }
}

/* ========================================================================
   10. WELCOME BOXES & TITLES
   ======================================================================== */

.welcome-box {
    background: #e8f3f0;     /* pale green/blue */
    border: 1px solid #000;
    border-radius: 10px;
    padding: 25px;
    margin: 30px auto;
    max-width: 100%;
    color: #000;
    font-family: Poppins, sans-serif;
    text-align: justify;
}

.welcome-box h2 {
    margin-top: 0;
    font-size: 28px;
    font-weight: 700;
}

.welcome-box p {
    line-height: 1.4;
    margin: 15px 0;
}

.section-title {
    background: #d4af37;      /* classic metallic gold */
    color: #fff;              /* white text */
    font-size: 18px;
    font-weight: 700;
    padding: 10px 20px;
    margin: 20px auto;        /* centers the bar */
    max-width: 50%;
    border-radius: 40px;
    text-align: center;
    font-family: Poppins, sans-serif;
    display: block;
}

.texas-welcome {
    background: linear-gradient(90deg, #0b3d2e, #3fa34d); /* pine → natural green */
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    padding: 15px 30px;
    margin: 20px auto;
    width: 50%;              /* half the page */
    border-radius: 40px;
    text-align: center;
    font-family: Poppins, sans-serif;
    display: block;
}

/* ========================================================================
   11. BANNER & MISSION TEXT
   ======================================================================== */

.gfg-banner {
    width: 100%;
    background: #000;
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    font-family: Poppins, sans-serif;
}

.gfg-banner h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.gfg-banner p {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
}

.wb-stl-heading1 {
    text-shadow: 0.1rem 0.1rem 0 #068839;
}

.mission-text {
    margin: 20px 0;
}

/* ========================================================================
   12. FAQ GRID
   ======================================================================== */

/* Desktop / Default */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* FAQ item */
.qa-question {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f7f7f7;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.3;
    transition: background 0.2s;
}

/* Icon */
.qa-icon {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 20px;
}

/* MOBILE: stack vertically */
@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 14px;
    }

    .qa-question {
        width: 100%;
        font-size: 18px;
        padding: 16px;
        text-align: left;
    }
}

/* MOBILE: force 1-column FAQ layout with strong overrides */
@media (max-width: 768px) {
    .faq-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        gap: 14px !important;
    }

    .faq-grid > .qa-question {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 16px !important;
    }
}

/* ========================================================================
   13. STICKY MENU (TOP NAV)
   ======================================================================== */

.sticky-menu {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Ensure no parent breaks sticky */
.sticky-menu,
.container-topbar,
body,
html {
    overflow: visible !important;
}

.sticky-menu .mod-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center; /* or space-between */
    align-items: center;
    gap: 20px; /* spacing between menu items */
}

.sticky-menu .mod-menu li {
    list-style: none;
    display: inline-block;
}

/* Base link style */
.sticky-menu .mod-menu a {
    display: block;
    padding: 10px 14px;
    font-weight: 700;
    color: var(--cassiopeia-color-primary, #001B4C);
    border-radius: 4px;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease;
}

/* Kill underline on all states */
.sticky-menu .mod-menu a,
.sticky-menu .mod-menu a:visited,
.sticky-menu .mod-menu a:hover,
.sticky-menu .mod-menu a:focus {
    text-decoration: none !important;
}

/* Hover = gold text, no background */
.sticky-menu .mod-menu a:hover {
    color: #d4af37 !important;   /* gold text */
    background: transparent !important;
}

/* Active (selected) state: gold background + white text */
.sticky-menu .mod-menu li.current a,
.sticky-menu .mod-menu li.active a {
    background: #d4af37;
    color: #fff;
    font-weight: 700;
}

/* Remove underline on focus */
.sticky-menu .mod-menu a:focus {
    outline: none;
    text-decoration: none;
}

/* --- Hamburger button --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: #001B4C;
    transition: 0.3s ease;
}

/* --- Mobile layout --- */
@media (max-width: 992px) {

    /* Show hamburger, hide horizontal menu */
    .hamburger {
        display: flex;
    }

    .sticky-menu .container-nav {
        display: none;
        flex-direction: column;
        background: #fff;
        width: 100%;
        padding: 10px 0;
    }

    /* When menu is open */
    .sticky-menu.open .container-nav {
        display: flex;
    }

    /* Vertical menu items */
    .sticky-menu .mod-menu {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .sticky-menu .mod-menu a {
        padding: 12px 20px;
        font-size: 1.1rem;
    }

    /* Hamburger animation */
    .sticky-menu.open .hamburger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .sticky-menu.open .hamburger span:nth-child(2) {
        opacity: 0;
    }
    .sticky-menu.open .hamburger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* ========================================================================
   14. TOOLTIP STYLING (ARTICLE NAV & PAGENAVIGATION)
   ======================================================================== */

/* Tooltip for Joomla Next/Previous navigation */
.article-navigation a[title] {
    position: relative;
    text-decoration: none;
}

.article-navigation a[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: -40px;
    left: 0;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.85rem;
    z-index: 9999;
    opacity: 1;
}

.article-navigation a[title]:hover::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 10px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Tooltip for Joomla 5 Next/Prev navigation */
.pagenavigation a {
    position: relative;
    text-decoration: none;
}

/* Tooltip bubble */
.pagenavigation a:hover::after {
    content: attr(data-tip);
    position: absolute;
    top: -40px;
    left: 0;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.85rem;
    z-index: 9999;
}

/* Tooltip arrow */
.pagenavigation a:hover::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 10px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Mobile fix for tooltip positioning */
@media (max-width: 768px) {
    .pagenavigation a:hover::after {
        left: auto;
        right: 0;
        top: -50px;
        transform: translateX(0);
        max-width: 200px;
        text-align: right;
    }

    .pagenavigation a:hover::before {
        left: auto;
        right: 10px;
    }
}

/* MOBILE TOOLTIP FIXES */
@media (max-width: 768px) {

    /* NEXT BUTTON — tooltip flips left */
    .pagenavigation a.next:hover::after {
        left: auto;
        right: 0;
        top: -50px;
        max-width: 200px;
        text-align: right;
    }

    .pagenavigation a.next:hover::before {
        left: auto;
        right: 10px;
    }

    /* PREVIOUS BUTTON — tooltip flips right */
    .pagenavigation a.previous:hover::after {
        left: 0;
        right: auto;
        top: -50px;
        max-width: 200px;
        text-align: left;
    }

    .pagenavigation a.previous:hover::before {
        left: 10px;
        right: auto;
    }
}

/* ========================================================================
   15. ACTION BOXES (GREY JITTERY BOXES)
   ======================================================================== */

.action-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin: 30px 0;
}

.action-box {
    background: #f2f2f2;
    color: #000;
    padding: 25px;
    border-radius: 10px;
    width: 100%;
    max-width: 310px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action-box:hover {
    transform: translateY(-3px) rotate(-1deg);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.action-box h3 {
    margin-top: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.action-box p {
    margin-bottom: 15px;
    line-height: 1.4;
}

.more-info {
    display: inline-block;
    background: #fff;
    color: #3cb371;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.more-info:hover {
    background: #2e8b57;
    color: #fff;
}

/* ========================================================================
   16. TWO-COLUMN ACCOUNTS BOX
   ======================================================================== */

.two-col-box {
    display: flex;
    background: #3cb371;
    border-radius: 10px;
    padding: 25px;
    gap: 25px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.col-left {
    flex: 0 0 40%;
    min-height: 120px;
}

.col-right {
    flex: 0 0 80%;
}

.acct-heading {
    color: #fff;
    margin-top: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.col-right p {
    color: #000;
    margin-bottom: 15px;
    line-height: 1.45;
}

/* Pill buttons */
.pill-btn {
    display: inline-block;
    background: #fff;
    color: #3cb371;
    padding: 10px 18px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    margin: 6px 6px 0 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.pill-btn:hover {
    background: #2e8b57;
    color: #fff;
}

/* Mobile stacking */
@media (max-width: 768px) {
    .col-left,
    .col-right {
        flex: 0 0 100%;
    }
}
