/**
 * May88 Theme Custom Styles
 * 
 * @package May88_Theme
 */

/* ================================
   Additional Custom Styles
================================ */

/* Post Cards */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.post-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 25px;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--text-light);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
}

.post-excerpt {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.read-more:hover {
    color: var(--accent-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
}

.no-posts p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
}

/* Entry Content */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.entry-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--accent-color);
    margin: 30px 0 15px;
}

.entry-content ul,
.entry-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.entry-content ul li,
.entry-content ol li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.85);
}

.entry-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.entry-content a:hover {
    color: var(--accent-color);
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

.entry-content th,
.entry-content td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.entry-content th {
    background: var(--primary-color);
    color: var(--text-light);
    font-weight: 600;
}

.entry-content td {
    background: var(--bg-card);
}

/* Widget Area */
.widget-area {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.widget ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 15px;
}

.search-form input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-form button {
    padding: 12px 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs .separator {
    margin: 0 10px;
    color: var(--primary-color);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    fill: var(--text-light);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    padding: 15px 25px;
    background: var(--bg-card);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1001;
    transform: translateX(150%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.error {
    border-left-color: #dc3545;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .widget-area {
        margin-top: 40px;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .cta-section,
    .scroll-to-top,
    .nav-mobile {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .page-content {
        padding: 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #ff8533;
        --border-color: #4a4a6a;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================
   Image Styles
================================ */

/* Hero Image */
.hero-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* Content Images */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.content-image {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.content-image:hover img {
    transform: scale(1.03);
}

/* Page Header with Image Support */
.page-header {
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(22, 33, 62, 0.95) 100%);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* Responsive Images */
@media (max-width: 992px) {
    .hero-section .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .content-image {
        margin: 20px 0;
        border-radius: 10px;
    }
    
    .hero-image {
        border-radius: 15px;
    }
}

/* Image Loading Animation */
.content-image img,
.hero-image img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Lazy Loading Placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-dark) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
}

img[loading="lazy"].loaded {
    background: none;
}
