/* ============================================================
   WPsafer Theme — Frontend CSS
   Merged: custom + profile-page + post-template
   ============================================================ */

/* Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    /* Brand */
    --primary:        #31572C;
    --primary-hover:  #264821;
    --secondary:      #132A13;
    --accent:         #90BB2B;
    --accent-hover:   #7aa022;

    /* Text */
    --text:           #1E1E1E;
    --text-muted:     #6b7280;

    /* Backgrounds */
    --bg:             #F5F5F5;
    --bg-accent:      #E0F2F1;
    --bg-white:       #ffffff;

    /* Borders */
    --border:         #e5e7eb;

    /* Gradients */
    --gradient:       linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);

    /* Shadows */
    --shadow-sm:      0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md:      0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg:      0 10px 40px rgba(0, 0, 0, 0.18);

    /* Header */
    --header-bg:      #ffffff;
    --header-text:    var(--text);
    --header-border:  var(--border);

    /* Footer */
    --footer-bg:         var(--secondary);
    --footer-text:       rgba(255, 255, 255, 0.75);
    --footer-heading:    #ffffff;
    --footer-hover:      var(--accent);
    --footer-border:     rgba(255, 255, 255, 0.1);
    --footer-bottom-bg:  var(--primary);

    /* Component aliases (backward compat) */
    --box-bg:          var(--bg-white);
    --box-shadow:      var(--shadow-sm);
    --post-bg:         var(--bg-white);
    --post-shadow:     var(--shadow-sm);
    --profile-bg:      var(--bg-white);
    --profile-shadow:  var(--shadow-sm);

    /* Danger / Success */
    --danger:          #ef4444;
    --success:         #10b981;
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text);
}

a { text-decoration: none; }

.post, .page { margin: 0 !important; }

/* ============================================================
   FORM ELEMENTS (shared)
   ============================================================ */
.form-label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg-white);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(49, 87, 44, 0.12);
}

.form-control:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.7;
}

textarea.form-control { resize: vertical; }

/* ============================================================
   BUTTONS (shared)
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.875rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 87, 44, 0.35);
    color: #fff;
}

.btn-primary:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}

.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 87, 44, 0.3);
}

/* btn-outline = alias for btn-outline-primary */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-danger:hover { background: #b91c1c; color: #fff; }

/* Small size modifier */
.btn-sm {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
}

/* Full width modifier */
.btn-primary.w-full,
.btn-outline.w-full,
.btn-danger.w-full { width: 100%; justify-content: center; }

/* Spinner inside button */
.wps-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wps-spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* ============================================================
   AUTH (Login / Register)
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card-header {
    padding: 2.5rem 2rem 1.5rem;
    background: var(--gradient);
    color: #fff;
    text-align: center;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.auth-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    color: #fff;
}

.auth-card-body { padding: 2rem; }

.auth-card-footer {
    padding: 1.5rem 2rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
    text-align: center;
}

.auth-msg-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 500;
}

.auth-msg-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .auth-card-body { padding: 1.5rem; }
    .auth-title { font-size: 1.5rem; }
}

/* ============================================================
   HEADER
   ============================================================ */
.header-top-bar {
    background: var(--primary);
    color: #fff;
    padding: 10px 0;
    font-size: 0.875rem;
}

