/*
Theme Name: Soi Cầu Pro
Theme URI: https://soicaupro.com
Author: Your Name
Author URI: https://yourwebsite.com
Description: Theme WordPress chuyên nghiệp cho website soi cầu, dự đoán và kết quả xổ số với giao diện hiện đại và khả năng tùy chỉnh cao
Version: 1.0.0
License: GPL v2 or later
Text Domain: soicau-pro
*/

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Variables */
:root {
    --primary-color: #c8232c;
    --secondary-color: #ff6600;
    --accent-color: #ffd700;
    --dark-color: #1a1a1a;
    --light-color: #f8f8f8;
    --text-color: #333;
    --border-color: #e0e0e0;
    --success-color: #27ae60;
    --warning-color: #ff9800;
    --mobile-padding: 10px;
    --desktop-padding: 20px;
    --header-bg: linear-gradient(180deg, #c8232c 0%, #8b0000 100%);
    --menu-bg: #ffd700;
}

/* Base Styles - Mobile First */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background: #ffffff !important;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 0 var(--mobile-padding);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 980px;
        padding: 0 20px;
        margin: 0 auto;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 980px;
        margin: 0 auto;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 980px;
        margin: 0 auto;
    }
}

/* Mobile Header Styles */
.site-header {
    position: relative;
    z-index: 999;
    background: var(--header-bg);
}

/* Header wrapper - thống nhất chiều rộng */
.header-wrapper {
    width: 100%;
    background: inherit;
}

/* Nav wrapper - thống nhất chiều rộng với container */
.nav-wrapper {
    width: 100%;
    background: var(--dark-color);
}

.header-top-bar {
    background: #8b0000;
    padding: 5px 0;
    font-size: 12px;
    border: none;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo-icon {
    width: 30px;
    height: 30px;
}

.header-info {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
    font-size: 12px;
}

@media (min-width: 768px) {
    
    .site-header {
        position: static;
    }
    
    .site-logo {
        font-size: 28px;
    }
    
    .header-top {
        padding: 15px 0;
    }
    
    .header-info {
        display: flex !important;
        gap: 20px;
        align-items: center;
        color: #ffd700;
        margin-left: auto;
    }
    
    .header-info i {
        margin-right: 5px;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Mobile Navigation */

.main-navigation {
    display: none;
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    background: transparent;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
    z-index: 998;
    border: none;
    box-shadow: none;
}

.main-navigation.active {
    display: block;
}

.nav-menu {
    list-style: none;
    padding: 0;
}

.nav-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-menu a {
    display: block;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 15px var(--mobile-padding);
    transition: background 0.3s;
}

.nav-menu a:active {
    background: rgba(255,255,255,0.1);
}

@media (min-width: 768px) {
    .main-navigation {
        display: block;
        position: static;
        background: transparent;
        max-height: none;
        padding: 0;
        border: none;
        box-shadow: none;
    }
    
    .nav-wrapper {
        background: transparent;
        border: none;
    }
    
    .nav-menu {
        display: flex;
        gap: 15px;
        justify-content: center;
        align-items: center;
    }
    
    .nav-menu li {
        border-bottom: none;
    }
    
    .nav-menu a {
        padding: 10px 20px;
        border-radius: 5px;
        color: white;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.3s;
    }
    
    .nav-menu a:hover {
        background: var(--primary-color);
        transform: translateY(-2px);
    }
}

/* Mobile Quick Menu Bar */

.quick-menu-bar {
    padding: 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: transparent;
    border: none;
    box-shadow: none;
}

.menu-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--mobile-padding);
}

.quick-menu {
    display: flex;
    gap: 8px;
    min-width: max-content;
}

.quick-menu-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .quick-menu-bar {
        padding: 15px 0;
        overflow-x: visible;
        background: transparent;
        border: none;
    }
    
    .menu-wrapper {
        padding: 0 var(--desktop-padding);
    }
    
    .quick-menu {
        justify-content: center;
        min-width: auto;
    }
    
    .quick-menu-item {
        padding: 10px 20px;
        font-size: 14px;
        gap: 8px;
        border-radius: 25px;
    }
}

