/* Walaway Blog - Brand Stylesheet */

:root {
    --wala-green: #7CB342;
    --wala-green-dark: #689F38;
    --way-teal: #26A69A;
    --way-teal-dark: #00897B;
    --sun-orange: #FF9800;
    --sun-orange-dark: #F57C00;
    --dark: #2D3436;
    --gray: #636E72;
    --light-gray: #F5F6FA;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, var(--wala-green), var(--way-teal));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-gray);
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--way-teal);
    transition: color 0.3s;
}

a:hover {
    color: var(--wala-green);
}

/* Header */
.header {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: var(--dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav a:hover::after {
    width: 100%;
}

.nav a.active {
    color: var(--way-teal);
}

/* Hero Section */
.hero {
    background: var(--gradient);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

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

/* Post Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Post Card */
.post-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gradient);
}

.post-card-body {
    padding: 25px;
}

.post-card-category {
    display: inline-block;
    background: var(--light-gray);
    color: var(--way-teal);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.post-card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark);
    line-height: 1.4;
}

.post-card-title:hover {
    color: var(--way-teal);
}

.post-card-excerpt {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray);
    border-top: 1px solid var(--light-gray);
    padding-top: 15px;
}

/* Single Post */
.single-post {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.single-post-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.single-post-content {
    padding: 40px;
}

.single-post-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.single-post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
    color: var(--gray);
    font-size: 0.9rem;
}

.single-post-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.single-post-body h2 {
    color: var(--way-teal);
    margin: 30px 0 15px;
}

.single-post-body p {
    margin-bottom: 20px;
}

/* Categories Sidebar */
.sidebar {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.sidebar h3 {
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wala-green);
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    color: var(--dark);
    display: flex;
    justify-content: space-between;
}

.category-list a:hover {
    color: var(--way-teal);
}

.category-count {
    background: var(--light-gray);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 179, 66, 0.3);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--way-teal);
    border: 2px solid var(--way-teal);
}

.btn-secondary:hover {
    background: var(--way-teal);
    color: var(--white);
}

.btn-orange {
    background: var(--sun-orange);
    color: var(--white);
}

.btn-orange:hover {
    background: var(--sun-orange-dark);
}

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

.pagination a, .pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--white);
    color: var(--dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.pagination a:hover, .pagination .active {
    background: var(--gradient);
    color: var(--white);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 50px 20px 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer h4 {
    color: var(--wala-green);
    margin-bottom: 20px;
}

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

.footer a:hover {
    color: var(--sun-orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .single-post-content {
        padding: 25px;
    }
    
    .single-post-title {
        font-size: 1.6rem;
    }
}

/* Admin Styles */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--dark);
    color: var(--white);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar .logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-sidebar .logo img {
    height: 35px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.7);
    transition: all 0.3s;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,0.1);
    color: var(--wala-green);
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: var(--light-gray);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.admin-card h2 {
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--way-teal);
}

textarea.form-control {
    min-height: 200px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.table th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--dark);
}

.table tr:hover {
    background: #FAFBFC;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-published {
    background: #E8F5E9;
    color: var(--wala-green-dark);
}

.status-draft {
    background: #FFF3E0;
    color: var(--sun-orange-dark);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #E8F5E9;
    color: var(--wala-green-dark);
    border-left: 4px solid var(--wala-green);
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #C62828;
}

/* Image Upload */
.image-upload {
    border: 2px dashed var(--way-teal);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.image-upload:hover {
    background: rgba(38, 166, 154, 0.05);
}

.image-upload input {
    display: none;
}

.image-preview {
    max-width: 300px;
    margin-top: 15px;
    border-radius: 8px;
}

/* Action Buttons */
.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-right: 5px;
}

.action-btn-edit {
    background: #E3F2FD;
    color: #1976D2;
}

.action-btn-delete {
    background: #FFEBEE;
    color: #C62828;
}