.header-contact {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-contact .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.header-contact .contact-item:hover { opacity: 0.8; }

.header-social {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.header-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-social a:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* Main Navigation */
.main-navigation {
    background: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.main-navigation.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

/* Logo */
.site-branding { flex-shrink: 0; }

.site-title {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.custom-logo-link img {
    max-height: 130px;
    width: auto;
    display: block;
}

/* Desktop Menu */
.nav-menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-menu li { position: relative; }

.nav-menu > li > a {
    display: block;
    padding: 12px 20px;
    color: var(--header-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    color: var(--primary);
    background: rgba(49, 87, 44, 0.08);
}

/* Dropdown */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 220px;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--header-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-menu .sub-menu li a:hover {
    color: var(--primary);
    background: rgba(49, 87, 44, 0.05);
    padding-left: 25px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-header {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* User Dropdown */
.user-dropdown { position: relative; }

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(49, 87, 44, 0.08);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.user-dropdown-toggle:hover { background: rgba(49, 87, 44, 0.14); }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name { font-weight: 600; color: var(--header-text); }

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-white);
    min-width: 200px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--header-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(49, 87, 44, 0.05);
    color: var(--primary);
}

.dropdown-item.text-danger { color: var(--danger); }
.dropdown-item.text-danger:hover { background: rgba(239, 68, 68, 0.05); color: #dc2626; }

.dropdown-divider {
    height: 1px;
    background: var(--header-border);
    margin: 10px 0;
}

/* Menu login/logout items */
.menu-item-logout a,
.menu-item-login a {
    color: var(--primary) !important;
    font-weight: 600;
}

.menu-item-logout a:hover,
.menu-item-login a:hover {
    color: var(--primary-hover) !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--header-text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-white);
    z-index: 1001;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}

.mobile-menu.active { right: 0; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--header-text);
    padding: 5px;
}

.mobile-menu-body { padding: 20px; }

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.mobile-nav-menu li { margin-bottom: 5px; }

.mobile-nav-menu a {
    display: block;
    padding: 12px 15px;
    color: var(--header-text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu .current-menu-item > a {
    color: var(--primary);
    background: rgba(49, 87, 44, 0.08);
}

.mobile-nav-menu .sub-menu {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
}

.mobile-user-info {
    text-align: center;
    padding: 20px;
    background: rgba(49, 87, 44, 0.05);
    border-radius: 12px;
    margin-top: 20px;
}

.mobile-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid var(--primary);
}

.mobile-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mobile-user-info h4 { margin: 0 0 5px; color: var(--header-text); }
.mobile-user-info p { margin: 0 0 15px; color: var(--text-muted); font-size: 0.875rem; }

.mobile-user-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mobile-auth-buttons { margin-top: 20px; }

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

/* Header Responsive */
@media (max-width: 991px) {
    .header-top-bar,
    .nav-menu-wrapper,
    .header-actions .btn-header,
    .user-dropdown { display: none; }
    .mobile-menu-toggle { display: flex; }
}

@media (max-width: 768px) {
    .nav-wrapper { padding: 10px 0; }
    .site-title { font-size: 1.5rem; }
    .custom-logo-link img { max-height: 40px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
}

.footer-main { padding: 60px 0 40px; }

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

.footer-widget-title {
    color: var(--footer-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.footer-widget ul { list-style: none; padding: 0; margin: 0; }
.footer-widget ul li { margin-bottom: 12px; transition: transform 0.3s ease; }
.footer-widget ul li:hover { transform: translateX(5px); }
.footer-widget ul li a { color: var(--footer-text); text-decoration: none; transition: color 0.3s ease; display: inline-block; }
.footer-widget ul li a:hover { color: var(--footer-hover); }
.footer-widget p { line-height: 1.8; margin-bottom: 15px; }

.footer-contact-info {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--footer-border);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-item:hover { background: rgba(255,255,255,0.06); transform: translateY(-3px); }
.contact-item i { font-size: 1.5rem; color: var(--footer-hover); flex-shrink: 0; }
.contact-item h6 { color: var(--footer-heading); font-size: 0.875rem; font-weight: 600; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.contact-item p, .contact-item a { color: var(--footer-text); margin: 0; text-decoration: none; transition: color 0.3s ease; }
.contact-item a:hover { color: var(--footer-hover); }

.footer-bottom {
    background: var(--footer-bottom-bg);
    padding: 25px 0;
    border-top: 1px solid var(--footer-border);
}

.copyright-text { color: var(--footer-text); font-size: 0.9rem; }
.copyright-text a { color: var(--footer-heading); text-decoration: none; font-weight: 600; transition: color 0.3s ease; }
.copyright-text a:hover { color: var(--footer-hover); }

.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.06);
    color: var(--footer-text);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent);
    color: var(--secondary);
    transform: translateY(-3px) scale(1.1);
}

.social-links i { font-size: 1.1rem; }

/* Scroll to top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(49, 87, 44, 0.4);
}

.scroll-to-top.show { opacity: 1; visibility: visible; }
.scroll-to-top:hover { transform: translateY(-5px); box-shadow: 0 6px 20px rgba(49, 87, 44, 0.5); }
.scroll-to-top i { font-size: 1.5rem; }

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-main { padding: 40px 0 30px; }
    .footer-contact-info { margin-top: 30px; padding-top: 30px; }
    .contact-item { padding: 15px; }
    .social-links { justify-content: center; margin-top: 15px; }
    .scroll-to-top { width: 45px; height: 45px; bottom: 20px; right: 20px; }
}

@media (min-width: 768px) { .social-links { justify-content: flex-end; } }

/* ============================================================
   PAGE HEADER / BREADCRUMB
   ============================================================ */
.page-header {
    background: var(--gradient);
    color: #fff;
    padding: 15px;
    margin-bottom: 40px;
}

.page-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 15px; color: #fff; }

.breadcrumb {
    background: rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 0;
    backdrop-filter: blur(10px);
}

.breadcrumb-item { font-size: 0.9rem; }
.breadcrumb-item a { color: #fff; text-decoration: none; transition: opacity 0.3s ease; }
.breadcrumb-item a:hover { opacity: 0.8; }
.breadcrumb-item.active { color: rgba(255,255,255,0.8); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.6); }

.page-content-wrapper { padding: 0 0 60px; }

/* Content Box */
.content-box {
    background: var(--box-bg);
    border-radius: 16px;
    box-shadow: var(--box-shadow);
    padding: 40px;
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out;
}

/* ============================================================
   ENTRY / POST CONTENT
   ============================================================ */
.post-thumbnail { margin-bottom: 30px; overflow: hidden; border-radius: 12px; }
.post-thumbnail img { transition: transform 0.3s ease; }
.post-thumbnail:hover img { transform: scale(1.05); }

.entry-content { color: var(--text); line-height: 1.8; }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text);
}

.entry-content h2 {
    font-size: 2rem;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent);
}

.entry-content h3 { font-size: 1.5rem; }
.entry-content p { margin-bottom: 1.5rem; }
.entry-content a { transition: opacity 0.3s ease; color: var(--primary); }
.entry-content a:hover { opacity: 0.8; }
.entry-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5rem 0; }
.entry-content ul, .entry-content ol { margin-bottom: 1.5rem; padding-left: 2rem; }
.entry-content li { margin-bottom: 0.5rem; }

.entry-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    background: rgba(144, 187, 43, 0.06);
    margin: 2rem 0;
    border-radius: 8px;
    font-style: italic;
}

.entry-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; color: var(--primary); }
.entry-content pre { background: var(--secondary); color: #f3f4f6; padding: 1.5rem; border-radius: 8px; overflow-x: auto; margin: 1.5rem 0; }
.entry-content pre code { background: transparent; color: inherit; padding: 0; }
.entry-content table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; }
.entry-content table th, .entry-content table td { padding: 12px; border: 1px solid var(--border); }
.entry-content table th { background: rgba(49, 87, 44, 0.08); font-weight: 600; }

