/* KısaOkuma - Turkish Reading Site Styles - Book Theme */

:root {
    --primary-color: #2c1810;
    --secondary-color: #8b4513;
    --accent-color: #d4a574;
    --text-color: #3a3a3a;
    --bg-color: #faf8f5;
    --light-bg: #f5f1eb;
    --card-bg: #ffffff;
    --border-color: #e8e0d6;
    --card-shadow: 0 4px 12px rgba(44, 24, 16, 0.08);
    --card-shadow-hover: 0 8px 24px rgba(44, 24, 16, 0.12);
    --font-main: 'Georgia', 'Times New Roman', serif;
    --font-heading: 'Georgia', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8;
    font-size: 17px;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 69, 19, 0.02) 2px, rgba(139, 69, 19, 0.02) 4px);
}

/* Global Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animate on scroll */
.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.animate-scale-in {
    opacity: 0;
    animation: scaleIn 0.6s ease forwards;
}

.animate-zoom-in {
    opacity: 0;
    animation: zoomIn 0.8s ease forwards;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3d2415 100%);
    border-bottom: 3px solid var(--accent-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    white-space: nowrap;
}

.logo-word {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo:hover .logo-word:first-child {
    transform: translateY(-2px);
}

.logo:hover .logo-word:last-child {
    transform: translateY(2px);
}

.logo:hover {
    color: #f0d4a0;
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: #e8dcc6;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

nav a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

nav a:hover::before {
    width: 100%;
}

nav a.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 600;
}

nav a.active::before {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent-color);
    padding: 0.5rem;
    transition: transform 0.3s ease;
    width: 40px;
    height: 40px;
    position: relative;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    transform: rotate(90deg);
}

.mobile-menu-toggle.active .hamburger-icon {
    display: none;
}

.mobile-menu-toggle.active .close-icon {
    display: inline-block;
}

.hamburger-icon, .close-icon {
    transition: opacity 0.3s ease;
    display: inline-block;
}

/* Desktop nav - всегда видимое */
nav {
    display: block;
    opacity: 1;
    max-height: none;
    overflow: visible;
}

/* Mobile nav - скрытое по умолчанию */
@media (max-width: 768px) {
    nav {
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }

    nav.active {
        max-height: 600px;
        opacity: 1;
    }
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: calc(100vh - 250px);
    animation: fadeIn 0.6s ease;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    animation: fadeInUp 0.8s ease backwards;
}

.page-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    text-align: center;
    font-style: italic;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9);
    animation: none;
}

.card.animated {
    opacity: 1;
    transform: scale(1);
    animation: zoomIn 0.6s ease forwards;
}

/* Animation delays are set via JavaScript */

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-color);
}

.book-card:hover {
    transform: translateY(-6px) scale(1.03);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.3;
}

.card-meta {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 1rem;
    font-style: italic;
    border-left: 3px solid var(--accent-color);
    padding-left: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
    letter-spacing: 0.5px;
}

.badge-kisa {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.badge-orta {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.badge-yogun {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd0;
}

.badge-hafif {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

/* Filters */
.filters {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-main);
    background: var(--card-bg);
    transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.mobile-filters-toggle {
    display: none;
    width: 100%;
    padding: 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: background 0.3s;
}

.mobile-filters-toggle:hover {
    background: #6b3410;
}

/* Form Container */
.form-container {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--card-shadow);
    max-width: 700px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.form-container h2 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

/* Form */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-main);
    background: var(--light-bg);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.75rem;
    cursor: pointer;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-sans);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #6b3410);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6b3410, var(--secondary-color));
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.5);
    transform: translateY(-3px) scale(1.02);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 3px solid var(--accent-color);
    padding: 2rem;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}

.cookie-banner.active {
    display: block;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-banner p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-buttons button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-sans);
}

.btn-accept {
    background: var(--secondary-color);
    color: white;
}

.btn-accept:hover {
    background: #6b3410;
}

.btn-reject {
    background: #95a5a6;
    color: white;
}

.btn-reject:hover {
    background: #7f8c8d;
}

