/*
Theme Name: PrepHub
Theme URI: https://prephub.ro
Author: PrepHub
Author URI: https://prephub.ro
Description: Custom WordPress theme for PrepHub - Romania's first educational micro-campus. Fueling Future Minds.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: prephub
Tags: education, woocommerce, custom-logo, custom-menu, featured-images, threaded-comments

PrepHub Theme - Fueling Future Minds
*/

:root {
    /* Brand Colors */
    --color-deep-knowledge: #201A42;
    --color-mindflow: #8469AB;
    --color-bright-focus: #3354A1;
    --color-pure-clarity: #FFFFFF;
    --color-core-black: #1D1D1B;

    /* Gradient */
    --gradient-neural-spark: linear-gradient(to bottom, #8469AB, #3354A1);

    /* Typography */
    --font-primary: 'Rubik', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Container */
    --container-max-width: 1200px;
    --container-padding: 1.5rem;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0.05em;
    color: var(--color-core-black);
    background-color: var(--color-pure-clarity);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: 0;
    color: var(--color-deep-knowledge);
    margin-top: 0;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-bright-focus);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn--primary {
    background-color: var(--color-bright-focus);
    color: var(--color-pure-clarity);
}

.btn--primary:hover {
    background-color: var(--color-deep-knowledge);
    color: var(--color-pure-clarity);
}

.btn--secondary {
    background-color: var(--color-mindflow);
    color: var(--color-pure-clarity);
}

.btn--secondary:hover {
    background-color: var(--color-deep-knowledge);
}

.btn--outline {
    background-color: transparent;
    border: 2px solid var(--color-bright-focus);
    color: var(--color-bright-focus);
}

.btn--outline:hover {
    background-color: var(--color-bright-focus);
    color: var(--color-pure-clarity);
}

.btn--outline-white {
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: var(--color-pure-clarity);
}

.btn--outline-white:hover {
    background-color: var(--color-pure-clarity);
    color: var(--color-deep-knowledge);
    border-color: var(--color-pure-clarity);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.bg-deep-knowledge { background-color: var(--color-deep-knowledge); }
.bg-mindflow { background-color: var(--color-mindflow); }
.bg-bright-focus { background-color: var(--color-bright-focus); }
.bg-white { background-color: var(--color-pure-clarity); }

.text-white { color: var(--color-pure-clarity); }
.text-deep-knowledge { color: var(--color-deep-knowledge); }
.text-mindflow { color: var(--color-mindflow); }
.text-bright-focus { color: var(--color-bright-focus); }

/* Screen Reader Only */
.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;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

/* Transparent header on homepage */
.home .site-header {
    background: transparent;
}

/* Solid header for non-home pages - but still overlays content */
body:not(.home) .site-header {
    background: rgba(32, 26, 66, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Scrolled state (for homepage) */
.home .site-header.is-scrolled {
    background: rgba(32, 26, 66, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-pure-clarity);
    text-decoration: none;
}

.site-tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.custom-logo-link img {
    max-height: 50px;
    width: auto;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-pure-clarity);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item a {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-pure-clarity);
}

/* Header Cart */
.header-cart__link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-pure-clarity);
    transition: all 0.2s ease;
}

.header-cart__link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-pure-clarity);
}

.header-cart__count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bright-focus);
    color: var(--color-pure-clarity);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-pure-clarity);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-pure-clarity);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile Menu Overlay */
body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.site-main {
    min-height: 60vh;
}

/* Add padding to top of content on non-home pages to account for fixed header */
body:not(.home) .site-main {
    padding-top: 80px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    padding: 4rem 0 2rem;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer__brand {
    max-width: 300px;
}

.footer-logo .custom-logo-link img {
    max-height: 40px;
    filter: brightness(0) invert(1);
}

.footer-site-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-tagline {
    color: var(--color-mindflow);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-pure-clarity);
    transition: all 0.3s ease;
}

.footer-social__link:hover {
    background: var(--color-bright-focus);
    color: var(--color-pure-clarity);
    transform: translateY(-4px);
}

/* Footer Widgets */
.footer-widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--color-pure-clarity);
}

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

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

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-menu a:hover {
    color: var(--color-pure-clarity);
    padding-left: 4px;
}

