/* ==========================================
   POLITICAL WISDOM LIBRARY
   UST-L Political Science Organization
==========================================*/

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #111;
}

body.wisdom-page {
    background:
        linear-gradient(rgba(20,20,20,.45), rgba(20,20,20,.45)),
        var(--wisdom-bg, url("images/backgrounds/wisdom1-optimized.webp")) center/cover fixed no-repeat !important;
}

/* ===========================
   HERO
=========================== */

.wisdom-hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    padding: 140px 20px 40px;
    animation: fadeUp 1s ease;

    position: relative;
    overflow: hidden;
}

.wisdom-hero::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    background: rgba(255,214,10,.10);
    border-radius: 50%;
    top: -120px;
    right: -120px;
    filter: blur(40px);
    pointer-events: none;
}

.wisdom-hero::after {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    background: rgba(90,24,154,.08);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    filter: blur(40px);
    pointer-events: none;
}

/* ===========================
   HERO HEADER
=========================== */

.hero-header {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 50px;
    padding: 50px;

    border-radius: 30px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: 0 20px 45px rgba(0,0,0,.25);
}

.hero-header h1 {
    color: white;
    font-size: 50px;
    margin-bottom: 18px;
    text-shadow: 0 4px 15px rgba(0,0,0,.6);
}

.hero-header p {
    color: white;
    font-size: 22px;
    line-height: 1.8;
    text-shadow: 0 2px 8px rgba(0,0,0,.55);
}

#exploreBtn {
    margin-top: 20px;
    padding: 18px 45px;
    font-size: 20px;
    border-radius: 12px;
    border: 2px solid #111 !important;
    box-shadow: 0 6px 14px rgba(0,0,0,.20);
}

/* ===========================
   LIBRARY STATS
=========================== */

.library-stats {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 20px;
    margin-bottom: 45px;
}

.stat-card {
    width: 180px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(255,255,255,.20);
    border: 1px solid rgba(255,255,255,.30);
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
    transition: .35s;
}

.stat-card:hover {
    transform: translateY(-8px);
    background: rgba(255,255,255,.35);
}

.stat-card h2 {
    color: #FFD60A;
    font-size: 38px;
    margin-bottom: 8px;
}

.stat-card span {
    color: white;
    font-size: 18px;
}

/* ===========================
   SEARCH
=========================== */

.search-container {
    width: 100%;
    max-width: 850px;
    display: flex;
    justify-content: center;
    margin: 35px auto 0;
}

.search-box {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;

    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 60px;
    padding: 10px 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.search-icon {
    font-size: 24px;
    margin-left: 18px;
    margin-right: 12px;
}

#searchInput {
    flex: 1;
    width: 100%;

    border: none;
    outline: none;
    border-radius: 50px;

    background: rgba(255,255,255,.90);
    color: #333;

    font-size: 18px;
    padding: 18px 24px;

    box-shadow: 0 10px 25px rgba(0,0,0,.18);
    transition: .35s;
}

#searchInput::placeholder {
    color: #777;
}

#searchInput:focus {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(60,9,108,.20);
}

#searchBtn {
    border: 2px solid #111;
    background: #FFD60A;
    color: #3C096C;

    padding: 15px 32px;
    border-radius: 50px;

    cursor: pointer;
    font-weight: bold;
    font-size: 17px;
    transition: .35s;
}

#searchBtn:hover {
    background: white;
    color: #3C096C;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
}

/* ===========================
   CATEGORY FILTER
=========================== */

.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;

    margin: 35px auto 0;
    max-width: 1000px;
    position: relative;
    z-index: 2;
}

.category {
    background: rgba(255,255,255,.18);
    color: white;
    border: 1px solid rgba(255,255,255,.30);

    padding: 12px 22px;
    border-radius: 50px;

    cursor: pointer;
    font-size: 16px;
    transition: .35s;
    position: relative;
    z-index: 2;
    touch-action: manipulation;
}

.category:hover,
.category.active {
    background: #FFD60A;
    color: #3C096C;
    transform: translateY(-3px);
    font-weight: bold;
}

/* ===========================
   QUOTE SECTION
=========================== */

.quote-section {
    padding: 30px 8% 80px;
}

.quote-card {
    max-width: 950px;
    margin: 40px auto;
    padding: 55px 70px !important;

    text-align: center;
    position: relative;
    overflow: hidden;

    border: 6px solid transparent !important;
    border-radius: 30px;

    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(
            135deg,
            #7B2CBF 0%,
            #7B2CBF 50%,
            #FFD60A 50%,
            #FFD60A 100%
        ) border-box !important;

    box-shadow:
        0 0 18px rgba(123,44,191,.75),
        0 0 28px rgba(255,214,10,.55),
        0 20px 45px rgba(60,9,108,.12) !important;

    animation: fadeUp 1.1s ease;
    transition: transform .45s, box-shadow .45s;
}

.quote-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 0 20px rgba(123,44,191,.80),
        0 0 35px rgba(255,214,10,.60),
        0 35px 70px rgba(60,9,108,.18) !important;
}

.quote-icon {
    display: none;
}

.author-image {
    width: 210px;
    height: 210px;
    object-fit: cover;
    border-radius: 50%;

    display: none;
    margin: 0 auto 25px;

    border: 7px solid #FFD60A;
    box-shadow:
        0 0 18px rgba(255,214,10,.55),
        0 0 30px rgba(123,44,191,.50);
}

#author {
    text-align: center;
    color: #5A189A;
    font-size: 34px;
    margin: 0 0 25px;
}

#quote {
    text-align: center;
    max-width: 1100px;
    margin: 0 auto 25px;

    font-size: 34px;
    line-height: 1.7;
    color: #333;
    font-style: italic;
}