/* Page links / pagination */
.page-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-links span, .page-links a {
    display: inline-block;
    padding: 8px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.entry-footer { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }

.edit-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(49, 87, 44, 0.08);
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.edit-link a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: sticky; top: 100px; }

.sidebar-widget {
    background: var(--box-bg);
    border-radius: 16px;
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out;
}

.sidebar-widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
    position: relative;
    padding-bottom: 12px;
}

.sidebar-widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

.widget-list { list-style: none; padding: 0; margin: 0; }

.widget-list li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.widget-list li::before { content: '›'; position: absolute; left: 0; color: var(--accent); font-weight: bold; }
.widget-list a { color: var(--text); text-decoration: none; transition: all 0.3s ease; display: inline-block; }
.widget-list a:hover { color: var(--primary); transform: translateX(5px); }
.widget-list .count { color: var(--text-muted); font-size: 0.875rem; margin-left: 5px; }

/* ============================================================
   POST TEMPLATE (single / archive)
   ============================================================ */
.post-header {
    background: var(--gradient);
    color: #fff;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.post-categories { display: flex; gap: 10px; margin-bottom: 20px; }

.post-category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.post-category:hover { background: rgba(255,255,255,0.3); transform: translateY(-2px); }

.post-title { font-size: 2.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 20px; color: #fff; }

.post-meta { display: flex; gap: 25px; flex-wrap: wrap; align-items: center; font-size: 0.9rem; }
.post-author { display: flex; align-items: center; gap: 10px; }
.post-author img { border-radius: 50%; border: 2px solid #fff; }
.post-author a { color: #fff; text-decoration: none; font-weight: 600; }
.post-meta span { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.9); }
.post-meta a { color: #fff; }

.post-content-wrapper { padding: 0 0 60px; }

.post-article {
    background: var(--post-bg);
    border-radius: 16px;
    box-shadow: var(--post-shadow);
    padding: 40px;
    margin-bottom: 40px;
}

.post-featured-image { margin: -40px -40px 40px; overflow: hidden; border-radius: 16px 16px 0 0; }
.post-featured-image img { width: 100%; height: auto; }

.post-content { color: var(--text); line-height: 1.8; font-size: 1.1rem; }
.post-content h2 { font-size: 2rem; margin-top: 2.5rem; margin-bottom: 1rem; font-weight: 700; }
.post-content h3 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 1rem; font-weight: 700; }
.post-content p { margin-bottom: 1.5rem; }
.post-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 2rem 0; }

.post-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    background: rgba(144, 187, 43, 0.06);
    margin: 2rem 0;
    border-radius: 8px;
    font-style: italic;
}

/* Tags */
.post-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--border);
}