.btn-settings {
    background: linear-gradient(135deg, #f5f1eb, #e8e0d6);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn-settings:hover {
    border-color: var(--accent-color);
    color: var(--secondary-color);
    background: linear-gradient(135deg, #e8e0d6, #f5f1eb);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cookie-settings {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    display: none;
}

.cookie-settings.active {
    display: block;
}

.cookie-category {
    margin-bottom: 1rem;
}

.cookie-category label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
}

.cookie-category input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 1.25rem 1.75rem;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    z-index: 2000;
    display: none;
    font-family: var(--font-sans);
    font-weight: 500;
    max-width: 400px;
}

.toast.active {
    display: block;
    animation: slideIn 0.3s;
}

.toast.error {
    background: #e74c3c;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3d2415 100%);
    border-top: 3px solid var(--accent-color);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    color: #e8dcc6;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-links h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #e8dcc6;
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 0.5rem;
    border-left: 2px solid transparent;
    position: relative;
}

.footer-links a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--accent-color);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 1rem;
    transform: translateX(5px);
}

.footer-links a:hover::before {
    width: 3px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.3);
    color: #c9b99a;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-container {
        align-items: center;
        justify-content: space-between;
    }

    .logo {
        font-size: 1.2rem;
        margin: 0;
    }

    .mobile-menu-toggle {
        margin: 0;
        align-self: center;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        border-bottom: 2px solid var(--accent-color);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }

    nav.active {
        max-height: 600px;
        opacity: 1;
        padding: 1.5rem;
    }

    nav.active ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    nav.active a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(212, 165, 116, 0.2);
        display: block;
        border-radius: 6px;
        transition: all 0.3s ease;
    }

    nav.active a:hover {
        background: rgba(212, 165, 116, 0.1);
        transform: translateX(5px);
    }

    nav.active a.active {
        background: rgba(212, 165, 116, 0.2);
    }

    .mobile-filters-toggle {
        display: block;
    }

    .filters {
        display: none;
    }

    .filters.active {
        display: block;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-buttons button {
        width: 100%;
    }

    .page-title {
        font-size: 2.2rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Reading List */
.reading-list-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--card-shadow);
}

.reading-list-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.reading-list-item .notes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.reading-list-item .notes textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: #666;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Links */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:not(.btn):not(nav a):not(.logo):not(.footer-links a) {
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

a:not(.btn):not(nav a):not(.logo):not(.footer-links a):hover {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

a:not(.btn):not(nav a):not(.logo):not(.footer-links a)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

a:not(.btn):not(nav a):not(.logo):not(.footer-links a):hover::after {
    width: 100%;
}

/* Content Sections */
.content-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

.content-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    animation: fadeInUp 0.6s ease backwards;
}

.content-section h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.content-section p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.content-section ul,
.content-section ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.content-section li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(44, 24, 16, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: block;
    margin: 1rem 0;
}

img:hover {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 10px 30px rgba(44, 24, 16, 0.25);
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.6s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

.book-image {
    width: 100%;
    max-width: 250px;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 1.5rem;
    display: block;
    box-shadow: 0 6px 20px rgba(44, 24, 16, 0.2);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
    opacity: 0;
    transform: scale(0.9);
    animation: none;
}

.book-image.animated {
    opacity: 1;
    transform: scale(1);
    animation: zoomIn 0.6s ease forwards;
}

.book-image:hover {
    transform: scale(1.08) translateY(-8px);
    box-shadow: 0 15px 40px rgba(44, 24, 16, 0.35);
}

.book-card:hover .book-image {
    transform: scale(1.08) translateY(-8px);
}

.book-card {
    display: flex;
    flex-direction: column;
}

.book-card .book-image {
    order: -1;
    margin-top: 0;
}

@media (max-width: 768px) {
    .book-image {
        max-width: 200px;
        height: 280px;
    }
}

/* Book card specific styles */
.book-card {
    background: linear-gradient(to bottom, var(--card-bg) 0%, var(--light-bg) 100%);
}

.book-card p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.book-card strong {
    color: var(--primary-color);
    font-weight: 600;
}