.category-badge {
    display: inline-block;

    background: #FFD60A;
    color: #3C096C;

    padding: 10px 22px;
    border-radius: 50px;

    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 35px;
}

/* ===========================
   BUTTONS
=========================== */

.quote-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;

    margin-top: 30px;
}

.quote-buttons .btn,
.quote-buttons .collection-link {
    width: 250px;
    height: 90px;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 0;
    margin: 0;

    font-size: 26px;
    font-weight: bold;
    text-align: center;

    border: 2px solid #111 !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 14px rgba(0,0,0,.20);

    text-decoration: none;
    transition: .35s;
}

.save-btn {
    background: #C1121F;
    color: white;
}

.save-btn:hover {
    background: #9B0D18;
}

.collection-link,
.collection-btn {
    background: #3C096C;
    color: white;
    text-decoration: none;
    transition: .35s;
}

.collection-link:hover,
.collection-btn:hover {
    background: #5A189A;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.collection-btn {
    display: inline-block;
    margin-top: 35px;
    padding: 16px 35px;
    border-radius: 10px;
    font-weight: bold;
}

/* ===========================
   FLOATING BACKGROUND
=========================== */

.floating-bg {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: float 18s ease-in-out infinite;
}

.orb1 {
    width: 320px;
    height: 320px;
    background: rgba(90,24,154,.20);
    top: 8%;
    left: 8%;
}

.orb2 {
    width: 260px;
    height: 260px;
    background: rgba(255,214,10,.18);
    right: 12%;
    top: 18%;
    animation-delay: 4s;
}

.orb3 {
    width: 350px;
    height: 350px;
    background: rgba(124,58,237,.15);
    bottom: 8%;
    left: 18%;
    animation-delay: 8s;
}

.orb4 {
    width: 280px;
    height: 280px;
    background: rgba(255,214,10,.12);
    bottom: 12%;
    right: 10%;
    animation-delay: 12s;
}

/* ===========================
   ANIMATIONS
=========================== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }

    25% {
        transform: translateY(-30px) translateX(20px);
    }

    50% {
        transform: translateY(20px) translateX(-25px);
    }

    75% {
        transform: translateY(-15px) translateX(15px);
    }

    100% {
        transform: translateY(0) translateX(0);
    }
}

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

@media(max-width:900px) {
    .wisdom-hero {
        padding: 120px 16px 35px;
    }

    .hero-header {
        padding: 35px 25px;
    }

    .hero-header h1 {
        font-size: 42px;
    }

    .hero-header p {
        font-size: 19px;
    }

    .search-box {
        flex-direction: column;
        border-radius: 24px;
        padding: 16px;
    }

    #searchBtn {
        width: 100%;
    }

    .quote-card {
        padding: 35px 24px !important;
    }

    .author-image {
        width: 170px;
        height: 170px;
    }

    #quote {
        font-size: 24px;
    }

    #author {
        font-size: 28px;
    }

    .quote-buttons .btn,
    .quote-buttons .collection-link {
        width: 100%;
        max-width: 300px;
        height: 75px;
        font-size: 22px;
    }
}

/* ===========================
   POLITICAL WISDOM RESPONSIVE
=========================== */

@media (max-width: 900px) {
    .wisdom-hero {
        padding: 90px 16px 35px;
    }

    .hero-header {
        width: 92%;
        padding: 35px 22px;
    }

    .hero-header h1 {
        font-size: 36px;
    }

    .hero-header p {
        font-size: 18px;
    }

    .library-stats {
        gap: 15px;
    }

    .stat-card {
        width: 160px;
    }

    .search-box {
        flex-direction: column;
        border-radius: 24px;
    }

    #searchBtn {
        width: 100%;
    }

    .category-filter {
        gap: 10px;
    }

    .category {
        font-size: 14px;
        padding: 10px 16px;
    }

    .quote-card {
        width: 92%;
        padding: 35px 24px !important;
    }

    .author-image {
        width: 160px;
        height: 160px;
    }

    #quote {
        font-size: 23px;
    }

    #author {
        font-size: 27px;
    }

    .quote-buttons .btn,
    .quote-buttons .collection-link {
        width: 100%;
        max-width: 300px;
        height: 72px;
        font-size: 21px;
    }
}

@media (max-width: 600px) {
    .category-filter {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: 520px;
        gap: 10px;
        padding: 0 2px;
        box-sizing: border-box;
    }

    .category {
        width: 100%;
        min-height: 48px;
        padding: 10px 8px;
        line-height: 1.25;
        -webkit-tap-highlight-color: transparent;
    }

    .hero-header h1 {
        font-size: 30px;
    }

    .hero-header p {
        font-size: 16px;
    }

    .stat-card {
        width: 135px;
        padding: 18px;
    }

    .stat-card h2 {
        font-size: 30px;
    }

    .stat-card span {
        font-size: 15px;
    }

    #quote {
        font-size: 20px;
    }

    #author {
        font-size: 24px;
    }
}

/* iPad/tablet fixed full-screen Political Wisdom background. */
@media (min-width: 768px) and (max-width: 1500px) {
    html:has(body.wisdom-page) {
        min-height: 100%;
        background: #111 !important;
    }

    body.wisdom-page {
        min-height: 100vh;
        background: #111 !important;
        isolation: isolate;
    }

    body.wisdom-page::before {
        content: "";
        position: fixed;
        inset: -3px;
        z-index: -1;
        pointer-events: none;
        background:
            linear-gradient(rgba(20,20,20,.45), rgba(20,20,20,.45)),
            var(--wisdom-bg, url("images/backgrounds/wisdom1-optimized.webp")) center / cover no-repeat;
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
        will-change: transform;
    }
}