.post-tags i { color: var(--accent); font-size: 1.2rem; }

.post-tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(144, 187, 43, 0.12);
    color: var(--primary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.post-tag:hover { background: var(--accent); color: var(--secondary); transform: translateY(-2px); }

/* Share */
.post-share { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--border); }
.post-share h5 { margin-bottom: 15px; font-weight: 700; }
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.share-btn:hover { transform: translateY(-3px); }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.facebook:hover { box-shadow: 0 4px 12px rgba(24,119,242,0.4); }
.share-btn.twitter { background: #000; color: #fff; }
.share-btn.twitter:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.share-btn.linkedin { background: #0077b5; color: #fff; }
.share-btn.linkedin:hover { box-shadow: 0 4px 12px rgba(0,119,181,0.4); }
.share-btn.whatsapp { background: #25d366; color: #fff; }
.share-btn.whatsapp:hover { box-shadow: 0 4px 12px rgba(37,211,102,0.4); }

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    background: rgba(49, 87, 44, 0.04);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 40px;
}

.author-avatar img { border-radius: 50%; border: 3px solid var(--accent); }
.author-info { flex: 1; }
.author-name { margin-bottom: 10px; font-weight: 700; }
.author-name a { color: var(--text); text-decoration: none; transition: color 0.3s ease; }
.author-name a:hover { color: var(--primary); }
.author-bio { color: var(--text-muted); margin-bottom: 15px; line-height: 1.6; }

.author-posts-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.author-posts-link:hover { transform: translateX(5px); }

/* Related Posts */
.related-posts { margin-bottom: 40px; }
.related-posts-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 30px; }

.related-post-card {
    background: var(--post-bg);
    border-radius: 16px;
    box-shadow: var(--post-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.related-post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.related-post-thumbnail { display: block; overflow: hidden; }
.related-post-thumbnail img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.3s ease; }
.related-post-card:hover .related-post-thumbnail img { transform: scale(1.1); }
.related-post-content { padding: 20px; }
.related-post-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.related-post-title a { color: var(--text); text-decoration: none; transition: color 0.3s ease; }
.related-post-title a:hover { color: var(--primary); }
.related-post-meta { font-size: 0.875rem; color: var(--text-muted); }

/* Archive Header */
.archive-header {
    background: var(--gradient);
    color: #fff;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.archive-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 15px; color: #fff; }
.archive-description { font-size: 1.1rem; opacity: 0.9; max-width: 800px; }

/* Blog Cards */
.posts-grid { display: grid; gap: 30px; margin-bottom: 40px; }

.blog-card {
    background: var(--post-bg);
    border-radius: 16px;
    box-shadow: var(--post-shadow);
    overflow: hidden;
    display: flex;
    transition: all 0.3s ease;
}

.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.blog-card-image { flex-shrink: 0; width: 300px; position: relative; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.1); }

.blog-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(49, 87, 44, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-overlay { opacity: 1; }
.blog-card-overlay i { font-size: 3rem; color: #fff; }

.blog-card-content { flex: 1; padding: 30px; }
.blog-card-meta { display: flex; gap: 15px; align-items: center; margin-bottom: 15px; }

.blog-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gradient);
    color: #fff;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.blog-card-date { font-size: 0.875rem; color: var(--text-muted); }
.blog-card-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 15px; }
.blog-card-title a { color: var(--text); text-decoration: none; transition: color 0.3s ease; }
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt { color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.blog-card-footer { display: flex; justify-content: space-between; align-items: center; }
.blog-card-author { display: flex; align-items: center; gap: 10px; }
.blog-card-author img { border-radius: 50%; }
.blog-card-author span { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.blog-card-link { color: var(--primary); text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: all 0.3s ease; }
.blog-card-link:hover { transform: translateX(5px); }

/* No posts */
.no-posts-found { text-align: center; padding: 80px 20px; }
.no-posts-found i { font-size: 4rem; color: var(--text-muted); margin-bottom: 20px; }
.no-posts-found h3 { font-size: 1.75rem; font-weight: 700; margin-bottom: 15px; }
.no-posts-found p { color: var(--text-muted); margin-bottom: 30px; }

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

.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: var(--post-bg);
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--post-shadow);
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--gradient);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================================
   BLOG TEMPLATE (post-template.css merged)
   ============================================================ */
.blog-page-header {
    background: var(--gradient);
    color: #fff;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.blog-page-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 15px; color: #fff; }
.blog-page-description { font-size: 1.1rem; opacity: 0.9; max-width: 800px; margin: 0; }

.blog-filters {
    background: var(--post-bg);
    border-radius: 16px;
    box-shadow: var(--post-shadow);
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-categories { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(49, 87, 44, 0.05);
    color: var(--text);
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--gradient);
    color: #fff;
    transform: translateY(-2px);
}

.filter-count { font-size: 0.85rem; opacity: 0.8; }
.filter-search { min-width: 250px; }

.search-box { position: relative; display: flex; }

.search-box input {
    flex: 1;
    padding: 10px 50px 10px 20px;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(49, 87, 44, 0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gradient);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(49, 87, 44, 0.4);
}

.popular-posts { display: flex; flex-direction: column; gap: 20px; }

.popular-post-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.popular-post-item:last-child { border-bottom: none; padding-bottom: 0; }

.popular-post-thumb { flex-shrink: 0; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; }
.popular-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.popular-post-item:hover .popular-post-thumb img { transform: scale(1.1); }
.popular-post-content { flex: 1; }
.popular-post-content h6 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.popular-post-content h6 a { color: var(--text); text-decoration: none; transition: color 0.3s ease; }
.popular-post-content h6 a:hover { color: var(--primary); }
.popular-post-date { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

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

/* ============================================================
   PROFILE PAGE (profile-page.css merged)
   ============================================================ */
.profile-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.profile-subtitle { font-size: 1.1rem; opacity: 0.9; margin: 0; }
.profile-content-wrapper { padding: 0 0 60px; }
.profile-sidebar { position: sticky; top: 100px; padding: 0 8px; }

.profile-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(49, 87, 44, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.profile-avatar { flex-shrink: 0; }

.profile-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    display: block;
}

.profile-user-card h4 { font-size: 1rem; font-weight: 700; margin: 0 0 3px; color: var(--text); }
.profile-user-card p { color: var(--text-muted); margin: 0; font-size: 0.875rem; }

.profile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    position: relative;
}

.profile-nav-link:last-child { margin-bottom: 0; }
.profile-nav-link i { font-size: 1.2rem; flex-shrink: 0; }

.profile-nav-link:hover,
.profile-nav-link.active {
    background: rgba(49, 87, 44, 0.08);
    color: var(--primary);
    transform: translateX(5px);
}

.profile-nav-link.text-danger { color: var(--danger) !important; }
.profile-nav-link.text-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger) !important;
}

.profile-nav-logout {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.profile-box {
    background: var(--profile-bg);
    border-radius: 16px;
    box-shadow: var(--profile-shadow);
    margin-bottom: 30px;
}

.profile-box-header { padding: 30px; border-bottom: 1px solid var(--border); }
.profile-box-header h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 5px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.profile-box-header p { color: var(--text-muted); margin: 0; }
.profile-box-body { padding: 30px; }

/* Password toggle */
.password-input-wrapper { position: relative; }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.password-toggle:hover { color: var(--primary); }

/* Profile tabs */
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; animation: fadeIn 0.4s ease-in; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.footer-widget { animation: fadeInUp 0.6s ease-out; }
.footer-widget:nth-child(1) { animation-delay: 0.1s; }
.footer-widget:nth-child(2) { animation-delay: 0.2s; }
.footer-widget:nth-child(3) { animation-delay: 0.3s; }
.footer-widget:nth-child(4) { animation-delay: 0.4s; }
.sidebar-widget:nth-child(1) { animation-delay: 0.1s; }
.sidebar-widget:nth-child(2) { animation-delay: 0.2s; }
.sidebar-widget:nth-child(3) { animation-delay: 0.3s; }

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hide { opacity: 0; visibility: hidden; }

.lds-ring { display: inline-block; position: relative; width: 80px; height: 80px; }
.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid var(--primary);
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--primary) transparent transparent transparent;
}

