/*
Theme Name: Huynhchicong
Theme URI: https://example.com/my-freeeducationweb-theme/
Author: Cong
Author URI: https://example.com/
Description: Theme WordPress dua tren giao dien FreeEducationWeb.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, featured-images
Text Domain: my-freeeducationweb-theme
*/

/* DÁN TOÀN BỘ CSS TỪ FILE HTML TĨNH VÀO ĐÂY */
/* (CSS bạn đã có từ bước trước) */

body, h1, h2, h3, p, ul, li, a {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    overflow: hidden; /* Clear floats */
}

/* Header */
header.site-header { /* Cập nhật selector nếu cần */
    background: #fff;
    color: #333;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

header.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.site-header .site-title a {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}
header.site-header .site-title a:hover {
    color: #1abc9c;
}

header.site-header nav ul {
    list-style: none;
    display: flex;
}
header.site-header nav ul li {
    margin-left: 20px;
}
header.site-header nav ul li a {
    color: #555;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
}
header.site-header nav ul li a:hover,
header.site-header nav ul li.current-menu-item a, /* WordPress class */
header.site-header nav ul li.current_page_item a { /* WordPress class */
    color: #1abc9c;
    border-bottom: 2px solid #1abc9c;
}


/* Main Content Area */
.main-content {
    padding: 20px 0;
    display: flex;
    gap: 20px; /* Khoảng cách giữa content và sidebar */
}

.content-area {
    flex: 3; /* Content chiếm 3 phần */
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.post-item, article.post { /* Thêm class .post của WordPress */
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #eee;
}
.post-item:last-child, article.post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.post-item .entry-title a, article.post .entry-title a {
    font-size: 1.6em;
    color: #0073aa; /* Màu tiêu đề bài viết gốc */
    text-decoration: none;
}
.post-item .entry-title a:hover, article.post .entry-title a:hover {
    color: #1abc9c;
    text-decoration: underline;
}

.post-item .entry-meta, article.post .entry-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 10px;
}
.post-item .entry-meta span, article.post .entry-meta span {
    margin-right: 15px;
}

.post-item .entry-summary p, article.post .entry-content p, article.post .entry-summary p {
    margin-bottom: 15px;
}

.post-item .read-more, article.post .read-more {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
}
.post-item .read-more:hover, article.post .read-more:hover {
    background: #005a8e;
}

/* Sidebar */
.sidebar, aside.widget-area { /* Thêm class .widget-area của WordPress */
    flex: 1; /* Sidebar chiếm 1 phần */
}

.widget {
    background: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.widget-title {
    font-size: 1.2em;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.widget ul {
    list-style: none;
    padding-left: 0; /* Reset padding cho ul trong widget */
}
.widget ul li {
    margin-bottom: 8px;
}
.widget ul li a {
    text-decoration: none;
    color: #0073aa;
}
.widget ul li a:hover {
    color: #1abc9c;
    text-decoration: underline;
}
.widget input[type="search"] {
    width: calc(100% - 22px); /* Điều chỉnh cho padding và border */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
 .widget input[type="submit"], .widget button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 3px;
    margin-top: 5px;
}
.widget input[type="submit"]:hover, .widget button:hover {
     background: #005a8e;
}

/* Footer */
footer.site-footer { /* Cập nhật selector nếu cần */
    background: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}
footer.site-footer p {
    font-size: 0.9em;
}
footer.site-footer a {
    color: #1abc9c;
    text-decoration: none;
}
footer.site-footer a:hover {
    text-decoration: underline;
}

/* WordPress Core CSS Classes */
.alignnone {
    margin: 5px 20px 20px 0;
}
.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}
.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}
.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}
a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}
a img.alignnone {
    margin: 5px 20px 20px 0;
}
a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}
a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%; /* Image does not overflow the content area */
    padding: 5px 3px 10px;
    text-align: center;
}
.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}
.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}
.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}
.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}
.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
}


/* Responsive cơ bản */
@media (max-width: 768px) {
    header.site-header .container {
        flex-direction: column;
        text-align: center;
    }
    header.site-header nav ul {
        margin-top: 10px;
        flex-direction: column;
    }
    header.site-header nav ul li {
        margin: 5px 0;
    }
    .main-content {
        flex-direction: column;
    }
    .content-area, .sidebar, aside.widget-area {
        flex: none; /* Bỏ flex sizing */
        width: 100%;
    }
}

/* Featured Courses Section
-------------------------------------------------------------- */
.featured-courses-section {
    padding: 40px 0; /* Khoảng đệm trên dưới cho section */
    background-color: #fff; /* Hoặc màu nền bạn muốn cho section này, trang gốc có vẻ là trắng hoặc rất nhạt */
    /* border-bottom: 1px solid #eee; /* Optional: đường kẻ phân cách với phần blog */
}

.courses-button-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.btn-free-courses {
    display: inline-block;
    background-color: #e91e63; /* Màu hồng giống ảnh */
    color: #fff;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 25px; /* Bo tròn các góc */
    transition: background-color 0.3s ease;
}

.btn-free-courses .dashicons {
    font-size: 1.3em; /* Kích thước icon */
    line-height: 1; /* Đảm bảo icon canh giữa theo chiều dọc */
}

.btn-free-courses:hover {
    background-color: #c2185b; /* Màu hồng đậm hơn khi hover */
    color: #fff;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Responsive grid, tự động điều chỉnh số cột */
    gap: 25px; /* Khoảng cách giữa các thẻ khóa học */
}

