/* Custom CSS for Book Landing Page */

/* Кастомні шрифти */
@font-face {
    font-family: 'Francesca';
    src: url('../fonts/Francesca-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AcciaPiano';
    src: url('../fonts/AcciaPiano-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Apply Francesca font to headings */
h1, h2, h3, .display-1, .display-2, .display-3, .display-4 {
    font-family: 'Francesca', serif !important;
}

:root {
    --primary-color: #6b1010;
    --secondary-color: #666666;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #6b1010;
    --info-color: #6b1010;
    --light-color: #2a2a2a;
    --dark-color: #1a1a1a;
    --gradient-primary: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    --gradient-secondary: linear-gradient(135deg, #420f0f 0%, #6b1010 100%);
    --shadow-light: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 1rem 3rem rgba(0, 0, 0, 0.6);
    --text-light: #f0f0f0;
    --text-muted: #cccccc;
    --bg-dark: #1a1717;
    --bg-darker: #1a1a1a;
    --accent-burgundy: #6b1010;
    --accent-dark-red: #6b1028;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'AcciaPiano', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-dark);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}
#home h1 {
    font-size: 3.5rem;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background-color: black !important;
}

.navbar.scrolled {
    background-color: black !important;
    box-shadow: var(--shadow-heavy);
    border-bottom: 1px solid var(--primary-color);
}

.navbar-brand {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

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

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

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(26, 26, 26, 0.9), rgba(42, 42, 42, 0.8)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23333333;stop-opacity:1" /><stop offset="100%" style="stop-color:%23000000;stop-opacity:1" /></linearGradient></defs><rect width="100%" height="100%" fill="url(%23grad)"/></svg>');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Account for fixed navbar */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(96, 10, 10, 0.95) 0%, rgba(13, 12, 12, 0.9) 100%);
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-buttons .btn {
    margin: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.book-showcase {
    text-align: center;
    position: relative;
}

.book-image {
    max-width: 400px;
    border-radius: 15px;
    box-shadow: var(--shadow-heavy);
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

.book-image:hover {
    transform: scale(1.05) rotateY(10deg);
}

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

/* Section Styling */
section {
    padding: 5rem 0;
}

section:nth-child(even) {
    background-color: var(--bg-darker);
    color: var(--text-light);
}

section:nth-child(odd) {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* Покращення читабельності */
.lead {
    color: var(--text-light) !important;
    font-weight: 400;
}

.text-muted {
    color: #e0e0e0 !important;
}

.blockquote p {
    color: var(--text-light) !important;
}

.card-body {
    color: var(--text-light);
}

.card-body .text-dark {
    color: var(--text-light) !important;
}

/* Спеціально для блоку "Про книгу" */
#about {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

#about .text-muted {
    color: #666 !important;
}

#about p {
    color: #333 !important;
}

#about .lead {
    color: #333 !important;
    font-weight: 500;
}

#about h2, #about h3 {
    color: #333 !important;
    font-family: 'Francesca', serif;
}

#about li {
    color: #333 !important;
}

/* Покращення контрасту для статистики */
.book-stats .text-muted {
    color: #e0e0e0 !important;
}

.book-stats {
    background: var(--bg-darker);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(139, 21, 56, 0.3);
    margin-top: 2rem;
}

/* Загальне покращення контрасту */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-light) !important;
}

/* Застосування кастомного шрифту для заголовків блоків */
h1.display-3, h2.display-4, .hero-section h1 {
    font-family: 'Francesca', serif;
}

/* Заголовки секцій */
#fragment h2, #purchase h2, #contact h2 {
    font-family: 'Francesca', serif;
}

p {
    color: var(--text-light);
}

.display-4 {
    font-family: 'Francesca', serif;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    /* font-size: 3.5rem; */
}

/* Interactive Book Styles */
.book-container {
    background: radial-gradient(circle at center, rgba(139, 21, 56, 0.1) 0%, transparent 70%);
}

.book {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.book-page {
    cursor: pointer;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}

.book-page:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4) !important;
}

.book-page.active {
    z-index: 10;
}

.book-page:not(.active) {
    z-index: 5;
}

/* Page content styling */
.page-content {
    text-shadow: none;
    color: #000000 !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    line-height: 1.8 !important;
}

.page-content h3 {
    text-shadow: 0 2px 4px rgba(139, 21, 56, 0.3);
    color: #6b1010 !important;
}

.page-content p {
    margin-bottom: 1.2em;
    color: #000000 !important;
    font-weight: 600 !important;
    padding: 0 15px;
}

.page-content div {
    color: #000000 !important;
    font-weight: 600 !important;
}