.quick-menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background: #8b0000;
}

.quick-menu-item.soi-cau {
    background: #ff6600;
}

.quick-menu-item.thong-ke {
    background: #009688;
}

.quick-menu-item.ket-qua {
    background: #4CAF50;
}

.quick-menu-item.quay-thu {
    background: #9C27B0;
}

.quick-menu-icon {
    width: 20px;
    height: 20px;
}

/* Single Column Layout */
.single-column-layout {
    max-width: 100%;
    margin: 0 auto;
}

.site-main {
    display: block;
    width: 100%;
    margin: 5px 0;
}

.content-area {
    width: 100%;
    max-width: 100%;
}

/* Hide sidebar on homepage */
.widget-area {
    display: none;
}

/* For archive pages with sidebar */
.with-sidebar .site-main {
    display: block;
}

.with-sidebar .widget-area {
    display: block;
    width: 100%;
    margin-top: 30px;
}

@media (min-width: 992px) {
    .with-sidebar .site-main {
        display: flex;
        gap: 30px;
    }
    
    .with-sidebar .content-area {
        flex: 1;
    }
    
    .with-sidebar .widget-area {
        width: 300px;
        margin-top: 0;
    }
}

/* Homepage Sections - Full Width */
.homepage-section {
    background: white;
    padding: 0;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .homepage-section {
        margin-bottom: 12px;
    }
}

@media (min-width: 992px) {
    .homepage-section {
        margin-bottom: 15px;
    }
}

.section-header {
    display: block !important;
    padding: 10px 15px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff6600 100%);
    color: white;
    margin: 0;
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
    visibility: visible !important;
    opacity: 1 !important;
}

.section-content {
    padding: 5px;
}

/* Section without header - Removed border-top when title is hidden */
.homepage-section:not(:has(.section-header)) .section-content {
    /* border-top removed when title is hidden */
    border-radius: 5px 5px 0 0;
}

@media (min-width: 768px) {
    .section-header {
        padding: 12px 20px;
    }
    
    .section-content {
        padding: 8px;
    }
}

@media (min-width: 992px) {
    .section-header {
        padding: 15px 25px;
    }
    
    .section-content {
        padding: 0px;
    }
}

/* For sections with no padding content */
.section-content.no-padding {
    padding: 0;
}

/* For full width tables */
.section-content.full-width {
    padding: 0;
    overflow-x: auto;
}

.section-title {
    font-size: 16px;
    color: white !important;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 18px;
    }
}

/* Section more link removed */

/* Mobile Results Table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -var(--mobile-padding);
    padding: 0 var(--mobile-padding);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.results-table th,
.results-table td {
    padding: 4px 3px;
    text-align: center;
    border: 1px solid var(--border-color);
    font-size: 12px;
}

@media (min-width: 768px) {
    .table-responsive {
        overflow-x: visible;
        margin: 0;
        padding: 0;
    }
    
    .results-table {
        min-width: auto;
    }
    
    .results-table th,
    .results-table td {
        padding: 6px 8px;
        font-size: 13px;
    }
}

.results-table th {
    background: #ffd700;
    color: #8b0000;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
}

.results-table tr:nth-child(even) {
    background: #f9f9f9;
}

.result-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    font-weight: bold;
    margin: 2px;
    font-size: 14px;
}

.result-special {
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    width: 36px;
    height: 36px;
    line-height: 32px;
    border: 2px solid #ffd700;
}

@media (min-width: 768px) {
    .result-number {
        width: 35px;
        height: 35px;
        line-height: 35px;
        margin: 0 2px;
        font-size: 14px;
    }
    
    .result-special {
        font-size: 18px;
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
}

/* Mobile Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

@media (min-width: 576px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 10px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .stat-card {
        padding: 20px;
        border-radius: 10px;
    }
    
    .stat-number {
        font-size: 32px;
        margin-bottom: 5px;
    }
    
    .stat-label {
        font-size: 14px;
    }
}

/* Prediction Form */
.prediction-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
}

