/*
Theme Name: IRSR Theme
Theme URI: https://irsr.eu/
Author: IRSR
Description: Custom theme for International Review of Social Research - Academic journal and social sciences research portal
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: irsr
Tags: custom-menu, featured-images, translation-ready, custom-post-types
*/

/* === CSS Variables === */
:root {
    --primary: #1B5E7B;
    --primary-dark: #134A62;
    --accent: #A0724E;
    --accent-light: #D4A76A;
    --bg: #F8F6F3;
    --surface: #FFFFFF;
    --text: #2D3436;
    --text-secondary: #636E72;
    --border: #DFE6E9;
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Inter', 'Source Sans Pro', -apple-system, sans-serif;
    --max-width: 1200px;
    --gap: 2rem;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

/* === Typography === */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.3; color: var(--text); }
h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: .75rem; }
h3 { font-size: 1.35rem; margin-bottom: .5rem; }
p { margin-bottom: 1rem; }

/* === Layout === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.site-content { min-height: 60vh; padding: 2rem 0; }

/* === Header === */
.site-header {
    background: var(--surface);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}
.site-logo img { height: 50px; width: auto; }
.site-logo { display: flex; align-items: center; gap: .75rem; }
.site-logo .logo-text { font-family: var(--font-heading); font-size: 1.1rem; color: var(--primary-dark); font-weight: 700; }

/* === Navigation === */
.main-nav ul { list-style: none; display: flex; gap: 1.5rem; align-items: center; }
.main-nav a {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text);
    padding: .4rem 0;
    border-bottom: 2px solid transparent;
    transition: all .2s;
}
.main-nav a:hover, .main-nav .current-menu-item a {
    color: var(--primary);
    border-bottom-color: var(--accent);
}
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); }

/* === Hero === */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}
.hero h1 { color: #fff; font-size: 2.5rem; margin-bottom: .5rem; }
.hero .subtitle { font-size: 1.15rem; opacity: .9; max-width: 700px; margin: 0 auto 1.5rem; }
.hero-search {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: .5rem;
}
.hero-search input {
    flex: 1;
    padding: .75rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}
.hero-search button {
    padding: .75rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.hero-search button:hover { background: var(--accent-light); }

/* === Page Hero (with image) === */
.page-hero {
    position: relative;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27,94,123,.85), rgba(19,74,98,.7));
}
.page-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 0 1.5rem;
}
.page-hero-content h1 { color: #fff; font-size: 2.25rem; }

/* === Section === */
.section { padding: 3rem 0; }
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--accent-light);
    display: inline-block;
}

/* === Cards === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
    background: var(--surface);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.card-image { height: 180px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--primary); }
.card-meta { font-size: .8rem; color: var(--text-secondary); margin-bottom: .5rem; }
.card-excerpt { font-size: .9rem; color: var(--text-secondary); line-height: 1.5; }
.card-tag {
    display: inline-block;
    background: var(--bg);
    color: var(--primary);
    font-size: .75rem;
    padding: .2rem .6rem;
    border-radius: 3px;
    margin-top: .5rem;
    font-weight: 500;
}

/* === Featured Articles (homepage) === */
.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* === Topic Grid === */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.topic-card {
    background: var(--surface);
    border-radius: 6px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    border-left: 3px solid var(--accent);
    transition: transform .2s;
}
.topic-card:hover { transform: translateY(-2px); }
.topic-card h3 { font-size: 1rem; margin-bottom: .25rem; }
.topic-card .count { font-size: .8rem; color: var(--text-secondary); }

/* === Issue Grid === */
.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.issue-card {
    background: var(--surface);
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    border-top: 3px solid var(--primary);
}
.issue-card h3 { font-size: 1.05rem; color: var(--primary-dark); margin-bottom: .25rem; }
.issue-card .issue-year { font-size: .85rem; color: var(--accent); font-weight: 600; }
.issue-card .issue-count { font-size: .8rem; color: var(--text-secondary); margin-top: .25rem; }

/* === Single Article === */
.article-single { max-width: 800px; margin: 0 auto; }
.article-meta-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}
.article-meta-box dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; }
.article-meta-box dt { font-weight: 600; color: var(--primary-dark); font-size: .9rem; }
.article-meta-box dd { font-size: .9rem; color: var(--text-secondary); }

.article-content { font-size: 1.05rem; line-height: 1.8; }
.article-content h2 { margin-top: 2rem; color: var(--primary-dark); }
.article-content h3 { margin-top: 1.5rem; }
.article-content ul, .article-content ol { margin-left: 1.5rem; margin-bottom: 1rem; }
.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg);
    font-style: italic;
}

/* === Related Articles === */
.related-articles { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* === Archive/Listing === */
.archive-header { margin-bottom: 2rem; }
.archive-header h1 { margin-bottom: .25rem; }
.archive-header .description { color: var(--text-secondary); }

/* === Page Content === */
.page-content { max-width: 800px; margin: 0 auto; }
.page-content h2 { margin-top: 2rem; color: var(--primary-dark); }
.page-content ul, .page-content ol { margin-left: 1.5rem; margin-bottom: 1rem; }

/* === Pagination === */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; }
.pagination a, .pagination span {
    padding: .5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: .9rem;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* === Footer === */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.8);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: var(--accent-light); margin-bottom: .75rem; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a { color: rgba(255,255,255,.7); font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: .85rem; line-height: 1.6; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.15);
    padding-top: 1.5rem;
    text-align: center;
    font-size: .8rem;
    color: rgba(255,255,255,.5);
}

/* === Breadcrumbs === */
.breadcrumbs {
    font-size: .85rem;
    color: var(--text-secondary);
    padding: .75rem 0;
}
.breadcrumbs a { color: var(--primary); }
.breadcrumbs .sep { margin: 0 .4rem; }

/* === Search Form === */
.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] {
    flex: 1;
    padding: .6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: .95rem;
}
.search-form button {
    padding: .6rem 1.25rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* === 404 === */
.error-404 { text-align: center; padding: 4rem 0; }
.error-404 h1 { font-size: 4rem; color: var(--primary); }

/* === Buttons === */
.btn {
    display: inline-block;
    padding: .65rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: .9rem;
    transition: all .2s;
    cursor: pointer;
    border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-light); color: #fff; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* === FAQ === */
.faq-item { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 6px; }
.faq-question {
    padding: 1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
}
.faq-question::after { content: '+'; font-size: 1.25rem; color: var(--accent); }
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer { padding: 0 1.25rem 1rem; display: none; }
.faq-item.active .faq-answer { display: block; }

/* === Responsive === */
@media (max-width: 768px) {
    .featured-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .header-inner { flex-wrap: wrap; }
    .main-nav { display: none; width: 100%; }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; padding: 1rem 0; }
    .menu-toggle { display: block; }
    h1 { font-size: 1.75rem; }
    .hero { padding: 2.5rem 0; }
    .hero h1 { font-size: 1.75rem; }
    .page-hero { height: 200px; }
}
@media (max-width: 480px) {
    .featured-grid { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
    .topic-grid { grid-template-columns: 1fr 1fr; }
}