.lds-ring div:nth-child(1) { animation-delay: -0.45s; }
.lds-ring div:nth-child(2) { animation-delay: -0.3s; }
.lds-ring div:nth-child(3) { animation-delay: -0.15s; }

@keyframes lds-ring {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   UTILITIES
   ============================================================ */
button.close { padding: 0; background: transparent; border: 0; -webkit-appearance: none; }

.messenger .alert { margin-bottom: 0 !important; }

.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ============================================================
   RESPONSIVE (consolidated)
   ============================================================ */
@media (max-width: 991px) {
    .sidebar { position: static; margin-top: 40px; }
    .content-box { padding: 30px; }
    .page-title { font-size: 2rem; }
    .blog-card { flex-direction: column; }
    .blog-card-image { width: 100%; height: 250px; }
    .blog-filters { flex-direction: column; align-items: stretch; }
    .filter-categories { justify-content: center; }
    .filter-search { width: 100%; min-width: auto; }
    .profile-sidebar { position: static; margin-bottom: 30px; }
    .profile-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
    .author-box { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    .page-header { padding: 40px 0 30px; margin-bottom: 30px; }
    .page-title { font-size: 1.75rem; }
    .content-box { padding: 20px; }
    .sidebar-widget { padding: 20px; }
    .entry-content h2 { font-size: 1.5rem; }
    .post-header, .archive-header { padding: 40px 0 30px; }
    .post-title, .archive-title { font-size: 1.75rem; }
    .post-article { padding: 25px; }
    .post-featured-image { margin: -25px -25px 25px; }
    .post-meta { gap: 15px; font-size: 0.85rem; }
    .share-buttons { flex-direction: column; }
    .share-btn { width: 100%; justify-content: center; }
    .profile-header { padding: 40px 0 30px; }
    .profile-title { font-size: 1.75rem; }
    .profile-box-header, .profile-box-body { padding: 20px; }
    .profile-nav { grid-template-columns: 1fr; }
    .blog-page-header { padding: 40px 0 30px; }
    .blog-page-title { font-size: 1.75rem; }
    .filter-btn { font-size: 0.85rem; padding: 8px 14px; }
    .blog-filters { padding: 20px; }
}
