/*
Theme Name: Scientia
Theme URI: https://scientia-theme.com
Author: Scientia Team
Author URI: https://scientia-theme.com
Description: Premium WordPress theme for International Scientific Journals. Features advanced article management, DOI support, multi-author system, access control, and a modern academic design.
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: scientia
Tags: academic, science, journal, research, rtl-language, translation-ready, custom-colors, custom-logo, featured-images, full-width-template, sticky-post, theme-options, two-columns, wide-blocks
*/

/* =========================================
   SCIENTIA THEME - BASE STYLES
   ========================================= */

:root {
  /* === PRIMARY PALETTE === */
  --color-primary:       #0d2b4e;   /* Deep navy - authority */
  --color-primary-light: #1a4a7a;
  --color-accent:        #c8922a;   /* Academic gold */
  --color-accent-light:  #e8b84b;
  --color-secondary:     #2e6da4;   /* Steel blue */
  --color-success:       #1a7a4a;
  --color-warning:       #c8922a;
  --color-danger:        #b02a2a;

  /* === NEUTRALS === */
  --color-bg:            #fafaf8;
  --color-bg-alt:        #f4f4f0;
  --color-surface:       #ffffff;
  --color-border:        #d8d8d0;
  --color-border-light:  #ebebeb;
  --color-text:          #1a1a1a;
  --color-text-muted:    #555550;
  --color-text-light:    #888880;

  /* === DARK MODE === */
  --color-dark-bg:       #0f1520;
  --color-dark-surface:  #1a2334;
  --color-dark-border:   #2a3a4e;
  --color-dark-text:     #e8e8e0;

  /* === TYPOGRAPHY === */
  --font-display:   'Playfair Display', 'Georgia', serif;
  --font-body:      'Source Serif 4', 'Georgia', serif;
  --font-ui:        'Inter', 'Helvetica Neue', sans-serif;
  --font-mono:      'JetBrains Mono', 'Courier New', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* === SPACING === */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* === LAYOUT === */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;
  --sidebar-width: 320px;

  /* === EFFECTS === */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-xl:  0 20px 50px rgba(0,0,0,0.15), 0 8px 16px rgba(0,0,0,0.08);

  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark mode overrides */
[data-theme="dark"] {
  --color-bg:      var(--color-dark-bg);
  --color-bg-alt:  var(--color-dark-surface);
  --color-surface: var(--color-dark-surface);
  --color-border:  var(--color-dark-border);
  --color-text:    var(--color-dark-text);
  --color-text-muted: #a0a890;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
}

/* RTL Support */
[dir="rtl"] body { font-family: var(--font-body); }
[dir="rtl"] .scientia-container { direction: rtl; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
  letter-spacing: -0.025em;
}
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: var(--color-dark-text);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { margin-bottom: var(--space-4); }
a { color: var(--color-secondary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent); }

/* === LAYOUT === */
.scientia-container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.scientia-container--narrow { max-width: var(--container-lg); }
.scientia-container--wide { max-width: var(--container-2xl); }

/* === UTILITY CLASSES === */
.text-primary { color: var(--color-primary); }
.text-accent   { color: var(--color-accent); }
.text-muted    { color: var(--color-text-muted); }
.bg-primary    { background: var(--color-primary); }
.bg-accent     { background: var(--color-accent); }
.bg-surface    { background: var(--color-surface); }

.sr-only {
  position: absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.section-spacing { padding: var(--space-20) 0; }
.section-spacing--sm { padding: var(--space-12) 0; }

/* Animations */
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(20px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}
@keyframes slideInLeft {
  from { opacity:0; transform: translateX(-30px); }
  to   { opacity:1; transform: translateX(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,146,42,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(200,146,42,0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--color-bg-alt) 25%, var(--color-border-light) 50%, var(--color-bg-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* === RESPONSIVE === */
@media (max-width: 1280px) { h1{font-size:var(--text-4xl);} }
@media (max-width: 1024px) { h1{font-size:var(--text-3xl);} h2{font-size:var(--text-2xl);} .scientia-container{padding:0 var(--space-5);} }
@media (max-width: 768px)  { h1{font-size:var(--text-2xl);} h2{font-size:var(--text-xl);} .section-spacing{padding:var(--space-12) 0;} }
@media (max-width: 640px)  { .scientia-container{padding:0 var(--space-4);} }
