/*!
Theme Name: ThaiSoundMD
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: thaisoundmd
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
	box-sizing: border-box;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	margin: 0;
	width: 100% !important;
	margin: 0 auto !important;
	background-color: #1a1818 !important;
	color: #000000;
}

main {
	display: block;
}

h1 {
	font-size: 2em;
	margin: 0.67em 0;
}

hr {
	box-sizing: content-box;
	height: 0;
	overflow: visible;
}

a {
	background-color: transparent;
	color: #4169e1;
}



a:hover,
a:focus {
	color: #191970;
	text-decoration: none;
}

img {
	border-style: none;
	max-width: 100%;
	height: auto;
}

.custom-logo {
	max-width: 100px !important;
}

button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
	margin: 0;
	color: #404040;
}

button,
input {
	overflow: visible;
}

button,
select {
	text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
	border-style: none;
	padding: 0;
}

/* Form elements styling */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	border: 1px solid;
	border-radius: 3px;
	background: #e6e6e6;
	padding: 0.6em 1em 0.4em;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
	border-color: #ccc #bbb #aaa;
}

button:active,
input[type="button"]:active {
	border-color: #aaa #bbb #bbb;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
	color: #666;
	border: 1px solid #ccc;
	border-radius: 3px;
	padding: 3px;
}

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/

/* Typography and basic elements */
body,
button,
input,
select,
textarea {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	clear: both;
}

p,
blockquote,
ul,
ol,
dl,
table,
pre,
code {
	margin-bottom: 1.5em;
}

pre {
	background: #eee;
	font-family: "Courier 10 Pitch", courier, monospace;
	padding: 1.6em;
	overflow: auto;
}

ul {
	list-style: disc;
	margin-left: 2em;
}

ol {
	list-style: decimal;
	margin-left: 2em;
}

/*--------------------------------------------------------------
# Layouts
--------------------------------------------------------------*/

/* Layout containers */
.home-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.hero-section {
	background: url('./images/hero_section_bg.webp') no-repeat center center;
	background-size: cover;
	color: white;
	text-align: center;
	padding: 100px 0;
}



.content-bg {
	margin: 0 15px;
	padding: 5px 10px;
	border-radius: 15px;
	background-color: rgba(0, 0, 0, 0.5);
}

.features-section {
	display: flex;
	justify-content: space-around;
	padding: 50px 0;
}

.feature {
	flex-basis: 30%;
	text-align: center;
}

.feature h2 {
	font-size: 2rem;
	margin-bottom: 20px;
}

.feature p {
	font-size: 1rem;
}

/*--------------------------------------------------------------
# Components
--------------------------------------------------------------*/

/* Navigation */
.main-navigation {
	display: block;
	width: 100%;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: none;
}

.menu-toggle,
.main-navigation.toggled ul {
	display: block;
}

@media screen and (min-width: 37.5em) {
	.menu-toggle {
		display: none;
	}
	.main-navigation ul {
		display: flex;
	}
}

/* สไตล์สำหรับเมนูย่อย */
.navbar-nav li:hover > .dropdown-menu {
    display: block;
}

/* ปรับแต่งเมนูย่อยใน navbar */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    margin-top: 0;
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #333 !important;
}

/* ป้องกันปัญหาการแสดงผลในหน้าจอขนาดเล็ก */
@media (max-width: 767.98px) {
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
    }
}


/* Posts and pages */
.post {
	width: 80%;
	margin: 0 auto;
}

