/* ==========================================
   ตำรวจภูธรจังหวัดสิงห์บุรี - Custom Styles
   ========================================== */

/* Root Variables */
:root {
    --wp--preset--aspect-ratio--square: 1;
    --wp--preset--aspect-ratio--4-3: 4/3;
    --wp--preset--aspect-ratio--3-4: 3/4;
    --wp--preset--aspect-ratio--3-2: 3/2;
    --wp--preset--aspect-ratio--2-3: 2/3;
    --wp--preset--aspect-ratio--16-9: 16/9;
    --wp--preset--aspect-ratio--9-16: 9/16;
    --wp--preset--color--black: #000000;
    --wp--preset--color--cyan-bluish-gray: #abb8c3;
    --wp--preset--color--white: #ffffff;
    --wp--preset--color--pale-pink: #f78da7;
    --wp--preset--color--vivid-red: #cf2e2e;
    --primary-color: #9b0000;
    --header-bg: #45181b;
    --text-color: #202124;
    --heading-color: #111111;
}

/* Base Styles */
body {
    margin: 0;
    padding: 0;
    color: var(--text-color);
    font-family:
        "Prompt",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading-color);
}

a,
a:visited {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover,
a:focus,
a:active {
    color: var(--primary-color);
}

/* Header Styles */
.site-header {
    background-color: #fff;
}

/* Navigation Bar */
.navbar-menus {
    background-color: var(--header-bg);
    padding: 0;
}

.navbar-menus .navbar-nav {
    width: 100%;
}

.navbar-menus .nav-item {
    position: relative;
}

.navbar-menus .nav-link {
    color: #dbdbdb !important;
    padding: 15px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-menus .nav-link:hover,
.navbar-menus .nav-link:focus,
.navbar-menus .nav-item.active .nav-link,
.navbar-menus .nav-item.show .nav-link {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu */
.navbar-menus .dropdown-menu {
    background-color: var(--header-bg);
    border: none;
    border-radius: 0;
    margin-top: 0;
    padding: 0;
    min-width: 250px;
    box-shadow: none;
}

.navbar-menus .dropdown-menu li {
    list-style: none;
}

.navbar-menus .dropdown-item {
    color: #dbdbdb !important;
    padding: 12px 20px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar-menus .dropdown-item:last-child {
    border-bottom: none;
}

.navbar-menus .dropdown-item:hover,
.navbar-menus .dropdown-item:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Navbar Brand */
.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand .site-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--heading-color);
}

/* Mobile Menu Toggle */
.wpdt-nav-toggler {
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpdt-nav-toggler:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.wpdt-nav-toggler .material-icons {
    font-size: 28px;
    color: var(--header-bg);
}

/* Mobile Navigation */
@media (max-width: 991px) {
    .navbar-menus {
        padding: 0;
    }

    .navbar-menus .navbar-collapse {
        background-color: var(--header-bg);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .navbar-menus .navbar-nav {
        padding: 10px 0;
    }

    .navbar-menus .nav-link {
        padding: 12px 20px;
    }

    .navbar-menus .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.2);
    }

    .navbar-menus .dropdown-item {
        padding-left: 40px;
    }

    .navbar-menus .dropdown-toggle::after {
        float: right;
        margin-top: 8px;
    }
}

/* Sticky Header */
.site-header.sticky.fixed {
    background-color: var(--header-bg) !important;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.site-header.sticky.fixed .navbar-brand,
.site-header.sticky.fixed .nav-link {
    color: #ffffff !important;
}

/* Carousel */
.carousel-item-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Elementor Sections */
.elementor-section {
    padding: 20px 0;
}

.elementor-heading-title {
    font-weight: 600;
    margin-bottom: 20px;
}

.elementor-widget-container {
    width: 100%;
}

/* Buttons */
.btn-primary,
.btn-light,
.elementor-button {
    padding: 8px 20px !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.btn-primary,
.elementor-button {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.elementor-button:hover {
    color: #ffffff !important;
    background-color: #7a0000 !important;
    border-color: #7a0000 !important;
}

.btn-primary:focus,
.btn-light:focus,
.elementor-button:focus {
    box-shadow: none !important;
}

/* Divider */
.elementor-divider {
    padding: 10px 0;
}

.elementor-divider-separator {
    display: flex;
    align-items: center;
}

.elementor-divider__text {
    padding: 0 10px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    background-color: var(--header-bg) !important;
    color: #fff;
    padding: 20px 0;
}

.site-footer .footer-info {
    padding: 10px 0;
    text-align: center;
}

.site-footer a {
    color: #fff;
}

/* TikTok Embed */
.tiktok-embed {
    max-width: 100%;
    margin: 0 auto;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

/* Font Resizer */
.zeno_font_resizer a {
    padding: 0 5px;
    color: var(--text-color);
}

.zeno_font_resizer .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* PDPA Popup */
.dpdpa--popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    z-index: 9999;
    display: none;
}

.dpdpa--popup-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.dpdpa--popup-button {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
}

.dpdpa--popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--header-bg);
        padding: 15px;
    }

    .navbar-nav .nav-link {
        color: #fff !important;
        padding: 10px 15px;
    }

    .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.1) !important;
        border: none;
    }
}

