/**
 * PillarScholar Unified Platform Design System
 * 
 * This stylesheet is shared between Laravel (pillarscholar.org) and OJS (portal.pillarscholar.org)
 * to ensure consistent branding and user experience across both platforms.
 * 
 * Last Updated: 2026-02-13
 * Version: 1.0.0
 */

/* ============================================
   DESIGN TOKENS (CSS Variables)
   ============================================ */

:root {
    /* Primary Colors */
    --navy: #1a2a4a;
    --navy-dark: #0f1a2e;
    --navy-light: #2a3d5f;
    
    /* Accent Colors */
    --gold: #d4af37;
    --gold-light: #e5c866;
    --gold-dark: #b8941f;
    --accent: #4a90e2;
    --success: #27ae60;
    
    /* Neutral Colors */
    --white: #ffffff;
    --grey-light: #f5f7fa;
    --grey: #e8ecf1;
    --grey-dark: #6b7a8f;
    
    /* Text Colors */
    --text-dark: #2c3e50;
    --text-light: #5a6c7d;
    
    /* Shadows */
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-md: rgba(0, 0, 0, 0.15);
    --shadow-lg: rgba(0, 0, 0, 0.2);
    
    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Font Sizes */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    
    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
}

/* ============================================
   BASE STYLES
   ============================================ */

.unified-body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-dark);
    background-color: var(--white);
}

.unified-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.unified-h1,
.unified-h2,
.unified-h3,
.unified-h4,
.unified-h5,
.unified-h6 {
    font-family: var(--font-serif);
    font-weight: var(--font-weight-bold);
    color: var(--navy);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-md);
}

.unified-h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-lg);
}

.unified-h2 {
    font-size: var(--font-size-3xl);
}

.unified-h3 {
    font-size: var(--font-size-2xl);
}

.unified-h4 {
    font-size: var(--font-size-xl);
}

.unified-h5,
.unified-h6 {
    font-size: var(--font-size-lg);
}

/* ============================================
   HEADER COMPONENT
   ============================================ */

.unified-header {
    background: var(--white);
    color: var(--navy);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
    border-bottom: 1px solid var(--grey);
    width: 100%;
}

.unified-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
}

/* Logo */
.unified-logo {
    flex: 0 0 auto;
    max-width: 220px;
}

.unified-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.unified-logo-icon {
    height: 55px;
    display: flex;
    align-items: center;
}

.unified-logo-icon img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

/* Navigation */
.unified-nav-menu {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    justify-content: flex-end;
}

.unified-nav-link {
    color: var(--navy);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    padding: 0.5rem 0.7rem;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    transition: color 0.3s ease;
    position: relative;
}

.unified-nav-link:hover {
    color: #07527E;
}

.unified-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--navy-dark);
}

/* Dropdown */
.unified-nav-dropdown {
    position: relative;
}

.unified-dropdown-arrow {
    font-size: 0.65rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.unified-nav-dropdown:hover .unified-dropdown-arrow {
    transform: rotate(180deg);
}

.unified-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 180px;
    box-shadow: 0 8px 24px var(--shadow-md);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--grey);
}

