/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark-gray: #1a1a1a;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --black: #000000;
    --accent: #333333;
    --text-dark: #2c2c2c;
    --text-light: #666666;
}

body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    padding-top: 0;
}

body.offcanvas-open {
    overflow: hidden;
    padding-right: 0;
}

/* Global Link Styles - All links black */
a {
    color: var(--black) !important;
    text-decoration: underline;
}

a:link,
a:visited {
    color: var(--black) !important;
}

a:hover,
a:active {
    color: var(--dark-gray) !important;
}

/* Exceptions for specific link types */
.topic-card a,
.header-link {
    text-decoration: none;
}

/* Info bar links - white */
.info-bar a,
.info-bar .info-bar-link {
    color: var(--white) !important;
    text-decoration: none;
}

/* Footer links - white */
.footer-section a,
.footer-section .social-icon {
    color: var(--white) !important;
    text-decoration: none;
}

.topic-card a:hover,
.header-link:hover,
.info-bar a:hover,
.footer-section a:hover {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}



.social-icon {
    color: var(--white) !important;
    transition: transform 0.3s ease;
    display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
    .social-icon:hover {
        transform: scale(1.2);
    }
}

/* Header */
.header {
    background-color: #f1ece2;
    color: var(--dark-gray);
    padding: 5px 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    width: 100%;
    box-sizing: border-box;
    overflow: visible !important;
    position: relative;
}

body.search-open .header {
    z-index: 999 !important;
}

body.search-open .desktop-nav {
    z-index: 998 !important;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    padding-top: 5px;
    overflow: visible !important;
}

.header-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(21, 33, 61, 0.3), rgba(0, 0, 0, 0.3), rgba(21, 33, 61, 0.3));
    display: none;
}

/* Info Bar */
.info-bar {
    background-color: #15213d;
    color: var(--white);
    width: 100%;
    box-sizing: border-box;
}

.info-bar .container {
    max-width: 100%;
    padding-left: 5px;
    padding-right: 5px;
}

/* Desktop Info Bar */
.info-bar-desktop {
    display: none;
}

.info-bar-content-desktop {
    display: flex;
    align-items: center;
    padding: 12px 0;
    width: 100%;
}

.info-bar-content-desktop .info-bar-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    position: relative;
    box-sizing: border-box;
}

.info-bar-content-desktop .info-bar-item:first-child {
    padding-left: 15px;
}

.info-bar-content-desktop .info-bar-item:last-child {
    padding-right: 0;
}

.info-bar-content-desktop .info-bar-item:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    background-color: rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
    will-change: transform;
    backface-visibility: hidden;
}

.info-bar-content-desktop .info-bar-social,
.info-bar-content-desktop .info-bar-text,
.info-bar-content-desktop .info-bar-email,
.info-bar-content-desktop .info-bar-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.info-bar-content-desktop .info-bar-social {
    gap: 15px;
}

.info-bar-content-desktop .info-bar-text {
    color: var(--white) !important;
    font-size: 16px;
    text-align: center;
}

.info-bar-content-desktop .info-bar-text span {
    color: var(--white) !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

/* Mobile Info Bar */
.info-bar-mobile {
    display: block;
}

.info-bar-content-mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
}

.info-bar-content-mobile .info-bar-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
}


.info-bar-content-mobile .info-bar-section:last-child {
    border-bottom: none;
}

.info-bar-content-mobile .info-bar-social,
.info-bar-content-mobile .info-bar-text,
.info-bar-content-mobile .info-bar-email,
.info-bar-content-mobile .info-bar-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.info-bar-content-mobile .info-bar-social {
    gap: 15px;
}

.info-bar-content-mobile .info-bar-text {
    color: var(--white) !important;
    font-size: 14px;
    text-align: center;
}

