/*
Theme Name: Digital Marketing Hub
Theme URI: https://yourdomain.com
Description: Professional Blog, AI Prompts Library, and Resources Hub for Students and Marketers
Author: Your Company
Version: 1.0
License: GPL v2 or later
Text Domain: digital-marketing-hub
*/

/* ==========================================================================
   Root Variables & Theme Setup
   ========================================================================== */
:root {
    --primary: #2D5016;
    --primary-hover: #1E370F;
    --accent: #5FA628;
    --accent-hover: #4B8520;
    --whatsapp: #25D366;
    --whatsapp-hover: #1FBA5A;
    --dark: #1A2414;
    --light: #FAFBF9;
    --white: #FFFFFF;
    --gray-light: #F1F3F0;
    --gray-medium: #DDDEDC;
    --gray-dark: #666765;
    --border-color: #E2E4E0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.06);
    --font-heading: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   Global Standards
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--light);
    color: var(--dark);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.25s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; letter-spacing: -0.015em; }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.25rem;
    color: #2F3929;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ==========================================================================
   Button Hierarchy & Interactivity
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

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

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

.btn-accent:hover {
    background-color: var(--accent-hover);
    color: var(--white);
}

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

.btn-white:hover {
    background-color: var(--gray-light);
}

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

.btn-whatsapp:hover {
    background-color: var(--whatsapp-hover);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-full {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   Header and Navigation Layouts
   ========================================================================== */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.015);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 850;
    color: var(--primary);
    letter-spacing: -0.03em;
}

.site-title:hover {
    color: var(--accent);
}

.navbar nav ul {
    list-style: none;
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.navbar nav ul li a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.navbar nav ul li a:hover {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

/* ==========================================================================
   Responsive Grid Frameworks
   ========================================================================== */
.grid {
    display: grid;
    gap: 1.75rem;
}

.grid-2 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Premium Cards System
   ========================================================================== */
.card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(95, 166, 40, 0.25);
}

.card-img {
    height: 180px;
    background-color: var(--gray-light);
    overflow: hidden;
    position: relative;
}

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

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

.card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--gray-dark);
    margin-bottom: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 750;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.card-desc {
    color: var(--gray-dark);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: #FCFDFB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.card-footer a {
    font-weight: 700;
}

/* ==========================================================================
   Structural Main Content & Section Layouts
   ========================================================================== */
.section {
    padding: 4rem 0;
}

.section-dark {
    background-color: var(--primary);
    color: var(--white);
}

.section-dark h2, .section-dark p {
    color: var(--white);
}

.section-dark-alt {
    background-color: #121E0B;
    color: #E2E4E0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 3rem;
    color: var(--gray-dark);
    font-size: 1.05rem;
}

/* Main Content Dual-Column System */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .main-layout {
        grid-template-columns: 2.5fr 1fr;
    }
}

/* ==========================================================================
   Modern Interactive Form UI
   ========================================================================== */
form {
    display: block;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.85rem 1.15rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--dark);
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: all 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(95, 166, 40, 0.15);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   Search / Filters bar
   ========================================================================== */
.search-filter-bar {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .search-filter-bar {
        flex-direction: row;
        align-items: center;
    }
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input-wrapper input {
    padding-left: 2.75rem;
}

.search-icon-svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray-dark);
    pointer-events: none;
}

/* ==========================================================================
   WordPress Native Sidebar & Widgets
   ========================================================================== */
aside.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 805;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--primary);
    color: var(--dark);
}

.widget ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.widget ul li {
    font-size: 0.9rem;
    line-height: 1.4;
}

.widget ul li a {
    color: var(--dark);
    font-weight: 550;
    display: block;
}

.widget ul li a:hover {
    color: var(--accent);
}

.widget ul li span.post-date {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-dark);
    margin-top: 0.25rem;
}

/* ==========================================================================
   Footer Grid Columns
   ========================================================================== */
footer {
    background-color: #151E11;
    color: #E2E4E0;
    border-top: 5px solid var(--primary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    }
}

.footer-section h4 {
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 750;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 2px;
    background-color: var(--accent);
}

.footer-section p {
    color: #A2A4A0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-section ul li a {
    color: #A2A4A0;
    font-size: 0.9rem;
    display: block;
}

.footer-section ul li a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-section a {
    color: #C2C4C0;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8rem;
    color: #828480;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

/* ==========================================================================
   Modal Framework
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background-color: var(--white);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 1.15rem;
    right: 1.15rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-dark);
    line-height: 1;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   WordPress Built-in Pages Pagination
   ========================================================================== */
.navigation.pagination {
    margin: 3rem 0;
}

.navigation.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.navigation.pagination .page-numbers.current {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.navigation.pagination .page-numbers:hover:not(.current) {
    background-color: var(--gray-light);
    border-color: var(--gray-medium);
}

/* ==========================================================================
   Micro Animations & Hover States (Passive Feedback)
   ========================================================================== */
.card, .btn, .navbar nav ul li a, select, input {
    backface-visibility: hidden;
}

/* Custom Alert Banner */
.alert-banner {
    background-color: #EBF7E3;
    border: 1px solid #D6EEBF;
    border-left: 4px solid var(--accent);
    color: #2D5016;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
