/* ==========================================================================
   Amulet Certificate Card Printer - Premium Styles
   ========================================================================== */

   :root {
    --primary-color: #9a1010; /* Deep Red for the image panel */
    --gold-color: #d4af37; /* Premium Gold */
    --gold-dark: #b5952f;
    --silver-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); /* Silver gradient */
    --text-dark: #333333;
    --text-gray: #666666;
    --bg-pattern: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20z" fill="%23f4f4f4" fill-opacity="0.4" fill-rule="evenodd"/></svg>');
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    background-color: #eaeaea;
    background-image: var(--bg-pattern);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.top-bar {
    background: linear-gradient(90deg, #1a1a1a, #333333);
    border-bottom: 4px solid var(--gold-color);
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    margin-bottom: 30px;
}

.logo {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo span {
    color: var(--gold-color);
}

/* --- Search Section --- */
.search-section {
    margin-bottom: 40px;
}

.search-form {
    display: flex;
    justify-content: center;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    display: flex;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 10px rgba(212,175,55,0.3);
    border-radius: 8px;
    overflow: hidden;
    background: #fdfbf7;
    border: 3px solid #b58500;
    outline: 2px solid #d4af37;
    outline-offset: -2px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.6), inset 0 0 15px rgba(212,175,55,0.5);
    transform: scale(1.02);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a6300;
    font-size: 22px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: none;
    outline: none;
    font-size: 17px;
    font-family: 'Sarabun', sans-serif;
    color: #333;
    background: transparent;
    font-weight: 500;
}

.search-input-wrapper input::placeholder {
    color: #8a6300;
    opacity: 0.7;
}

.search-btn {
    background: linear-gradient(to bottom, #d4af37, #8a6300);
    color: #fff;
    border: none;
    border-left: 2px solid #5c3a00;
    padding: 0 45px;
    font-size: 19px;
    font-weight: 600;
    font-family: 'Taviraj', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 2px 3px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}

.search-btn:hover {
    background: linear-gradient(to bottom, #fcf6ba, #d4af37);
    color: #5c3a00;
    text-shadow: none;
}

/* --- Cards Grid Section --- */
.cards-section {
    margin-bottom: 60px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    justify-content: center;
}

/* --- Amulet Card Design (Exact Print Layout) --- */
.print-preview-card {
    background: url('https://c-pra.com/wp-content/uploads/2026/04/69030125-1024x658.jpg') center/cover no-repeat;
    width: 85.6mm;
    height: 54mm;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    overflow: hidden;
    font-family: 'Sarabun', sans-serif;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px; /* Slight rounding for web */
    margin: 0 auto;
    transition: transform 0.3s;
}

.print-preview-card:hover {
    transform: translateY(-5px);
}

.pp-left {
    width: 38%;
    display: flex;
    flex-direction: column;
    padding: 3mm;
    position: relative;
}

.pp-image-box {
    width: 100%;
    height: 75%;
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pp-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pp-left-bottom {
    display: flex;
    align-items: center;
    width: 100%;
    height: 25%;
    padding-top: 1mm;
    gap: 2mm;
}

.pp-back-circle {
    width: 10mm;
    height: 10mm;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pp-back-circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.pp-id-left {
    color: #111;
    font-size: 3.5mm;
    font-weight: 700;
}

.pp-right {
    width: 62%;
    padding: 2mm 3mm;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: visible;
}

.pp-header {
    display: none; /* User requested removal of logo and title from card */
    align-items: flex-start;
    margin-bottom: 2mm;
}

.pp-emblem {
    width: 12mm;
    height: 12mm;
    background-color: #0b2575;
    border-radius: 50%;
    border: 0.5mm solid #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2mm;
    color: #fff;
    font-size: 6mm;
    flex-shrink: 0;
    overflow: hidden; /* For image logo */
}

.pp-emblem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-name {
    font-family: 'Sarabun', sans-serif;
    font-size: 2.5mm;
    color: #333;
    font-weight: 600;
    margin: 0 0 0.5mm 0;
    line-height: 1;
}

.pp-cert-title h2 {
    font-family: 'Sarabun', sans-serif;
    font-size: 3.5mm;
    color: #c99339;
    font-weight: 400;
    margin: 0;
    line-height: 1.1;
    white-space: nowrap;
    text-shadow: 0.15mm 0.15mm 0.2mm rgba(0,0,0,0.4);
}

.pp-cert-title p {
    font-size: 2.0mm;
    color: #111;
    margin: 0;
    font-weight: 500;
    line-height: 1;
}

.pp-details {
    display: flex;
    flex-direction: column;
    gap: 1.8mm;
}

.pp-row {
    display: flex;
    align-items: flex-start;
    gap: 2mm;
}

.pp-label-group {
    display: none; /* Hidden because PVC cards are pre-printed with labels */
    width: 14mm;
    flex-shrink: 0;
    flex-direction: column;
}

.pp-label-th {
    color: #fff;
    font-size: 2.5mm;
    font-weight: 500;
    line-height: 1;
    text-shadow: 0.15mm 0.15mm 0.3mm rgba(0,0,0,0.5);
}

.pp-label-en {
    color: #fff;
    font-size: 1.5mm;
    line-height: 1;
    margin-top: 0.3mm;
}

.pp-value-group {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.pp-text-line {
    font-size: 2.5mm;
    font-family: 'Sarabun', sans-serif;
    font-weight: 400;
    color: #222;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    width: 100%;
    min-height: 1.4em;
}

.pp-bottom-row {
    position: absolute;
    bottom: 3mm;
    right: 3mm;
    display: flex;
    justify-content: flex-end;
}

.pp-qr {
    width: 12mm;
    height: 12mm;
}

.single-view {
    height: auto;
    margin: 0 auto;
}

/* Container for scaling the card down in Grid view if needed */
.card-scale-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Mobile Responsiveness for Card */
@media (max-width: 600px) {
    .print-preview-card {
        transform: scale(0.85); /* scale down on mobile */
        transform-origin: top center;
        margin-bottom: -15%;
    }
}
/* --- Premium Theme Frontend Outer Layout --- */
body.pattern-theme {
    background-color: #fdfbf7;
    background-image: url('https://www.transparenttextures.com/patterns/always-grey.png');
    color: #333;
    margin: 0;
    padding: 0;
}

/* Navbar */
.custom-navbar {
    background: linear-gradient(135deg, #1f1f1f, #333);
    border-bottom: 3px solid #d4af37; /* Gold accent */
    padding: 15px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    margin-bottom: 30px;
}
.custom-navbar .navbar-brand {
    color: #d4af37 !important;
    font-size: 1.5rem;
    font-weight: 700;
}
.custom-navbar .brand-icon {
    margin-right: 8px;
    font-size: 1.6rem;
}
.custom-navbar .nav-link {
    color: #fdfbf7 !important;
    font-weight: 500;
    margin-left: 15px;
    transition: color 0.3s ease;
}
.custom-navbar .nav-link:hover {
    color: #d4af37 !important;
}
.btn-admin-login {
    background-color: rgba(212, 175, 55, 0.1);
    border: 1px solid #d4af37;
    border-radius: 4px;
    padding: 5px 12px !important;
}
.btn-admin-login:hover {
    background-color: #d4af37 !important;
    color: #111 !important;
}

/* Footer */
.custom-footer {
    background: linear-gradient(135deg, #1f1f1f, #222);
    border-top: 3px solid #d4af37;
    color: #ccc;
    margin-top: 50px;
}
.footer-logo i {
    font-size: 2rem;
    color: #d4af37;
}
.footer-title {
    color: #d4af37;
    font-weight: 600;
    font-size: 1.2rem;
}
.footer-text {
    font-size: 0.9rem;
    color: #aaa;
}
.footer-copyright {
    font-size: 0.8rem;
    border-top: 1px solid #444;
    padding-top: 15px;
}

.search-container-center {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.search-container-center .form-control {
    width: 500px;
    max-width: 90%;
    border-radius: 2px;
    border: 1px solid #ccc;
    padding: 8px 15px;
    box-shadow: none;
}


.btn-brown:hover {
    background-color: #8a601c;
    color: white;
}

/* Pagination Adjustments */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.page-item .page-link {
    color: #8a601c;
    border: 1px solid #ddd;
    margin: 0 2px;
    border-radius: 2px;
    padding: 5px 12px;
    text-decoration: none;
    background-color: #fff;
    font-size: 0.9rem;
}

.pagination .page-item.active .page-link {
    background-color: #6a4421;
    border-color: #6a4421;
    color: #fff;
}

.page-item .page-link:hover {
    background-color: #f1efeb;
    border-color: #d5c8b5;
    color: #8a601c;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}
/* --- Modal Zoom (Bootstrap Conflict Fix) --- */
.modal-zoom {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); 
    align-items: center;
    justify-content: center;
}

.modal-content-zoom {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}
@media (max-width: 480px) {
    .amulet-card {
        height: 200px;
    }
    
    .card-left {
        width: 35%;
    }
    
    .card-right {
        width: 65%;
    }
    
    .cert-title h2 {
        font-size: 13px;
    }
    
    .qr-wrapper {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Single View Styles (view.php)
   ========================================================================== */

.view-section {
    padding: 20px 0 60px 0;
}

.card-display-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

/* Make single view card a bit larger if needed, or keep original size */
.amulet-card.single-view {
    cursor: default;
    transform: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 550px;
    height: auto;
    min-height: 280px;
}
.amulet-card.single-view .image-wrapper {
    height: 180px;
}
.amulet-card.single-view .card-details {
    font-size: 12px;
}
.amulet-card.single-view .cert-title h2 {
    font-size: 18px;
}
.amulet-card.single-view .qr-wrapper {
    width: 60px;
    height: 60px;
    bottom: 15px;
}

/* Clickable Image Hint */
.clickable {
    cursor: pointer;
    position: relative;
}
.clickable::after {
    content: '\f00e'; /* fa-search-plus */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: rgba(255,255,255,0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.clickable:hover::after {
    opacity: 1;
}

/* Detail Box */
.detail-box-brown {
    max-width: 700px;
    margin: 0 auto;
    background: #e9ddcb;
    border: 2px solid #8e6840;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.detail-box-brown table {
    width: 100%;
    border-collapse: collapse;
}
.detail-box-brown th {
    text-align: right;
    padding: 8px 15px;
    font-weight: 600;
    width: 35%;
    vertical-align: top;
    color: #7b4c20;
    font-size: 15px;
}
.detail-box-brown td {
    text-align: left;
    padding: 8px 15px;
    font-weight: 500;
    vertical-align: top;
    color: #443224;
    font-size: 15px;
}
.btn-brown {
    display: inline-block;
    background: #6a4421;
    color: white;
    padding: 10px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
}
.btn-brown:hover {
    background: #4a2e15;
    color: white;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.detail-table td {
    padding: 12px 10px;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 15px;
}

.detail-table tr:last-child td {
    border-bottom: none;
}

.dt-label {
    width: 35%;
    color: #8a6d3b;
    font-weight: 600;
    text-align: right;
    padding-right: 20px !important;
}

.dt-value {
    color: #333;
}

.back-btn-wrapper {
    text-align: center;
}

.amulet-card-item {
    transition: transform 0.3s;
    display: flex;
    justify-content: center;
    overflow: hidden;
}
.amulet-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Modal (Lightbox) Styles
   ========================================================================== */
.modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #111;
    padding: 20px;
    border: 2px solid #d4af37;
    border-radius: 8px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close {
    position: absolute;
    top: -15px;
    right: -15px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background: #9a1010;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    border: 2px solid #d4af37;
    z-index: 10;
}

.close:hover {
    background: #d4af37;
    color: #000;
}

.modal-images-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
}

.modal-img-box {
    flex: 1;
    background: #9a1010;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-img-box img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 10px;
}

.img-caption {
    color: #d4af37;
    font-size: 18px;
    font-weight: 500;
}

.modal-footer-text {
    text-align: center;
    color: #fff;
    margin-top: 20px;
    font-size: 16px;
    border-top: 1px solid #333;
    padding-top: 15px;
}

@media (max-width: 768px) {
    .modal-images-container {
        flex-direction: column;
    }
    .modal-img-box img {
        max-height: 40vh;
    }
    .amulet-card.single-view {
        flex-direction: column;
        height: auto;
    }
    .amulet-card.single-view .card-left,
    .amulet-card.single-view .card-right {
        width: 100%;
    }
    .amulet-card.single-view .card-left {
        border-right: none;
        border-bottom: 2px solid #fff;
    }
    .dt-label {
        width: 100%;
        display: block;
        text-align: left;
        padding-right: 0 !important;
        padding-bottom: 0;
    }
    .dt-value {
        display: block;
        padding-top: 5px;
    }
}

/* --- Thumbnail Grid View (หน้าแรก) --- */
.thumbnail-card {
    background: #fdfbf7;
    border: 1px solid #b5952f;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Sarabun', sans-serif;
}

.thumbnail-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
}

.tc-header {
    background: #111;
    color: #d4af37;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 2px solid #d4af37;
}

.tc-header i {
    font-size: 24px;
    margin-right: 10px;
}

.tc-header-text {
    line-height: 1.1;
}

.tc-title {
    font-size: 14px;
    font-weight: bold;
}

.tc-subtitle {
    font-size: 9px;
    opacity: 0.8;
}

.tc-body {
    display: flex;
    flex: 1;
    background: #fff;
}

.tc-details {
    flex: 1.2;
    padding: 10px 8px;
    font-size: 11px;
    color: #333;
    border-right: 1px dashed #ccc;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tc-details p {
    margin-bottom: 6px;
    line-height: 1.3;
}
.tc-details p strong {
    color: #8a6a1c;
    display: block;
    font-size: 10px;
}
.tc-details p:last-child {
    margin-bottom: 0;
}

.tc-image {
    width: 45%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.tc-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    object-position: center;
}

.tc-footer {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    text-align: center;
    padding: 6px 5px;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.5px;
    border-top: 1px solid #c0392b;
}

/* ==========================================================================
   Certificate Info Box (Auto Translate)
   ========================================================================== */
.lang-cards-container {
    max-width: 800px;
    margin: 0 auto;
}

.lang-card {
    border-radius: 15px;
    padding: 0;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    background-color: #fdfaf0;
    border: 3px solid #8c6239;
    overflow: hidden;
}

.lang-card-inner {
    background: transparent;
    padding: 30px 40px;
    position: relative;
}

.lang-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #5a3814;
    margin-bottom: 20px;
    border-bottom: 2px solid #d4c3b3;
    padding-bottom: 10px;
}

.info-row {
    display: flex;
    margin-bottom: 15px;
    align-items: baseline;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 8px;
}

.info-label {
    width: 35%;
    text-align: right;
    padding-right: 20px;
    font-weight: 600;
    color: #4a4a4a;
    font-size: 16px;
}

.info-value {
    width: 65%;
    color: #222;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    padding-left: 10px;
    line-height: 1.5;
}

.loading-state {
    text-align: center;
    color: #a47d3d;
    font-style: italic;
    padding: 20px 0;
}

.btn-container {
    text-align: center;
    margin-top: 40px;
}

.btn-back {
    background-color: #614227;
    color: #ffffff;
    border: none;
    padding: 10px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Sarabun', sans-serif;
    text-decoration: none;
    display: inline-block;
}
.btn-back:hover {
    background-color: #4a321d;
    color: #fff;
}

/* ==========================================================================
   Theme Switcher & Fonts
   ========================================================================== */

/* 10 Fonts */
.font-1 { font-family: 'Sarabun', sans-serif !important; }
.font-2 { font-family: 'Kanit', sans-serif !important; }
.font-3 { font-family: 'Prompt', sans-serif !important; }
.font-4 { font-family: 'Mitr', sans-serif !important; }
.font-5 { font-family: 'Niramit', sans-serif !important; }
.font-6 { font-family: 'Pridi', serif !important; }
.font-7 { font-family: 'Taviraj', serif !important; }
.font-8 { font-family: 'Sriracha', cursive !important; }
.font-9 { font-family: 'Chakra Petch', sans-serif !important; }
.font-10 { font-family: 'Chonburi', serif !important; }

/* 10 Themes */
/* Theme 1: Amulet Book Style (แนวหนังสือพระ) */
body.theme-1 { background-color: #e3d9c3; background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png'); background-attachment: fixed; color: #3e2723; }
body.theme-1 .site-title, body.theme-1 .header-title { color: #5a3814; }
body.theme-1 .custom-navbar { background: #5a3814 !important; border-bottom: 3px solid #e3d9c3 !important; }
body.theme-1 .custom-navbar .brand-icon, body.theme-1 .custom-navbar .brand-text { color: #e3d9c3 !important; }
body.theme-1 .custom-footer { background: #5a3814 !important; border-top: 3px solid #e3d9c3 !important; }
body.theme-1 .custom-footer .footer-title, body.theme-1 .custom-footer .footer-text, body.theme-1 .custom-footer .footer-logo i, body.theme-1 .custom-footer .footer-copyright { color: #e3d9c3 !important; }
body.theme-1 .search-btn { background: #5a3814 !important; color: #e3d9c3 !important; border-left: 1px solid #e3d9c3 !important; }
body.theme-1 .search-input-wrapper { border-color: #5a3814 !important; background: #fff !important; }

/* Theme 2: Gold Gradient */
body.theme-2 { background: linear-gradient(135deg, #cda752, #fdfaf0, #cda752); background-attachment: fixed; color: #3e2723; }
body.theme-2 .site-title, body.theme-2 .header-title { color: #5a3814; }

/* Theme 3: Midnight Blue */
body.theme-3 { background: linear-gradient(135deg, #0a1128, #1c2541); background-attachment: fixed; color: #f0f4f8; }
body.theme-3 .site-title, body.theme-3 .header-title { color: #e0e1dd; }

/* Theme 4: Crimson Red */
body.theme-4 { background: linear-gradient(135deg, #370617, #9d0208); background-attachment: fixed; color: #ffba08; }
body.theme-4 .site-title, body.theme-4 .header-title { color: #ffba08; }

/* Theme 5: Emerald Green */
body.theme-5 { background: linear-gradient(135deg, #004b23, #38b000); background-attachment: fixed; color: #ccff33; }
body.theme-5 .site-title, body.theme-5 .header-title { color: #ccff33; }

/* Theme 6: Silver / Light Grey */
body.theme-6 { background: linear-gradient(135deg, #adb5bd, #f8f9fa); background-attachment: fixed; color: #212529; }
body.theme-6 .site-title, body.theme-6 .header-title { color: #343a40; }

/* Theme 7: Pattern Gold */
body.theme-7 { background-color: #a67c52; background-image: url('https://www.transparenttextures.com/patterns/arabesque.png'); background-attachment: fixed; color: #fff; }
body.theme-7 .site-title, body.theme-7 .header-title { color: #fff; }

/* Theme 8: Pattern Dark */
body.theme-8 { background-color: #1a0a05; background-image: url('https://www.transparenttextures.com/patterns/motif.png'); background-attachment: fixed; color: #e3d9c3; }
body.theme-8 .site-title, body.theme-8 .header-title { color: #e3d9c3; }

/* Theme 9: Pattern Red */
body.theme-9 { background-color: #590d22; background-image: url('https://www.transparenttextures.com/patterns/floral-flourish.png'); background-attachment: fixed; color: #ffb703; }
body.theme-9 .site-title, body.theme-9 .header-title { color: #ffb703; }

/* Theme 10: Pattern Blue */
body.theme-10 { background-color: #001d3d; background-image: url('https://www.transparenttextures.com/patterns/arabesque.png'); background-attachment: fixed; color: #ffc300; }
body.theme-10 .site-title, body.theme-10 .header-title { color: #ffc300; }

/* Global overrides for themes so the title text doesn't clash */
body[class*="theme-"] .text-center h3 { color: inherit; }
body[class*="theme-"] .search-box label { color: inherit; }

/* Theme Switcher Button */
.theme-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #8c6239;
    color: white;
    border: 2px solid #e3d9c3;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s;
}
.theme-toggle-btn:hover {
    transform: rotate(45deg);
    background: #5a3814;
}

/* Theme Switcher Panel */
.theme-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    background: #fdfaf0;
    border: 3px solid #8c6239;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    z-index: 999;
    display: none;
    flex-direction: column;
    gap: 20px;
    color: #222;
}
.theme-panel.active {
    display: flex;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.theme-panel h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #5a3814;
    border-bottom: 2px solid #e3d9c3;
    padding-bottom: 5px;
    text-align: left;
    font-weight: bold;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.theme-btn {
    height: 35px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s;
}
.theme-btn:hover { transform: scale(1.1); }
.theme-btn.active { border-color: #c0392b; box-shadow: 0 0 8px rgba(192, 57, 43, 0.6); }

.font-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.font-btn {
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    transition: all 0.2s;
}
.font-btn:hover { background: #f0f0f0; }
.font-btn.active { background: #8c6239; color: #fff; border-color: #5a3814; }

/* Language Switcher Styles */
.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.lang-btn:hover {
    background: #d4af37;
    color: #000;
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Hide Google Translate Banner and Tooltips */
.goog-te-banner-frame.skiptranslate, 
.goog-te-gadget-icon {
    display: none !important;
}
body {
    top: 0px !important;
}
#goog-gt-tt, .goog-te-balloon-frame {
    display: none !important;
    visibility: hidden !important;
}
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}
