/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* GARDENA-inspired color palette */
    --primary-green: #2D8659;
    --dark-green: #1A5940;
    --light-green: #5AAF7D;
    --accent-green: #A8D5BA;
    --bg-light: #F8FAF7;
    --bg-white: #FFFFFF;
    --text-dark: #2C3E2E;
    --text-gray: #5A6C5B;
    --text-light: #8B9B8C;
    --border-color: #E0E8E3;
    --shadow: rgba(45, 134, 89, 0.1);
    --shadow-hover: rgba(45, 134, 89, 0.2);
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-green);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,0.05) 35px, rgba(255,255,255,0.05) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255,255,255,0.05) 35px, rgba(255,255,255,0.05) 70px);
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--bg-white);
    color: var(--primary-green);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-download {
    background-color: var(--primary-green);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.btn-download:hover {
    background-color: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

/* ===== eBooks Section ===== */
.ebooks-section {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
}

/* ===== Search Bar ===== */
.search-bar {
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px var(--shadow);
}

/* ===== eBooks Grid ===== */
.ebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.ebook-card {
    background-color: var(--bg-white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.ebook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
    border-color: var(--accent-green);
}

.ebook-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.ebook-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ebook-filename {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.ebook-description {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.ebook-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

/* ===== Loading ===== */
.loading {
    text-align: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 3rem;
    grid-column: 1 / -1;
    color: var(--text-gray);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* ===== About Section ===== */
.about-section {
    padding: 5rem 0;
    background-color: var(--bg-white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--dark-green);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    opacity: 0.9;
}

.footer-tagline {
    margin-top: 0.5rem;
    font-style: italic;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .ebooks-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ebook-actions {
        flex-direction: column;
    }
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Selection Color ===== */
::selection {
    background-color: var(--primary-green);
    color: white;
}