.unified-nav-dropdown:hover .unified-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.unified-dropdown-item {
    display: block;
    padding: 0.625rem 1rem;
    font-size: var(--font-size-sm);
    color: var(--navy);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.unified-dropdown-item:hover {
    background: var(--grey-light);
    border-left-color: var(--navy);
    color: var(--navy-dark);
}

.unified-dropdown-item.active {
    background: var(--grey-light);
    border-left-color: var(--navy);
    font-weight: var(--font-weight-semibold);
}

/* ============================================
   FOOTER COMPONENT
   ============================================ */

.unified-footer {
    background: var(--navy-dark);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.unified-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.unified-footer-section h4 {
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.unified-footer-tagline {
    color: var(--grey-light);
    font-size: 0.9rem;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.unified-footer-project {
    color: var(--grey);
    font-size: 0.85rem;
}

.unified-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.unified-footer-links li {
    margin-bottom: 0.75rem;
}

.unified-footer-links a {
    color: var(--grey-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.unified-footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.unified-social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.unified-social-links a {
    color: var(--grey-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.unified-social-links a:hover {
    color: var(--gold-light);
}

.unified-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.unified-footer-bottom p {
    color: var(--grey);
    font-size: 0.85rem;
    margin: 0;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

/* Primary Button */
.unified-btn-primary {
    display: inline-block;
    background: var(--navy-dark);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--navy-dark);
    font-family: var(--font-sans);
    cursor: pointer;
    text-align: center;
}

.unified-btn-primary:hover {
    background: var(--white);
    color: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-md);
}

/* Secondary Button */
.unified-btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--navy);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--navy);
    font-family: var(--font-sans);
    cursor: pointer;
    text-align: center;
}

.unified-btn-secondary:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
}

/* Submit/CTA Button */
.unified-btn-submit {
    display: inline-block;
    background: var(--navy-dark);
    color: var(--white);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 0.75rem;
}

.unified-btn-submit:hover {
    background: var(--white);
    color: var(--navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Gold Accent Button */
.unified-btn-gold {
    display: inline-block;
    background: var(--gold);
    color: var(--navy-dark);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--gold);
    cursor: pointer;
}

.unified-btn-gold:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Button Sizes */
.unified-btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

.unified-btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.unified-section {
    padding: 3rem 0;
}

.unified-section-large {
    padding: 4rem 0;
}

/* Grid System */
.unified-row {
    display: grid;
    gap: 2rem;
}

.unified-col-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.unified-col-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.unified-col-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile (0-767px) */
@media (max-width: 767px) {
    .unified-container {
        padding: 0 15px;
    }
    
    .unified-h1 {
        font-size: 2rem;
    }
    
    .unified-h2 {
        font-size: 1.75rem;
    }
    
    .unified-h3 {
        font-size: 1.5rem;
    }
    
    .unified-footer-content {
        grid-template-columns: 1fr;
    }
    
    .unified-nav-menu {
        display: none;
    }
}

/* Tablet (768px-991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .unified-container {
        max-width: 750px;
    }
}

/* Desktop (992px-1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .unified-container {
        max-width: 970px;
    }
}

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .unified-container {
        max-width: 1200px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Alignment */
.unified-text-left { text-align: left; }
.unified-text-center { text-align: center; }
.unified-text-right { text-align: right; }

/* Text Colors */
.unified-text-navy { color: var(--navy); }
.unified-text-gold { color: var(--gold); }
.unified-text-white { color: var(--white); }
.unified-text-muted { color: var(--text-light); }

/* Background Colors */
.unified-bg-white { background-color: var(--white); }
.unified-bg-grey-light { background-color: var(--grey-light); }
.unified-bg-navy { background-color: var(--navy); }
.unified-bg-navy-dark { background-color: var(--navy-dark); }

/* Spacing Utilities */
.unified-mt-1 { margin-top: var(--space-md); }
.unified-mt-2 { margin-top: var(--space-lg); }
.unified-mt-3 { margin-top: var(--space-xl); }
.unified-mb-1 { margin-bottom: var(--space-md); }
.unified-mb-2 { margin-bottom: var(--space-lg); }
.unified-mb-3 { margin-bottom: var(--space-xl); }
.unified-p-1 { padding: var(--space-md); }
.unified-p-2 { padding: var(--space-lg); }
.unified-p-3 { padding: var(--space-xl); }

/* Display Utilities */
.unified-d-none { display: none; }
.unified-d-block { display: block; }
.unified-d-flex { display: flex; }
.unified-d-grid { display: grid; }

/* Flex Utilities */
.unified-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.unified-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Shadow Utilities */
.unified-shadow-sm { box-shadow: 0 2px 4px var(--shadow); }
.unified-shadow-md { box-shadow: 0 4px 8px var(--shadow-md); }
.unified-shadow-lg { box-shadow: 0 8px 16px var(--shadow-lg); }

/* Border Utilities */
.unified-border { border: 1px solid var(--grey); }
.unified-border-top { border-top: 1px solid var(--grey); }
.unified-border-bottom { border-bottom: 1px solid var(--grey); }
.unified-rounded { border-radius: var(--radius-md); }
.unified-rounded-lg { border-radius: var(--radius-lg); }

/* ============================================
   OJS INTEGRATION OVERRIDES
   ============================================ */

/* Hide default OJS navigation */
.ojs-integrated #navigationPrimary,
.ojs-integrated #headerNavigationContainer,
.ojs-integrated .pkp_structure_head {
    display: none !important;
}

/* Hide default OJS footer */
.ojs-integrated #pkp_footer,
.ojs-integrated .pkp_structure_footer {
    display: none !important;
}

/* Ensure unified header shows */
.ojs-integrated .unified-header {
    display: block !important;
}

/* Ensure unified footer shows */
.ojs-integrated .unified-footer {
    display: block !important;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .unified-header,
    .unified-footer,
    .unified-btn-submit {
        display: none;
    }
    
    .unified-container {
        max-width: 100%;
        padding: 0;
    }
}