.info-bar-content-mobile .info-bar-text span {
    color: var(--white) !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.info-bar-social .social-icon {
    color: var(--white) !important;
}


.info-bar-email .info-bar-link,
.info-bar-phone .info-bar-link {
    white-space: nowrap;
    font-size: clamp(10px, 1.2vw, 14px);
}

.info-bar-content-desktop .info-bar-email .info-bar-link,
.info-bar-content-desktop .info-bar-phone .info-bar-link {
    font-size: clamp(10px, 1.2vw, 14px);
}

.info-bar-content-mobile .info-bar-email .info-bar-link,
.info-bar-content-mobile .info-bar-phone .info-bar-link {
    font-size: 15px;
}


.info-bar-link {
    color: var(--white) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.info-bar-link span {
    color: var(--white) !important;
}

.info-bar-link:hover {
    text-decoration: none;
    opacity: 0.9;
}

.info-bar-link:hover span {
    color: var(--white) !important;
}

.info-bar-link svg {
    flex-shrink: 0;
}

.header-logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    height: 180px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.desktop-nav {
    display: none;
    gap: 30px;
    padding: 15px 8px;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex: 1;
    justify-content: center;
    position: relative;
    z-index: 9998;
    overflow: visible !important;
}

.nav-item {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 10px;
    transition: color 0.3s ease;
    z-index: 10;
    display: inline-block;
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #15213d;
    border-radius: 8px;
    transition: height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: -1;
}

@media (hover: hover) and (pointer: fine) {
    .nav-item:hover {
        color: var(--white) !important;
        transform: scale(1.05);
        position: relative;
        z-index: 10;
    }
    
    .nav-item:hover::before {
        height: 100%;
        opacity: 1;
        z-index: -1;
    }
}

/* Desktop Navigation Dropdown */
.nav-item-dropdown {
    position: relative;
}

.nav-item-link {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 10px;
    transition: color 0.3s ease;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-item-link .dropdown-arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .nav-item-link .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-item-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #15213d;
    border-radius: 8px;
    transition: height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: -1;
}

@media (hover: hover) and (pointer: fine) {
    .nav-item-dropdown:hover .nav-item-link {
        color: var(--white) !important;
        transform: scale(1.05);
        position: relative;
        z-index: 10;
    }
    
    .nav-item-dropdown:hover .nav-item-link::before {
        height: 100%;
        opacity: 1;
        z-index: -1;
    }
}

/* Dropdown Menu - Absolute positioning relative to parent */
.dropdown-menu {
    position: absolute;
    background-color: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: max-content;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 10000;
}


.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 400;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-item .dropdown-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: contain;
    object-position: center;
    border-radius: 4px;
    flex-shrink: 0;
    order: 2;
    background-color: transparent;
    padding: 0;
    display: block;
}

.dropdown-item span {
    order: 1;
}

.dropdown-item:hover {
    background-color: rgba(21, 33, 61, 0.1);
    color: var(--dark-gray);
}

.header-actions {
    display: none;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.header-link {
    color: var(--white) !important;
    text-decoration: none;
    font-size: 16px;
    position: relative;
}

.search-icon-btn {
    position: relative;
    background: none !important;
    border: none !important;
    padding: 5px;
    cursor: pointer;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .search-icon-btn:hover {
        transform: scale(1.15);
    }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-gray);
}

.mobile-menu-wrapper {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mobile-menu-item,
.mobile-search-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.mobile-menu-label,
.mobile-search-label {
    font-size: 14px;
    color: var(--dark-gray);
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-menu-label:hover,
.mobile-search-label:hover {
    color: var(--text-dark);
}

.mobile-search-icon {
    background: none !important;
    border: none !important;
    padding: 5px;
    cursor: pointer;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.mobile-nav-row {
    display: none;
}

.mobile-nav-row-first {
    display: none;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 5px;
    padding-bottom: 5px;
    margin-top: 15px;
}

.mobile-auth-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.mobile-header-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mobile-header-link {
    color: var(--dark-gray) !important;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid rgba(21, 33, 61, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-header-link:hover {
    border-color: rgba(21, 33, 61, 0.4);
    background-color: rgba(21, 33, 61, 0.05);
}


/* Offcanvas Overlay - Not needed since offcanvas covers full screen */
.offcanvas-overlay {
    display: none !important;
}

/* Offcanvas - Appears above dimmed overlay */
.offcanvas {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    height: 100vh;
    background-color: var(--white);
    transform: translateY(100%);
    transition: transform 0.2s ease;
    z-index: 2000;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    will-change: transform;
}

.offcanvas.open {
    transform: translateY(0);
    display: block;
}

@media (min-width: 768px) {
    .offcanvas-overlay,
    .offcanvas {
        display: none !important;
    }
    
    .desktop-nav {
        display: flex;
    }
    
    .header-actions {
        display: flex;
    }
}

@media (max-width: 767px) {
    .offcanvas-overlay {
        display: block;
    }
    
    .offcanvas {
        display: block;
        height: 100vh;
    }
}

.offcanvas-nav {
    height: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.offcanvas-header {
    position: relative;
    flex-shrink: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

.offcanvas-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 2001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.offcanvas-close span,
.offcanvas-close span::before,
.offcanvas-close span::after {
    content: "";
    position: absolute;
    height: 4px;
    width: 30px;
    background: var(--dark-gray);
    transition: background 0.3s, transform 0.3s;
}

.offcanvas-close span {
    background: transparent;
    opacity: 1;
}

.offcanvas-close span::before {
    transform: rotate(-45deg);
}

.offcanvas-close span::after {
    transform: rotate(45deg);
}

.offcanvas.open .offcanvas-close {
    opacity: 1;
    transition-delay: 0.1s;
}

.offcanvas.open .offcanvas-close span {
    background: transparent;
}

.offcanvas.open .offcanvas-close span::before {
    transform: rotate(-45deg);
}

.offcanvas.open .offcanvas-close span::after {
    transform: rotate(45deg);
}

.offcanvas-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 30px 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    flex-shrink: 0;
}

.offcanvas.open .offcanvas-logo {
    opacity: 1;
    transition-delay: 0.1s;
}

.offcanvas-logo img {
    max-width: 280px;
    width: auto;
    height: auto;
    max-height: 160px;
    object-fit: contain;
}

.offcanvas-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex-grow: 1;
    padding-top: 0;
}

.offcanvas-menu-list li {
    cursor: pointer;
    padding: 10px 0;
    transform: translateX(-30px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    text-align: center;
    width: 100%;
}

.offcanvas.open .offcanvas-menu-list li {
    opacity: 1;
    transform: translateX(0);
}

.offcanvas.open .offcanvas-menu-list li:nth-child(1) {
    transition-delay: 0.1s;
}

.offcanvas.open .offcanvas-menu-list li:nth-child(2) {
    transition-delay: 0.2s;
}

.offcanvas.open .offcanvas-menu-list li:nth-child(3) {
    transition-delay: 0.3s;
}

.offcanvas.open .offcanvas-menu-list li:nth-child(4) {
    transition-delay: 0.4s;
}

.offcanvas.open .offcanvas-menu-list li:nth-child(5) {
    transition-delay: 0.5s;
}

.offcanvas-item {
    font-size: 1.4rem;
    line-height: 1.5;
    font-weight: 400;
    color: var(--dark-gray);
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.offcanvas-item:hover {
    color: var(--accent);
}

@keyframes hover {
    50% {
        transform: translateX(10px);
    }
}

.offcanvas-menu-list > li:not(.offcanvas-item-dropdown):hover {
    animation: hover 0.5s;
}

/* Offcanvas Dropdown */
.offcanvas-item-dropdown {
    position: relative;
}

.offcanvas-item-parent {
    position: relative;
}

.offcanvas-item-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
}

.offcanvas-item-wrapper .offcanvas-item {
    flex: 0 1 auto;
}

.offcanvas-dropdown-toggle {
    background: none !important;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.offcanvas-dropdown-toggle .dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.offcanvas-item-dropdown.open .offcanvas-dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

.offcanvas-dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    max-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.offcanvas-dropdown-menu li {
    display: flex;
    justify-content: center;
    width: 100%;
}

.offcanvas-item-dropdown.open .offcanvas-dropdown-menu {
    max-height: 600px;
}

.offcanvas-dropdown-item {
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 400;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    margin: 5px 0;
    transition: color 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    width: max-content;
    min-width: fit-content;
}

.offcanvas-dropdown-item .dropdown-thumbnail {
    width: 45px;
    height: 45px;
    object-fit: contain;
    object-position: center;
    border-radius: 4px;
    flex-shrink: 0;
    order: 2;
    background-color: transparent;
    padding: 0;
    display: block;
}

.offcanvas-dropdown-item span {
    order: 1;
}

.offcanvas-dropdown-item:hover {
    color: var(--accent);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.9);
    z-index: 15000 !important;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-overlay.active {
    display: flex;
}

.search-container {
    position: relative;
    width: 90%;
    max-width: 600px;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid var(--white);
    border-radius: 5px;
    background-color: var(--white);
    line-height: 1.5;
}

.search-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--white);
    border: none;
    font-size: 24px;
    color: var(--dark-gray) !important;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    line-height: 1;
    border-radius: 50%;
    z-index: 15001;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .search-close:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
}

@media (max-width: 767px) {
    .search-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
}

.search-results {
    margin-top: 20px;
    background-color: var(--white);
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-result-item:hover {
    background-color: var(--light-gray);
}

.search-result-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 300px);
    padding: 40px 0;
}

/* Messages */
.messages-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.alert {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.alert a {
    color: inherit !important;
    text-decoration: underline;
    font-weight: 600;
}

.alert a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Buttons - All buttons have gradient background with dark text */
a.btn,
a.btn-primary,
button:not(.nav-item):not(.search-icon-btn):not(.mobile-menu-btn):not(.offcanvas-close):not(.search-close):not(.back-to-top),
input[type="submit"],
input[type="button"],
.btn {
    background: linear-gradient(to right, #f0d36e 0%, #efa643 30%, #efa643 70%, #f0d36e 100%);
    color: #15213d !important;
    font-weight: 600;
}

a.btn *,
a.btn-primary *,
button:not(.nav-item):not(.search-icon-btn):not(.mobile-menu-btn):not(.offcanvas-close):not(.search-close):not(.back-to-top) *,
input[type="submit"] *,
input[type="button"] *,
.btn * {
    color: #15213d !important;
}

.btn,
a.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(to right, #f0d36e 0%, #efa643 30%, #efa643 70%, #f0d36e 100%);
    color: #15213d !important;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-weight: 600;
}

.btn *,
a.btn * {
    color: #15213d !important;
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        opacity: 0.9;
        transform: translateY(-2px);
        color: #15213d !important;
    }
    
    .btn:hover * {
        color: #15213d !important;
    }
}

.btn-primary,
a.btn-primary {
    background: linear-gradient(135deg, #efa643 0%, #f0d36e 100%);
    color: #15213d !important;
}

.btn-primary *,
a.btn-primary * {
    color: #15213d !important;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #15213d !important;
}

.btn-primary:hover * {
    color: #15213d !important;
}

/* Footer */
.footer {
    background-color: #15213d;
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    text-align: center;
    position: relative;
}

.footer-section:not(:last-child)::after {
    content: '';
    display: none;
}

.footer-section h3 {
    margin-bottom: 15px;
}

.footer-section p {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--white) !important;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--white) !important;
    opacity: 0.8;
}

.footer-center {
    text-align: center;
}

.footer-tagline {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 5px;
}

.footer-copyright {
    font-size: 14px;
    color: var(--white);
    margin-top: 0;
    margin-bottom: 0;
}

.footer-right {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-powered-by {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.footer-powered-by-text {
    margin: 0;
    margin-bottom: -5px;
    font-size: 14px;
    color: var(--white);
    line-height: 1.2;
}


.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #1a4370;
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    display: flex;
}

@media (hover: hover) and (pointer: fine) {
    .back-to-top:hover {
        background-color: #153354;
        transform: scale(1.1);
    }
}

/* Home Page - Mobile First */
.home-page {
    min-height: 100vh;
}

.home-content {
    padding: 20px 20px;
    background-color: var(--white);
}

.content-section {
    max-width: 100%;
    margin: 0 auto 50px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.content-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scroll-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-slide-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scroll-slide-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-slide-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scroll-slide-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-scale {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scroll-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

.section-title {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    font-weight: 600;
    color: #15213d;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid;
    border-image: linear-gradient(to right, #f0d36e 0%, #efa643 30%, #efa643 70%, #f0d36e 100%) 1;
    letter-spacing: -0.01em;
}

.section-text {
    font-size: clamp(1rem, 3vw, 1.125rem);
    line-height: 1.8;
    color: var(--text-dark);
}

.section-text p {
    margin-bottom: 20px;
}

.section-text p:last-child {
    margin-bottom: 0;
}

.content-image {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 50px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    background-color: var(--light-gray);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    aspect-ratio: 16 / 9;
}

.content-image.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.content-image-no-aspect {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    background-color: var(--light-gray);
}

.content-image-no-aspect img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
}

.content-section-image-layout {
    max-width: 100%;
    margin: 0 auto 50px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.content-section-image-layout.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.section-image-wrapper {
    width: 100%;
    margin-bottom: 30px;
}

.section-content-wrapper {
    width: 100%;
}

.content-images-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
    margin: 0 auto 50px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.content-images-grid.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.content-images-grid .content-image {
    margin: 0;
    aspect-ratio: 4 / 3;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .home-content {
        padding: 40px 20px;
    }
    
    .content-section {
        max-width: 900px;
        margin-bottom: 80px;
    }
    
    .content-image {
        max-width: 1000px;
        margin-bottom: 80px;
    }
    
    .content-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
        max-width: 1200px;
        margin-bottom: 80px;
    }
    
    .content-images-grid .content-image {
        aspect-ratio: 4 / 3;
    }
    
    .content-section-image-layout {
        max-width: 1200px;
        margin-bottom: 80px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: center;
    }
    
    .section-image-wrapper {
        margin-bottom: 0;
    }
    
    .section-content-wrapper {
        width: 100%;
    }
    
    .section-title {
        margin-bottom: 30px;
        padding-bottom: 15px;
    }
    
    .section-text p {
        margin-bottom: 24px;
    }
}

.home-features {
    padding: 60px 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    background-color: var(--light-gray);
    border-radius: 5px;
    text-align: center;
}


/* Categories */
.category-list-page {
    padding: 60px 20px;
    min-height: calc(100vh - 400px);
}

.category-detail-page {
    padding: 40px 20px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: -0.02em;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

@media (hover: hover) and (pointer: fine) {
    .category-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    }
}

.category-card a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.category-card img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
    background-color: var(--light-gray);
    padding: 10px;
}

@media (hover: hover) and (pointer: fine) {
    .category-card:hover img {
        transform: scale(1.02);
    }
}

.category-placeholder {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 10px;
}

.category-card-content {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-card-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    background: linear-gradient(to right, #f0d36e 0%, #efa643 30%, #efa643 70%, #f0d36e 100%);
    color: #15213d !important;
    margin: 0;
    line-height: 1.3;
    text-align: center;
    padding: 24px;
    transition: color 0.3s ease;
    border-radius: 0 0 16px 16px;
}

@media (max-width: 767px) {
    .category-list-page {
        padding: 40px 20px;
    }
    
    .page-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .category-card img,
    .category-placeholder {
        height: 200px;
    }
    
    .category-card-content {
        padding: 20px;
    }
    
    .category-card-content h2 {
        font-size: 1.2rem;
        border-radius: 0 0 16px 16px;
    }
}

/* Topics */
.topic-detail-page {
    padding: 40px 20px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.topic-card {
    background-color: var(--white);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.topic-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.topic-card a:hover {
    text-decoration: none;
}

.topic-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.topic-card-content {
    padding: 20px;
}

.topic-card h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.topic-date {
    color: var(--text-light);
    font-size: 14px;
}

.topic-thumbnail {
    width: 100%;
    height: auto;
    margin-bottom: 30px;
    border-radius: 5px;
}

.topic-content {
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    padding-bottom: 40px;
    margin-bottom: 40px;
}

.topic-detail-page .container {
    max-width: 100%;
    box-sizing: border-box;
}

.topic-post {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    padding-bottom: 40px;
    margin-bottom: 40px;
}

.topic-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    display: block;
}

.topic-content img:last-child {
    margin-bottom: 40px;
}

/* Contact Page */
.contact-page {
    padding: 40px 20px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-size: 16px;
}

.contact-form textarea {
    resize: vertical;
}

/* Auth Pages */
.auth-page {
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-size: 16px;
}

/* Account Page */
.account-page {
    padding: 40px 20px;
}

.account-info {
    margin-bottom: 40px;
}

/* Placeholders */
.topic-placeholder {
    width: 100%;
    height: 250px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Responsive Design */
@media (min-width: 768px) {
    .header-content {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 20px;
        position: relative;
    }
    
    .header-logo {
        display: flex;
        justify-content: flex-start;
        grid-column: 1;
        justify-self: start;
        overflow: hidden;
        min-width: 0;
    }
    
    .header-logo img {
        max-width: 250px;
        width: auto;
    }
    
    .desktop-nav {
        display: flex;
        grid-column: 2;
        justify-self: center;
        justify-content: center;
        min-width: 0;
    }
    
    .header-actions {
        display: flex;
        grid-column: 3;
        justify-self: end;
        justify-content: flex-end;
        min-width: 0;
    }
    
    .header-link:not(:first-child)::before {
        content: '';
        position: absolute;
        left: -7.5px;
        top: 50%;
        transform: translateY(-50%) translateZ(0);
        height: 20px;
        width: 1px;
        background-color: var(--black);
        box-sizing: border-box;
    }
    
    .mobile-menu-btn,
    .mobile-nav-row,
    .mobile-nav-row-first,
    .mobile-menu-wrapper {
        display: none;
    }
    
    .info-bar-desktop {
        display: block;
    }
    
    .info-bar-mobile {
        display: none;
    }
}

@media (max-width: 767px) {
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        min-width: 0;
    }
    
    .header-logo {
        flex: 0 1 auto;
        min-width: 0;
        max-width: calc(100% - 160px);
        overflow: hidden;
        will-change: transform;
        transform: translateZ(0);
    }
    
    .header-logo img {
        height: auto;
        max-height: 160px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        will-change: transform;
        transform: translateZ(0);
    }
    
    .mobile-menu-wrapper {
        flex: 0 0 auto;
        min-width: fit-content;
        width: auto;
        display: flex;
    }
    
    .header-actions {
        display: none !important;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-nav-row-first {
        display: flex;
    }
    
    .header-content::before {
        display: block;
    }
    
    .info-bar .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .info-bar-desktop {
        display: none;
    }
    
    .info-bar-mobile {
        display: block;
    }
    
    .info-bar-link {
        font-size: 13px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section:not(:last-child)::after {
        display: block;
        content: '';
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        height: 1px;
        background-color: rgba(255, 255, 255, 0.3);
    }
    
    .footer-section {
        margin-bottom: 30px;
        padding-bottom: 30px;
    }
    
    .footer-right {
        text-align: center;
    }
}

/* Admin Customization */
@media (max-width: 1024px) {
    .admin-interface {
        font-size: 14px;
    }
}


/* Field error highlight - red rectangle that doesn't push content */
.error-highlight-rect {
    position: fixed;
    pointer-events: none;
    z-index: 999;
    border: 3px solid #dc3545;
    border-radius: 5px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-highlight-rect.fade-out {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.error-highlight-rect.visible {
    opacity: 1;
    animation: fieldErrorPulse 0.73s cubic-bezier(0.4, 0, 0.6, 1) 3;
}

@keyframes fieldErrorPulse {
    0% {
        opacity: 1;
        border-color: #dc3545;
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.9);
    }
    50% {
        opacity: 0.6;
        border-color: rgba(220, 53, 69, 0.8);
        box-shadow: 0 0 0 12px rgba(220, 53, 69, 0.3);
    }
    100% {
        opacity: 1;
        border-color: #dc3545;
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