/* Buttons */
.btn-primary,
.soundmd-download-button,
.soundmd-get-button {
	background-color: #0000FF;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 10px 20px;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.btn-primary:hover,
.soundmd-download-button:hover,
.soundmd-get-button:hover {
	background-color: #0056b3;
}

.btn-primary:focus,
.soundmd-download-button:focus,
.soundmd-get-button:focus {
	box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

/*--------------------------------------------------------------
# Plugins
--------------------------------------------------------------*/

/* WooCommerce styling */
.woocommerce-cart-form .shop_table th,
.woocommerce-cart-form .shop_table td,
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
	padding: 10px;
	border: 1px solid #ddd;
	color: #000;
}

.woocommerce-checkout .checkout-button {
	width: 100%;
	padding: 10px;
	background-color: #3498db;
	color: #fff;
	border: none;
	cursor: pointer;
}

.woocommerce-checkout .checkout-button:hover {
	background-color: #2980b9;
}

/*--------------------------------------------------------------
# Custom Components
--------------------------------------------------------------*/

/* SoundMD audio player */
.custom-audio-player .soundwave {
	background-color: #474749;
}
.custom-audio-player .loading-text,
.custom-audio-player .duration-text {
	color: #ffffff;
	border-radius: 5px;
}

.custom-audio-player .controler {
	display: flex;
	align-items: center;
	width: 100%;
}

.custom-audio-player .play-button {
	background-color: #2914e6;
	color: #ffffff;
	border: none;
	padding: 5px;
	border-radius: 50px;
	cursor: pointer;
}

.custom-audio-player .play-button:hover {
	background-color: #1d0eaa;
}

.custom-audio-player .mute-button {
	background-color: #ffa500;
	color: #ffffff;
	border: none;
	padding: 5px;
	border-radius: 30px;
	cursor: pointer;
}

.custom-audio-player .mute-button:hover {
	background-color: #ff7f00;
}

.custom-audio-player .volume-control {
	width: 150px;
}

.custom-audio-player .volume-level {
	color: #ffffff;
}

/* Info section */
.info-section {
	display: flex;
	justify-content: space-between;
	margin-bottom: 20px;
	padding: 15px 5px;
	background-color: #f9f9f9;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.info-block {
	background-color: #ffffff;
	border-radius: 8px;
	padding: 10px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	margin-right: 5px;
}
.info-title-new {
	background-color: #5850a0;
	padding: 5px 10px;
	margin: 0 -10px;
}

.info-title-other {
	background-color: #29243f;
	padding: 5px 10px;
	margin: 0 -10px;
}

.info-block:first-child {
	flex: 0 0 28%;
}

.info-block:not(:first-child) {
	flex: 0 0 23%;
}

.info-block h3 {
	font-size: 1.2rem;
	color: #ffffff;
	margin-bottom: 15px;
	border-bottom: 2px solid #e5e5e5;
	padding-bottom: 5px;
}

.info-block ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.info-block ul li {
	margin-bottom: 10px;
}

.info-block ul li a {
	color: #0073aa;
	text-decoration: none;
	transition: color 0.2s;
}

.info-block ul li a:hover {
	color: #005177;
}

.info-block:last-child {
	margin-right: 0;
}

/* Adjustments for better mobile experience */
@media (max-width: 768px) {
    .home-container {
        padding: 10px;
    }

    .hero-section {
		background: url('./images/hero_section_bg_mobile.webp') no-repeat center center;
		padding: 50px 0;
	}

    .features-section {
        flex-direction: column;
        padding: 30px 0;
    }

    .feature {
        margin-bottom: 20px;
    }

    .info-section {
        flex-direction: column;
        padding: 10px 5px;
    }

    .info-block {
        margin-bottom: 20px;
    }

    .soundmd-item {

    }

    .soundmd-info {
        margin-bottom: 10px;
    }

    .soundmd-price {
        margin-left: 0;
    }
}

/* Additional styles for improved look */
.promo-code {
    color: red;
    background-color: white;
    padding: 10px;
    max-width: 80%;
    margin: 0 auto;
    text-align: center;
    border-radius: 5px;
}


/* Utilities */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
}

.screen-reader-text:focus {
	background-color: #f1f1f1;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
}


/* ปรับปรุงการแสดงผลของรายการ SoundMD */
.soundmd-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.soundmd-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.soundmd-image {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.soundmd-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.soundmd-title {
    font-weight: bold;
    color: #333;
    text-decoration: none;
    margin-bottom: 5px;
}

.soundmd-author {
    color: #777;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.soundmd-price {
    font-weight: lighter;
    font-size: 12px;
    color: #85827f;
    margin-left: auto;
    text-align: right;
}

.author-avatar {
	margin: 10px 10px;
}



/* Media queries for responsive design */
@media (max-width: 767.98px) {
    .soundmd-search-filter {
        flex-direction: column; /* Stack items vertically on small screens */
    }
    .table {
        font-size: 0.9rem; /* Adjust font size for smaller screens */
    }
}

@media (min-width: 768px) {
    .soundmd-search-filter {
        flex-direction: row; /* Display items in a row on larger screens */
    }
}

/* Adjust table layout for mobile devices */
.table th, .table td {
    padding: 10px; /* Increase padding for touch-friendly interface */
    word-wrap: break-word; /* Ensure text wraps properly on small screens */
}

/* Pagination container */
#soundmd-pagination {
    display: flex;
    justify-content: center; /* Center the pagination on the page */
    flex-wrap: wrap; /* Allow wrapping to prevent overflow */
    margin: 20px 0;
}

/* Pagination links */
.pagination a {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px;
    background-color: #007bff;
    color: #ffffff;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-size: 1rem; /* Adjust the font size */
    min-width: 40px; /* Set a minimum width to keep the numbers aligned */
    text-align: center;
}

.pagination a:hover {
    background-color: #0056b3;
}

/* Media query for smaller screens */
@media (max-width: 767.98px) {
    .pagination a {
        padding: 5px 8px; /* Reduce padding for smaller screens */
        font-size: 0.9rem; /* Reduce font size for better fit */
    }
}


/* เพิ่มความเฉพาะเจาะจงให้กับ selector */
.navbar.navbar-expand-lg.navbar-light.bg-light {
    background-color: #ffffff !important;
    border-bottom: 1px solid #eaeaea;
}

.navbar-brand img {
    max-height: 50px !important;
    transition: transform 0.3s;
}

.navbar-brand img:hover {
    transform: scale(1.1) !important;
}

.navbar-nav .nav-link {
    color: #333 !important;
    padding: 10px 15px !important;
    transition: color 0.3s, background-color 0.3s;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
    background-color: #f8f9fa !important;
    border-radius: 5px !important;
}

.navbar-toggler {
    border-color: #007bff !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%280, 123, 255, 1%29' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}


@media (max-width: 767.98px) {
    .navbar-nav .nav-link {
        padding: 8px 12px; /* ปรับขนาด padding สำหรับหน้าจอขนาดเล็ก */
    }

    .navbar-brand img {
        max-height: 40px; /* ปรับขนาดโลโก้สำหรับหน้าจอขนาดเล็ก */
    }
}

.sdm-message-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background .2s;
}
.sdm-message-btn:hover {
  background: #005177;
}
.author-bio {
  margin-top: 10px;
  font-style: italic;
  color: #555;
}