/*
Theme Name: Family Tree
Theme URI: https://oneday.vn
Author: OneDay Software
Author URI: https://oneday.vn
Description: Giao diện hiện đại, tinh tế dành cho gia phả các dòng họ.
Version: 1.0.0
Text Domain: familytree
*/

@font-face {
    font-family: 'HurmeGeometricSans4';
    src: url('assets/fonts/iCielHurmeGeometricSans4-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'HurmeGeometricSans4';
    src: url('assets/fonts/iCielHurmeGeometricSans4-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

/* --- CSS Reset & Variables --- */
:root {
    --primary-color: #ab7c2c;
    --secondary-color: #f5cf7c;
    --accent-color: #f8f4e1;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #ffffff;
    --bg-soft: #f7f5f3;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 15px 40px rgba(0, 0, 0, 0.1);
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'HurmeGeometricSans4', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-soft);
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* --- Header & Navigation --- */
header {
    background: #fff;
    padding: 15px 0;
    text-align: center;
}

.header-logo img {
    max-width: 180px;
    height: auto;
}

.main-nav {
    background: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* --- Sticky Header Effect --- */
.header-wrapper {
    width: 100%;
    z-index: 2000;
    transition: var(--transition);
}

.header-wrapper.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: var(--shadow-md);
    animation: headerSlideDown 0.4s ease-out;
}

@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.header-wrapper.is-sticky header {
    padding: 5px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.header-wrapper.is-sticky .header-logo img {
    max-width: 80px;
}


.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
    margin: 0 13px;
}

.main-nav li:first-child {
    margin-left: 0 !important;
}

.main-nav li a {
    color: #fff;
    padding: 10px 0px;
    display: block;
    font-size: 1em;
    transition: var(--transition);
    position: relative;
    line-height: 30px;
    letter-spacing: .02em;
    text-transform: uppercase;
    font-weight: bolder;
}

.main-nav li:hover a:before,
.main-nav li.current-menu-item a:before {
    content: " ";
    position: absolute;
    top: 0;
    left: 50%;
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    transition: all 0.3s;
    width: 100%;
    color: #FFF !important;
    background-color: #f5cf7c !important;
    transition: all 0.3s;
    height: 3px;
}

/* --- Content Styles --- */
.entry-content {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #444;
    text-align: justify;
}

.poetry-block {
    margin: 40px 0;
    text-align: center;
    font-style: italic;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--primary-color);
}

.poetry-line {
    display: block;
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: #333;
}

.poetry-ref {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #777;
}

.signature-area {
    margin-top: 50px;
    text-align: right;
    line-height: 1.4;
}

/* --- Front Page Specific --- */
.hero-section {
    position: relative;
    height: 500px;
    background: url('/wp-content/uploads/2023/08/nha_tho_ho_nguyen_phu_xa.jpg') no-repeat center center/cover;
    display: flex;
    align-items: flex-end;
    padding-bottom: 50px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
}

.feature-icons {
    margin: -120px auto 60px;
    position: relative;
    z-index: 10;
    background: #fff;
    padding: 60px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.feature-title {
    text-align: center;
    font-size: 1.25em;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0px;
}

.feature-separator {
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 24px 0;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 20px;
    text-align: center;
    margin: 50px 0;
}

.icon-box {
    width: 86px;
    height: 86px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    transition: var(--transition);
    margin: auto;
}

.icon-box svg {
    width: 100%;
    height: 100%;
    display: block;
}

.icon-item:hover .icon-box {
    transform: translateY(-5px) scale(1.05);
}

.icon-item span {
    display: block;
    font-weight: 700;
    color: #555;
    font-size: 1.1rem;
    margin-top: 10px;
}

.hero-intro-text {
    width: 100%;
    margin: 30px 0;
}

.hero-intro-text p {
    font-size: 1rem;
    line-height: 1.8;
    text-align: justify;
    color: #444;
    margin: 0;
}

.home-news {
    background: #fff;
    padding: 60px 0px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #eee;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.news-image {
    height: 200px;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
}

.news-card-content {
    padding: 20px;
}

.news-card-content h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    height: 2.8em;
    overflow: hidden;
    color: var(--primary-color);
}

.news-card-content p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.map-section {
    height: 450px;
    width: 100%;
    position: relative;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- News List (Archive) --- */
.news-list {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.news-item {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
    padding-bottom: 30px;
    border-bottom: 1px solid #efefef;
    transition: var(--transition);
}

.news-item:last-child {
    border-bottom: none;
}

.news-thumb-wrap {
    flex: 0 0 260px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.news-thumb-wrap img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.news-date {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    line-height: 1;
    font-size: 0.8rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.news-date span {
    font-size: 1.1rem;
}

.news-item-content {
    flex: 1;
}

.news-item-content h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #333;
}

.news-item-content h2 a:hover {
    color: var(--primary-color);
}

.news-item-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Single Post Detail --- */
.single-post-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.single .entry-header {
    margin-bottom: 30px;
    text-align: center;
}

.single .entry-title {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 10px;
}

.single .entry-meta {
    color: #888;
    margin-top: 10px;
    font-size: 0.9rem;
}

.single .post-thumbnail {
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.single .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination .page-numbers {
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: var(--text-dark);
    font-weight: 600;
    transition: var(--transition);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* --- Footer --- */
.site-footer {
    min-height: 190px;
    background: url(images/bg_footer.png) #ab7c2c repeat-x;
    background-position: bottom;
    padding-top: 30px;
}

.footer-pattern {
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><path d="M20 5 L25 15 L35 20 L25 25 L20 35 L15 25 L5 20 L15 15 Z" fill="%23f5cf7c" opacity="0.3"/></svg>');
    background-repeat: repeat-x;
    background-size: 40px 40px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 4fr 4.5fr;
    gap: 15px;
    align-items: start;
}

.footer-logo img {
    max-width: 130px;
}

.footer-info h3 {
    font-size: 1.125em;
    margin-bottom: 0px;
    text-transform: uppercase;
    color: #f5cf7c !important;
    margin-top: 0px;
}

.footer-info p {
    font-size: 13px;
    margin-bottom: 0px;
    margin-top: 0px;
    color: #f5cf7c !important;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* --- Footer Grid Internal --- */
.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 20px;
}

.footer-links ul li a {
    font-size: 13px;
    color: #f5cf7c !important;
    display: block;
    opacity: 1;
    padding: 6px 0px;
}

.footer-links ul li+li {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

form.post-password-form {
    max-width: 620px;
    margin: 0 auto;
    padding: 30px 15px 30px
}

form.post-password-form label {
    color: #222;
}

form.post-password-form label {
    font-weight: bold;
    display: block;
    font-size: .9em;
    margin-bottom: 0.4em;
}

form.post-password-form input[type='password'] {
    box-sizing: border-box;
    border: 1px solid #ddd;
    padding: 0 .75em;
    height: 2.507em;
    font-size: .97em;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    vertical-align: middle;
    background-color: #fff;
    color: #333;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: color .3s, border .3s, background .3s, opacity .3s;
}

.button,
button,
input[type='submit'],
input[type='reset'],
input[type='button'] {
    position: relative;
    display: inline-block;
    background-color: var(--primary-color);
    text-transform: uppercase;
    font-size: .97em;
    letter-spacing: .03em;
    -ms-touch-action: none;
    touch-action: none;
    cursor: pointer;
    font-weight: bolder;
    text-align: center;
    color: #fff;
    text-decoration: none;
    border: 1px solid transparent;
    vertical-align: middle;
    border-radius: 0;
    margin-top: 0;
    margin-right: 1em;
    text-shadow: none;
    line-height: 2.4em;
    min-height: 2.5em;
    padding: 0 1.2em;
    max-width: 100%;
    transition: transform .3s, border .3s, background .3s, box-shadow .3s, opacity .3s, color .3s;
    text-rendering: optimizeLegibility;
    box-sizing: border-box;
}

/* --- General Content Wrapping --- */
.page-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.page-content-wrap {
    padding: 60px 20px;
}

.entry-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-title {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0px;
    margin-bottom: 50px;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* --- Media Queries --- */
@media (max-width: 992px) {

    .icon-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
    }

    .news-thumb-wrap {
        flex: 0 0 auto;
        width: 100%;
    }

    .news-thumb-wrap img {
        height: 200px;
    }

    .hero-section {
        height: 350px;
    }

    .feature-icons {
        margin-top: -30px;
        padding: 20px;
    }

    .icon-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin-bottom: 20px;
    }
}

/* CSS đặc biệt cho template này */
.family-tree-container {
    height: calc(100vh - 150px);
    /* Trừ đi chiều cao header ước tính */
    overflow: auto;
    padding: 0;
    margin: 0;
}

div.gt-container .gt-zoom-contorl button {
    padding: 4px 8px;
    min-width: 32px;
    min-height: 32px;
    line-height: 16px;
    display: block;
    float: right;
    margin-left: 2px;
    outline: none !important;
    text-decoration: none;
    background: #ab7c2c;
    color: #fff;
    border: none;
}

/* --- Family Tree Compact Header --- */
.tree-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 999;
}

.tree-container {
    max-width: 100%;
    padding: 0 20px;
}

.tree-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    /* Slim header */
}

.tree-logo img {
    height: 60px;
    width: auto;
    display: block;
}

.tree-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.tree-nav li a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    padding: 10px 0;
    position: relative;
}

.tree-nav li a:hover,
.tree-nav li.current-menu-item a {
    color: var(--primary-color);
}

.tree-nav li a:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.tree-nav li a:hover:before,
.tree-nav li.current-menu-item a:before {
    width: 100%;
}

/* Adjust the tree full width container to account for the header */
.family-tree-full-width {
    height: calc(100vh - 60px) !important;
}

.family-tree-full-width .gt-container {
    height: 100% !important;
    max-height: 100% !important;
}

.gt-expand-compress-toggle {
    background: #fff !important;
}

/* --- Modern Home Template Styles --- */
.modern-home {
    background-color: var(--bg-soft);
}

.hero-modern {
    position: relative;
    height: 55vh;
    min-height: 450px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

.hero-modern-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/hero-modern.png') no-repeat center center/cover;
    transition: transform 5s ease;
}

.hero-modern:hover .hero-modern-bg {
    transform: scale(1.05);
}

.hero-modern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content-wrap {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.35rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 10px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--secondary-color);
    color: var(--text-dark) !important;
    transform: translateY(-3px);
}

.btn-outline {
    border: 2px solid #fff;
    color: #fff !important;
    margin-left: 20px;
}

.btn-outline:hover {
    background: #fff;
    color: var(--text-dark) !important;
    transform: translateY(-3px);
}

/* Stats Section */
.home-stats {
    background: #fff;
    padding: 30px 0;
    margin-top: -50px;
    position: relative;
    z-index: 20;
    box-shadow: var(--shadow-md);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.stat-item .counter {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-item p {
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
}

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* History Section */
.home-intro-modern {
    padding: 60px 0;
}

.intro-image img {
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.section-title-left {
    font-size: 1.8rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
    color: var(--primary-color);
}

.section-title-left::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 20px;
}

/* Features Section */
.home-features {
    background: #fdfdfd;
    padding: 60px 0;
    text-align: center;
}

.section-heading {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.features-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card-modern {
    background: #fff;
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #f0f0f0;
}

.feature-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.feature-card-modern .f-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card-modern h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-card-modern p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* News Section */
.home-news-modern {
    padding: 60px 0;
    background: #fff;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.view-all {
    color: var(--text-light);
    font-weight: 600;
    text-decoration: underline;
}

.news-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card-modern {
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.news-thumb {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card-modern:hover .news-thumb img {
    transform: scale(1.1);
}

.news-date-tag {
    position: absolute;
    bottom: 0;
    right: 20px;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-top-left-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

.news-info {
    padding: 25px;
}

.news-info h3 {
    font-size: 1.25rem;
}

/* Bottom Section */
.home-bottom {
    padding: 80px 0;
    background: var(--bg-soft);
}

.contact-info-card {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.contact-info-card h3 {
    margin-bottom: 30px;
    color: var(--primary-color);
}

.contact-info-card p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.map-wrap-modern {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .features-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .btn-outline {
        margin-left: 0;
        margin-top: 15px;
    }

    .features-grid-modern,
    .news-grid-modern {
        grid-template-columns: 1fr;
    }

    .hero-modern {
        height: auto;
        padding: 150px 0 100px;
    }
}

/* --- Gallery Page Styles --- */
.gallery-page-container {
    background-color: var(--bg-soft);
    min-height: 80vh;
}

.gallery-hero {
    background-color: var(--bg-light);
    text-align: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}

.gallery-hero .page-title {
    color: var(--primary-color);
    margin: 0;
}

.breadcrumb {
    color: var(--text-light);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.main-content-pad {
    padding-bottom: 80px;
    padding-top: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}



.gallery-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #eee;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.gallery-thumb {
    position: relative;
    padding-top: 75%;
    /* 4:3 Aspect Ratio */
    overflow: hidden;
}

.gallery-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-thumb img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay i {
    color: #fff;
    font-size: 1.5rem;
    transform: scale(0);
    transition: var(--transition);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-card:hover .gallery-overlay i {
    transform: scale(1);
}

.gallery-info {
    padding: 20px;
}

.gallery-date {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 10px;
}

.gallery-date i {
    margin-right: 5px;
}

.gallery-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
}

.gallery-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.gallery-title a:hover {
    color: var(--primary-color);
}

/* Pagination Styles */
.pagination {
    margin-top: 50px;
    text-align: center;
}

.page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.page-numbers.current,
.page-numbers:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 20px 0px;
        /* Tighter gap for mobile */
    }

    .gallery-hero .page-title {
        font-size: 2rem;
    }

    .gallery-title {
        font-size: .9rem;
        line-height: 1.4;
        margin: 0;
        font-weight: 500;
    }
}

/* --- Responsive Menu Styles --- */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
    /* Push to right if flex */
}

@media (max-width: 992px) {

    .site-header .container.mobile-flex,
    .tree-header .container.mobile-flex {
        display: flex;
        justify-content: flex-end;
        /* Toggle Right */
        align-items: center;
        position: relative;
    }

    .menu-toggle {
        display: block;
        color: var(--primary-color);
        margin: 0;
        z-index: 2001;
        padding: 5px;
    }

    .header-logo,
    .tree-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        margin: 0;
        z-index: 2000;
        text-align: center;
    }

    .header-logo img,
    .tree-logo img {
        max-height: 80px;
        width: auto;
    }

    /* Drawer Menu - Standardized Class */
    .drawer-logo {
        display: none;
    }

    .mobile-drawer-nav .drawer-logo.mobile-only {
        display: block;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
        background-color: #f9f9f9;
        margin-bottom: 15px;
        /* Add spacing */
    }

    .mobile-drawer-nav .drawer-logo img {
        max-height: 60px;
        width: auto;
    }

    .mobile-drawer-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 3000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding-top: 0;
        display: block;
    }

    .mobile-drawer-nav.toggled .container {
        padding: 0px;
    }

    .mobile-drawer-nav.toggled {
        transform: translateX(280px);
    }

    .mobile-drawer-nav ul,
    .drawer-menu-list {
        display: block;
        background: transparent;
        padding: 0;
    }

    .mobile-drawer-nav li,
    .drawer-menu-list li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .mobile-drawer-nav li a,
    .drawer-menu-list li a {
        color: #333;
        padding: 15px 20px;
        font-size: 14px;
        display: block;
        text-align: left;
        line-height: 1.5;
    }

    /* Hide hover effects on mobile */
    .mobile-drawer-nav ul li a:before,
    .drawer-menu-list li a:before {
        display: none;
    }

    /* Menu Overlay */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 2900;
        display: none;
        opacity: 0;
        transition: opacity 0.3s;
    }

    body.menu-open .menu-overlay {
        display: block;
        opacity: 1;
    }

    /* When header is sticky, ensure drawer is still accessible */
    .header-wrapper.is-sticky .mobile-drawer-nav {
        top: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Responsive Home --- */
@media (max-width: 768px) {
    button.gt-desk-zoom {
        display: none !important;
    }

    /* General Compactness */
    .container {
        padding: 0 15px;
    }

    section {
        padding: 40px 0 !important;
    }

    h2.section-heading,
    h2.section-title-left {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    /* Hero Section */
    .hero-modern {
        min-height: 320px;
        /* Reduced height */
        padding: 0 !important;
        align-items: center;
    }

    .hero-content-wrap {
        padding-top: 10px;
        /* Space for fixed header */
        text-align: center;
    }

    .hero-title {
        font-size: 1.5rem;
        line-height: 1.2;
        margin: 0px;
    }

    .hero-subtitle {
        font-size: .85rem;
        margin-bottom: 20px;
    }

    .hero-btns {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

    .hero-btns .btn {
        text-transform: none;
        padding: 10px 10px;
        font-size: 0.9rem;
        width: 100%;
        display: block;
        margin: 0px;
        letter-spacing: 0px;
    }

    .hero-btns a+a {
        margin-left: 0;
    }

    /* Stats Section */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .stat-item {
        padding: 10px;
    }

    .stat-item .counter {
        font-size: 1.8rem;
    }

    .stat-item p {
        font-size: 0.85rem;
    }

    /* Intro Section */
    .home-intro-modern .grid-2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .intro-image {
        order: -1;
        margin-bottom: 20px;
    }

    /* Features Grid */
    .features-grid-modern {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-card-modern {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 15px;
        gap: 15px;
    }

    .feature-card-modern .f-icon {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
    }

    .feature-card-modern h3 {
        font-size: 1rem;
        margin: 0 0 5px 0;
    }

    .feature-card-modern p {
        font-size: 0.85rem;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        /* Standard */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* News Section */
    .news-grid-modern {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .news-card-modern {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
        margin-bottom: 0;
        /* Reset */
    }

    .news-card-modern:last-child {
        border-bottom: none;
    }

    .news-thumb {
        width: 110px;
        height: 80px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .news-thumb img {
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
    }

    .news-date-tag {
        font-size: 0.65rem;
        padding: 2px 5px;
        bottom: 5px;
        left: 5px;
    }

    .news-info {
        padding: 0;
    }

    .news-info h3 {
        font-size: 0.95rem;
        margin-bottom: 5px;
        line-height: 1.3;
        margin-top: 0;
    }

    .news-info p {
        font-size: 0.8rem;
        margin-bottom: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: #666;
    }

    .section-header-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .section-header-flex h2 {
        margin-bottom: 0;
        font-size: 1.3rem;
    }

    /* Map & Contact */
    .home-bottom .grid-2 {
        grid-template-columns: 1fr;
    }

    .map-wrap-modern {
        height: 250px;
    }

    /* Hide Footer Links on Mobile */
    .footer-links-grid {
        display: none;
    }

    /* Blog Page / News List Mobile Styles */
    .news-list .news-item {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .news-list .news-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .news-list .news-thumb-wrap {
        width: 120px;
        flex-shrink: 0;
        margin: 0;
        /* Reset generic margins */
    }

    .news-list .news-thumb-wrap a {
        display: block;
        line-height: 0;
    }

    .news-list .news-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
        object-fit: cover;
        border-radius: 8px;
    }

    .news-list .news-date {
        display: none;
        /* Hide date overlay on mobile list if too cluttered, or keep it? User wants compact. let's hide or simple styling. */
    }

    .news-list .news-item-content {
        flex: 1;
    }

    .news-list .news-item-content h2 {
        font-size: 1rem;
        margin: 0 0 5px 0;
        line-height: 1.3;
    }

    .news-list .news-item-content h2 a {
        text-decoration: none;
        color: #333;
    }

    .news-list .news-item-content p {
        font-size: 0.85rem;
        color: #666;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.drawer-logo {
    display: none;
}

/* Ensure hidden on desktop */