.btn {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #c0392b;
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #2980b9;
}

/* Mobile Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 576px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.post-content {
    padding: 15px;
}

.post-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.post-meta {
    font-size: 12px;
    color: #999;
}

/* Sidebar Widgets */
.widget {
    background: white;
    padding: 0;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
}

.widget-title {
    font-size: 14px;
    margin: 0;
    padding: 10px 15px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff6600 100%);
    color: white;
    text-transform: uppercase;
    font-weight: bold;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.widget a:hover {
    color: var(--primary-color);
}

/* Lucky Numbers Widget */
.lucky-numbers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 15px;
}

.lucky-number {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--primary-color);
    font-weight: bold;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    font-size: 16px;
    transition: all 0.3s;
}

.lucky-number:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Section Specific Styles */

/* Results Section */
.results-section .results-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.results-section .tab-button {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.results-section .tab-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.results-section .results-date {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.results-section .results-stats {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #fff3cd;
    border-top: 2px solid #ffd700;
    margin-top: 15px;
}

/* Soi Cau Section */
.soicau-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.soicau-box {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.soicau-box-header {
    padding: 6px 8px;
    color: white;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.soicau-box-header.mien-bac {
    background: linear-gradient(90deg, #c8232c, #ff6600);
}

.soicau-box-header.mien-nam {
    background: linear-gradient(90deg, #009688, #4CAF50);
}

.soicau-box-header.mien-trung {
    background: linear-gradient(90deg, #9C27B0, #673AB7);
}

.soicau-box-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
}

.soicau-box-content {
    padding: 5px;
    background: #f9f9f9;
}

.soicau-items {
    margin-bottom: 8px;
}

.soicau-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    padding: 4px 6px;
    background: white;
    border-radius: 3px;
}

.soicau-item.vip {
    background: #fff3cd;
    border-left: 3px solid #ffd700;
}

.soicau-item .label {
    flex: 0 0 80px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.soicau-item .numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.soicau-item .number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #c8232c;
    border-radius: 50%;
    color: #c8232c;
    font-weight: bold;
    font-size: 14px;
}

.soicau-item .number.special {
    background: #c8232c;
    color: white;
    border-color: #ffd700;
}

.soicau-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    font-size: 12px;
}

.soicau-stats .stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.soicau-stats .stat i {
    color: #ff6600;
}

.soicau-item .numbers.small {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.soicau-box-header .date {
    font-size: 12px;
    opacity: 0.9;
}

.soicau-tips {
    background: #fff3cd;
    border: 1px solid #ffd700;
    border-radius: 5px;
    overflow: hidden;
}

.tips-header {
    background: #ffd700;
    color: #333;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 14px;
}

.tips-content {
    padding: 6px 8px;
}

.tips-content ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.tips-content li {
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

/* Statistics Section */
.stats-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.stat-box {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-box-header {
    background: linear-gradient(90deg, #009688, #4CAF50);
    color: white;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
	border-radius: 0px !important;
}

.stat-box-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
}

.stat-box-header .badge {
    background: #ff6600;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.stat-box-header .period {
    font-size: 12px;
    opacity: 0.9;
}

.stat-box-content {
    padding: 6px;
    background: #f9f9f9;
}

/* Statistics Tables and Grids */
.stat-table {
    width: 100%;
    border-collapse: collapse;
}

.stat-table th {
    background: #ffd700;
    color: #333;
    padding: 4px 6px;
    font-size: 12px;
    text-align: left;
}

.stat-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.stat-table tr.highlight {
    background: #fff3cd;
}

.stat-table .number-badge {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: white;
    border: 2px solid #c8232c;
    border-radius: 50%;
    color: #c8232c;
    font-weight: bold;
}

/* Frequency Grid */
.frequency-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
}

@media (max-width: 576px) {
    .frequency-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.freq-item {
    text-align: center;
    padding: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    position: relative;
}

.freq-item.hot {
    background: #ffebee;
    border-color: #ff6600;
}

.freq-item.cold {
    background: #e3f2fd;
    border-color: #2196F3;
}

.freq-number {
    display: block;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.freq-count {
    display: block;
    font-size: 11px;
    color: #666;
}

/* Head Tail Stats */
.head-tail-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 576px) {
    .head-tail-stats {
        grid-template-columns: 1fr;
    }
}

.stat-section h4 {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px dashed #ddd;
}

.number-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ht-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
}

.ht-number.hot {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
}

.ht-number.cold {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

/* Footer */
.site-footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    margin-bottom: 15px;
    color: white;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    padding: 5px 0;
}

.footer-widget a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer-widget a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Touch-friendly elements for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .quick-menu-item,
    .nav-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    input,
    select,
    textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Bottom Navigation for Mobile */
.mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 997;
    padding: 5px 0;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    padding: 8px 5px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary-color);
}

.mobile-bottom-nav .nav-icon {
    font-size: 20px;
}

@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* Add padding to body for fixed bottom nav on mobile */
body {
    padding-bottom: 60px;
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
}

/* Loading Animation */
.loader {
    border: 3px solid var(--light-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Customizer Edit Button */
.edit-section-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.homepage-section:hover .edit-section-btn {
    opacity: 1;
}

/* ============================================
   IMAGE RESPONSIVE FIX - Prevent image overflow
   ============================================ */

/* Base image styles - Apply to all images */
img {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}

/* WordPress content images */
.entry-content img,
.post-content img,
.page-content img,
.comment-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* WordPress image classes */
.wp-post-image,
.attachment-post-thumbnail,
.size-full,
.size-large,
.size-medium,
.size-thumbnail {
    max-width: 100% !important;
    height: auto !important;
}

/* WordPress alignment classes */
.alignnone,
.aligncenter {
    max-width: 100% !important;
    height: auto !important;
}

.alignleft,
.alignright {
    max-width: 50% !important;
    height: auto !important;
}

.alignnone img,
.aligncenter img,
.alignleft img,
.alignright img {
    max-width: 100% !important;
    height: auto !important;
}

/* WordPress caption */
.wp-caption {
    max-width: 100% !important;
}

.wp-caption img {
    max-width: 100% !important;
    height: auto !important;
}

/* WordPress Gutenberg blocks */
.wp-block-image,
.wp-block-media-text,
.wp-block-cover,
.wp-block-gallery {
    max-width: 100% !important;
}

.wp-block-image img,
.wp-block-media-text img,
.wp-block-cover img,
.wp-block-gallery img {
    max-width: 100% !important;
    height: auto !important;
}

/* Figure elements */
figure {
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
}

figure img {
    max-width: 100% !important;
    height: auto !important;
}

/* Images in links */
a img {
    max-width: 100% !important;
    height: auto !important;
}

/* Prevent inline styles from breaking responsive */
.entry-content img[style],
.post-content img[style],
.page-content img[style] {
    max-width: 100% !important;
    height: auto !important;
}

/* Override inline width/height attributes */
img[width],
img[height] {
    max-width: 100% !important;
    height: auto !important;
}

/* Mobile specific image fixes */
@media (max-width: 767px) {
    /* Remove float on mobile - center all images */
    .alignleft,
    .alignright {
        float: none !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100% !important;
    }
    
    /* Center all images on mobile */
    .entry-content img,
    .post-content img,
    .page-content img {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* WordPress blocks on mobile */
    .wp-block-image.alignleft,
    .wp-block-image.alignright {
        float: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        max-width: 100% !important;
    }
    
    /* Gallery on mobile */
    .wp-block-gallery,
    .gallery {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .wp-block-gallery .wp-block-image,
    .gallery-item {
        max-width: 100% !important;
    }
    
    /* Caption text */
    .wp-caption-text,
    figcaption {
        font-size: 12px;
        padding: 5px;
    }
}

/* Tablet specific */
@media (min-width: 768px) and (max-width: 1024px) {
    .alignleft,
    .alignright {
        max-width: 45% !important;
    }
}

/* Additional safety for embedded media */
iframe,
embed,
object,
video {
    max-width: 100% !important;
    height: auto;
}