.course-card {
    background-color: #fff;
    border: 1px solid #e0e0e0; /* Viền nhẹ cho thẻ */
    border-radius: 8px; /* Bo góc nhẹ cho thẻ */
    overflow: hidden; /* Đảm bảo bo góc áp dụng cho ảnh */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex; /* Cho phép nội dung co giãn */
    flex-direction: column; /* Sắp xếp nội dung theo chiều dọc */
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.course-card-link {
    text-decoration: none;
    color: inherit; /* Kế thừa màu chữ từ cha */
    display: flex;
    flex-direction: column;
    height: 100%; /* Cho phép link chiếm toàn bộ thẻ */
}

.course-card-image img {
    width: 100%;
    height: 180px; /* Chiều cao cố định cho ảnh, bạn có thể điều chỉnh */
    object-fit: cover; /* Đảm bảo ảnh phủ kín mà không bị méo */
    display: block;
}

.course-card-content {
    padding: 20px;
    flex-grow: 1; /* Cho phép phần content này lớn lên để chiếm không gian còn lại */
    display: flex;
    flex-direction: column;
}

.course-card-title {
    font-size: 1.25em; /* Cỡ chữ tiêu đề khóa học */
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

.course-card-description {
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    margin-bottom: 0; /* Xóa margin dưới của đoạn mô tả cuối cùng */
    flex-grow: 1; /* Cho phép mô tả lớn lên */
}

/* Responsive cho grid nhỏ hơn */
@media (max-width: 560px) {
    .courses-grid {
        grid-template-columns: 1fr; /* 1 cột trên màn hình nhỏ */
    }
}

/* Remove list style from content lists */
.entry-content ul,
.entry-summary ul,
.page-content ul, /* For page content */
.comment-content ul { /* For comment content if needed */
    list-style: none; /* Removes bullets */
    padding-left: 0;  /* Removes default left padding often associated with lists */
}

/* You might also want to remove it for ordered lists if they appear without numbers */
.entry-content ol,
.entry-summary ol,
.page-content ol,
.comment-content ol {
    list-style: none; /* Removes numbers/letters */
    padding-left: 0;  /* Removes default left padding */
}

/* Optional: If you want to add some margin to the list items to simulate indentation */
.entry-content ul li,
.entry-content ol li,
.entry-summary ul li,
.entry-summary ol li,
.page-content ul li,
.page-content ol li {
    /* margin-left: 20px; /* Adjust as needed */
    /* Hoặc bạn có thể dùng padding nếu muốn khoảng cách bên trong li */
    /* padding-left: 20px; */
    margin-bottom: 0.5em; /* Add some space between list items */
}

/* WooCommerce Product Grid Styling
-------------------------------------------------------------- */
.woocommerce-products-area .products { /* Nhắm mục tiêu cụ thể đến khu vực này */
    list-style: none;
    padding-left: 0;
    margin: 0 -15px; /* Bù trừ cho padding của .product */
    display: grid; /* Hoặc display: flex; flex-wrap: wrap; */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 30px; /* Khoảng cách giữa các sản phẩm */
}

.woocommerce-products-area .products li.product {
    padding: 0 15px; /* Padding cho mỗi sản phẩm nếu dùng display: flex */
    margin-bottom: 30px; /* Nếu dùng display: flex */
    text-align: center; /* Căn giữa nội dung sản phẩm */
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}
.woocommerce-products-area .products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.woocommerce-products-area .products li.product a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce-products-area .products li.product img {
    width: 100%;
    height: auto; /* Hoặc chiều cao cố định nếu muốn */
    /* height: 200px; */
    /* object-fit: cover; */
    margin-bottom: 15px;
    border-radius: 0; /* Bỏ bo góc nếu ảnh đã có viền */
}

.woocommerce-products-area .products li.product .woocommerce-loop-product__title {
    font-size: 1.1em; /* Điều chỉnh cỡ chữ tiêu đề sản phẩm */
    color: #333;
    margin-bottom: 10px;
    padding: 0 15px; /* Thêm padding nếu cần */
    flex-grow: 1; /* Đẩy giá và nút xuống dưới */
}

.woocommerce-products-area .products li.product .price {
    font-size: 1.2em;
    color: #0073aa; /* Màu giá sản phẩm */
    font-weight: bold;
    margin-bottom: 15px;
    padding: 0 15px;
}
.woocommerce-products-area .products li.product .price ins { /* Giá khuyến mãi */
    color: #e91e63; /* Màu giá khuyến mãi */
    text-decoration: none;
}
.woocommerce-products-area .products li.product .price del { /* Giá gốc bị gạch */
    font-size: 0.8em;
    color: #777;
    margin-left: 5px;
}


.woocommerce-products-area .products li.product .button.add_to_cart_button,
.woocommerce-products-area .products li.product .button.product_type_simple,
.woocommerce-products-area .products li.product .button.product_type_variable {
    background-color: #0073aa; /* Màu nút "Thêm vào giỏ hàng" */
    color: #fff;
    border: none;
    padding: 10px 15px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9em;
    border-radius: 5px;
    display: inline-block;
    margin: 0 auto 15px auto; /* Căn giữa nút và thêm margin dưới */
    transition: background-color 0.3s ease;
}

.woocommerce-products-area .products li.product .button:hover {
    background-color: #005a8e; /* Màu nút khi hover */
    color: #fff;
}

/* Xóa dấu chấm của danh sách mặc định nếu nó vẫn còn */
.woocommerce-products-area ul:not(.products) li,
.woocommerce-products-area ol li {
    list-style-type: none !important;
    padding-left: 0 !important;
}
.woocommerce-products-area ul:not(.products),
.woocommerce-products-area ol {
    padding-left: 0 !important;
}