/* IMPORT GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    --primary-color: #16213e;
    --secondary-color: #00bbf9;
    --accent-color: #f9a826;
    --light-bg: #f3f6fb;
    --text-dark: #333;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Poppins', sans-serif;
}

/* NAVBAR */
.navbar {
    background: rgba(22, 33, 62, 0.95) !important; /* Glass effect dark */
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--secondary-color);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 600;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #1a1a2e);
    color: white;
    padding: 80px 0 60px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

/* SEARCH BAR */
.search-box {
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 50px;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    border-radius: 50px;
    background-color: var(--secondary-color);
    border: none;
    padding: 10px 25px;
    color: white;
    font-weight: 600;
    transition: transform 0.2s;
}

.search-btn:hover {
    background-color: #009ec3;
    transform: scale(1.05);
}

/* CARDS & ANIMATIONS */
.resource-card {
    border: none;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.resource-card:hover {
    transform: translateY(-10px); /* Lift effect */
    box-shadow: 0 15px 30px rgba(0, 187, 249, 0.2); /* Teal glow */
}

.card-img-top {
    height: 180px;
    object-fit: cover;
    border-bottom: 3px solid var(--accent-color);
}

.badge-subject {
    background-color: var(--secondary-color);
    font-weight: 600;
}

.badge-grade {
    background-color: var(--primary-color);
}

.btn-download {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-download:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ANIMATION UTILS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* --- CONTENT PROTECTION --- */

/* 1. Prevent Text Selection */
.protected-content {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

/* 2. The Watermark Container */
.preview-container {
    position: relative;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #fff;
}

/* 3. The Actual Watermark Overlay */
.watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none; /* Allows clicking through if needed */
    background: rgba(255, 255, 255, 0.1); /* Slight white tint */
}

/* 4. The Watermark Text */
.watermark-text {
    font-size: 4rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.15); /* Faint Black */
    transform: rotate(-45deg);
    text-transform: uppercase;
    white-space: nowrap;
    user-select: none;
}

/* 5. Print Hiding (If they try Ctrl+P, page goes blank) */
@media print {
    body { display: none; }
}