@media (max-width: 767px) {
    .navbar-brand .site-name {
        font-size: 1rem;
    }

    .elementor-col-33 {
        width: 100%;
    }
}

/* Commander Section */
.elementor-inner-section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* News Section Placeholder */
.elementor-widget-container p {
    padding: 40px 20px;
    color: #666;
}

/* Grid Layout */
.elementor-col-33 {
    width: 33.333%;
    padding: 10px;
}

.elementor-col-50 {
    width: 50%;
    padding: 10px;
}

.elementor-col-100 {
    width: 100%;
}

@media (max-width: 768px) {
    .elementor-col-33,
    .elementor-col-50 {
        width: 100%;
    }
}

/* Material Icons for Menu Toggle */
.material-icons {
    font-family: "Material Icons";
    font-size: 24px;
}

.wpdt-nav-toggler {
    cursor: pointer;
    padding: 5px;
}

/* Skip Link */
.pojo-skip-link {
    position: absolute;
    left: -9999px;
}

.pojo-skip-link:focus {
    left: 0;
    z-index: 10000;
    background: #fff;
    padding: 10px;
}

/* Header Logo */
.navbar-brand img {
    max-height: 60px;
}

/* Font Resizer */
.zeno_font_resizer_minus {
    font-size: 0.7em;
}

.zeno_font_resizer_add {
    font-size: 1.3em;
}

/* News Section Dark Theme */
.news-section {
    padding: 15px;
    margin-top: 0;
}
.news-section.news-dark {
    background-color: #7c5d5f;
    margin-top: 0;
}

.news-section.news-dark .news-label {
    color: #ddd;
}

.news-section.news-dark h2 {
    color: #fff;
}

.news-section.news-dark .news-content {
    color: #eee;
}

/* News Section 3 (no margin-top) */
.news-section.news-dark-alt {
    background-color: #7c5d5f;
}

.news-section.news-dark-alt .news-label {
    color: #ddd;
}

.news-section.news-dark-alt h2 {
    color: #fff;
}

.news-section.news-dark-alt .news-content {
    color: #eee;
}

/* Social Section */
.social-section {
    padding-top: 0;
}

/* Facebook Page Plugin */
.fb-page {
    width: 100%;
}

/* Hero Slideshow (Swiper) */
.hero-section {
    position: relative;
}
.heroSwiper {
    width: 100%;
}
.heroSwiper .swiper-slide {
    display: flex;
    justify-content: center;
    background: #000;
}
.heroSwiper .swiper-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}
.heroSwiper .swiper-button-next,
.heroSwiper .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.28);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: background 0.2s;
}
.heroSwiper .swiper-button-next:hover,
.heroSwiper .swiper-button-prev:hover {
    background: var(--primary-color);
}
.heroSwiper .swiper-button-next::after,
.heroSwiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: 700;
}
.heroSwiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.7;
}
.heroSwiper .swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
}
