/*
Theme Name: HR Policy Grid
Theme URI: https://hrpolicyhub.in
Author: HR Team
Description: Grid layout theme for HR Policy Hub
Version: 1.0
*/

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Header */
.site-header {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-logo {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.site-logo span {
    color: #e74c3c;
}

/* Main Navigation */
.main-nav {
    background: #2c3e50;
    padding: 0;
}

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

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: #e74c3c;
}

/* Dropdown */
.nav-menu li:hover > .sub-menu {
    display: block;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #34495e;
    min-width: 200px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    z-index: 100;
}

.sub-menu li {
    display: block;
}

.sub-menu a {
    padding: 12px 20px;
    border-bottom: 1px solid #2c3e50;
}

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

.search-form input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    width: 180px;
    font-size: 14px;
}

.search-form input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-form input:focus {
    outline: none;
    background: rgba(255,255,255,0.3);
}

.search-form button {
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    background: #e74c3c;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #c0392b;
}

/* Hero Slider - Fixed */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: 40px;
    background: #2c3e50;
}

.slider-container {
    display: flex;
    height: 100%;
    width: 100%;
}

.slide {
    min-width: 25%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.slide-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.slide:hover .slide-bg-image {
    transform: scale(1.1);
}

.slide-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    text-align: center;
    padding: 20px;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.3), transparent);
    color: #fff;
    z-index: 10;
}

.slide-category {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 5px 15px;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 10px;
    border-radius: 3px;
}

.slide-title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 10px;
}

.slide-title a {
    color: #fff;
}

.slide-title a:hover {
    color: #e74c3c;
}

.slide-meta {
    font-size: 12px;
    color: #ccc;
}

/* Main Content Layout */
.site-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    padding: 40px 0;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Card Image - Fixed */
.card-image {
    height: 250px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.card-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .card-bg-image {
    transform: scale(1.1);
}

.card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    background: #e74c3c;
}

.card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e74c3c;
    color: #fff;
    padding: 5px 15px;
    font-size: 11px;
    text-transform: uppercase;
    border-radius: 3px;
    z-index: 10;
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-title a {
    color: #2c3e50;
}

.card-title a:hover {
    color: #e74c3c;
}

.card-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

.card-meta a {
    color: #e74c3c;
}

.card-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Read More Button - Fixed */
.read-more {
    display: inline-block;
    background: #2c3e50;
    color: #fff;
    padding: 12px 25px;
    font-size: 13px;
    text-transform: uppercase;
    border-radius: 3px;
    transition: background 0.3s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.read-more:hover {
    background: #e74c3c;
    color: #fff;
}

.read-more:visited {
    color: #fff;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #fff;
    color: #2c3e50;
    border-radius: 3px;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination span.current {
    background: #e74c3c;
    color: #fff;
}

/* Sidebar */
.sidebar {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
    text-transform: uppercase;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #2c3e50;
    color: #fff;
    border-radius: 3px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: #e74c3c;
}

/* Tags */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.3s;
}

.tag:hover {
    background: #e74c3c;
    color: #fff;
}

/* Search Results Page */
.page-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: #2c3e50;
    grid-column: 1 / -1;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #e74c3c;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #bdc3c7;
    transition: color 0.3s;
}

.footer-widget a:hover {
    color: #e74c3c;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .site-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .slide {
        min-width: 50%;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .slide {
        min-width: 100%;
    }
    
    .hero-slider {
        height: 400px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-form input {
        width: 100%;
    }
}