/* Modal enhancements */
#bookModal .modal-dialog {
    max-width: 90vw;
}

#bookModal .modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Navigation buttons styling */
#bookModal .btn-outline-light {
    border-color: #6b1010;
    color: #fff;
    background-color: #6b1010;

    transition: all 0.3s ease;
}

#bookModal .btn-outline-light:hover {
    background-color: #6b1010;
    border-color: #6b1010;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 21, 56, 0.4);
}

#bookModal .btn-outline-light:disabled {
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

/* Page indicator styling */
#pageIndicator {
    font-weight: 600;
    color: #6b1010 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Fragment 2 section specific styles */
#fragment2 {
    position: relative;
    overflow: hidden;
}

.fragment-preview {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fragment-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Fix blockquote quote mark overlap */
.fragment-preview .blockquote {
    position: relative;
    padding-left: 1.5rem;
}

.fragment-preview .blockquote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -0.2rem;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'AcciaPiano', serif;
    line-height: 1;
}

.fragment-preview .blockquote p {
    position: relative;
    z-index: 2;
    margin-left: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .book {
        width: 90vw !important;
        height: 400px !important;
    }
    
    .book-page {
        padding: 20px !important;
        font-size: 14px;
    }
    
    #bookModal .modal-dialog {
        margin: 10px;
    }
}



/* About Section */
.book-stats {
    background: var(--bg-darker);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(139, 21, 56, 0.3);
    margin-top: 2rem;
}

.book-stats h4 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Fragment Section */
.fragment-card {
    position: relative;
}

.fragment-card .card {
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--bg-darker);
    border: 2px solid var(--primary-color);
    color: var(--text-light);
}

.fragment-card .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(139, 21, 56, 0.3);
}

.blockquote {
    position: relative;
    font-size: 1.2rem;
    line-height: 1.8;
}

.blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color);
    position: absolute;
    top: -20px;
    left: -20px;
    font-family: 'AcciaPiano', Georgia, serif;
}

/* Purchase Section */
.purchase-card .card {
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--bg-darker);
    border: 2px solid var(--primary-color);
}

.purchase-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(139, 21, 56, 0.4);
    border-color: var(--accent-burgundy);
}

.price-tag {
    margin: 1rem 0;
}

.price-old {
    text-decoration: line-through;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.price-new {
    color: var(--primary-color);
    font-size: 3rem;
    font-weight: 700;
}

.form-control {
    border-radius: 10px;
    border: 2px solid var(--secondary-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 21, 56, 0.25);
    transform: translateY(-2px);
    background-color: var(--bg-darker);
    color: var(--primary-color);
}

.form-control::placeholder {
    color: #999999;
}

.btn-primary {
    background: var(--gradient-secondary);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(139, 21, 56, 0.4);
    /* background: linear-gradient(135deg, #a01d42 0%, #6b1010 100%); */
    color: #fff;
}

/* Contact Section */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 15px;
    background: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-color);
    min-width: 100px;
}

.social-link:hover {
    color: white;
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.social-link i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.social-link span {
    font-weight: 600;
    font-size: 1.1rem;
}

.social-link.telegram:hover {
    background: linear-gradient(135deg, #0088cc, #00a0e6);
    box-shadow: 0 0 20px rgba(0, 136, 204, 0.5);
}

.social-link.tiktok:hover {
    background: linear-gradient(135deg, #ff0050, #ff4d6d);
    box-shadow: 0 0 20px rgba(255, 0, 80, 0.5);
}

.social-link.instagram:hover {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    box-shadow: 0 0 20px rgba(131, 58, 180, 0.5);
}

.contact-info i {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.alert {
    border-radius: 15px;
    border: none;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 100px 0 2rem 0; /* Increased top padding for mobile navbar */
    }
    
    .display-3 {
        font-size: 1.5rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        min-width: 120px;
        padding: 1.5rem;
    }
    
    .book-image {
        max-width: 300px;
    }
    
    .price-new {
        font-size: 2.5rem;
    }
    
    /* Fix About section spacing on mobile */
    #about .row.align-items-center .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
    
    #about .col-lg-6 img {
        margin-bottom: 1.5rem;
    }
    #home h1 {
        font-size: 2rem !important;
    }
    .main-image-block {
        padding: 25px 0;
}

@media (max-width: 576px) {
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .display-4::after {
        width: 60px;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Scroll Animations */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.shadow-custom {
    box-shadow: var(--shadow-heavy);
}

.border-radius-custom {
    border-radius: 20px;
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    #contact,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

.book-page p{
    text-indent: 10px;
}