/* Footer Contact List */
.footer-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    line-height: 1.4;
}

.footer-contact-item svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-mindflow);
}

.footer-contact-item a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.footer-contact-item a:hover {
    color: var(--color-pure-clarity);
}

/* Footer Bottom */
.site-footer__bottom {
    padding-top: 2rem;
}

.site-footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: var(--color-pure-clarity);
}

/* Responsive */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--color-deep-knowledge);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    }

    .main-navigation.is-open {
        right: 0;
    }

    .primary-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .primary-menu li {
        width: 100%;
    }

    .primary-menu a {
        padding: 1rem;
        font-size: 1.125rem;
    }

    .header-cart {
        margin-top: auto;
    }

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

    .site-footer__brand {
        grid-column: 1 / -1;
        max-width: 100%;
        text-align: center;
        margin: 0 auto;
    }

    .footer-social {
        justify-content: center;
    }

    .site-footer__bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .site-footer__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-menu {
        text-align: center;
    }

    .footer-contact-list {
        text-align: left;
        display: inline-block;
    }
}

/* ==========================================================================
   Page Template
   ========================================================================== */

.page-template {
    background: var(--color-pure-clarity);
}

.page-header {
    background: linear-gradient(135deg, var(--color-deep-knowledge) 0%, var(--color-mindflow) 100%);
    padding: 6rem 0 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
}

.page-title {
    color: var(--color-pure-clarity);
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
}

.page-excerpt {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.page-content {
    padding: 3rem 0;
}

.page-content__inner {
    max-width: 800px;
    margin: 0 auto;
}

.page-content__inner > * {
    margin-bottom: 1.5rem;
}

.page-content__inner h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-mindflow);
}

.page-content__inner h3 {
    margin-top: 2rem;
    color: var(--color-mindflow);
}

.page-content__inner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.page-content__inner ul,
.page-content__inner ol {
    padding-left: 2rem;
}

.page-content__inner li {
    margin-bottom: 0.5rem;
}

.page-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   404 Error Page
   ========================================================================== */

.error-404 {
    background: var(--color-pure-clarity);
}

.error-404__content {
    padding: 6rem 0 4rem;
    text-align: center;
}

.error-404__inner {
    max-width: 700px;
    margin: 0 auto;
}

.error-404__graphic {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.error-404__title {
    font-size: 2.5rem;
    color: var(--color-deep-knowledge);
    margin-bottom: 1rem;
}

.error-404__description {
    font-size: 1.125rem;
    color: rgba(29, 29, 27, 0.7);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.error-404__search {
    max-width: 500px;
    margin: 2rem auto;
}

.error-404__search .search-form {
    display: flex;
    gap: 0.5rem;
}

.error-404__search input[type="search"] {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid rgba(32, 26, 66, 0.2);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.error-404__search input[type="search"]:focus {
    outline: none;
    border-color: var(--color-bright-focus);
}

.error-404__search button {
    padding: 0.875rem 1.5rem;
    background: var(--color-bright-focus);
    color: var(--color-pure-clarity);
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.error-404__search button:hover {
    background: var(--color-deep-knowledge);
}

.error-404__links {
    margin-top: 3rem;
}

.error-404__links-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--color-deep-knowledge);
}

.error-404__links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.error-404__link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--color-pure-clarity);
    border: 2px solid rgba(32, 26, 66, 0.1);
    border-radius: 12px;
    color: var(--color-deep-knowledge);
    text-decoration: none;
    transition: all 0.2s ease;
}

.error-404__link-card:hover {
    border-color: var(--color-bright-focus);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.error-404__link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-mindflow), var(--color-bright-focus));
    border-radius: 50%;
    color: var(--color-pure-clarity);
}

.error-404__link-text {
    font-weight: 500;
    font-size: 0.9375rem;
}

@media (max-width: 768px) {
    .page-header {
        padding: 5rem 0 2rem;
    }

    .page-title {
        font-size: 2.25rem;
    }

    .page-excerpt {
        font-size: 1.125rem;
    }

    .error-404__content {
        padding: 4rem 0 3rem;
    }

    .error-404__title {
        font-size: 2rem;
    }

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