/* Custom CSS for Book Author Website */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 120px 0 80px 0;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,100 1000,0 1000,100"/></svg>');
    background-size: cover;
}

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

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.05);
    cursor: pointer;
    filter: brightness(1.1);
}

/* Book Cards */
.book-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    text-decoration: none;
}

.book-card .card-body {
    padding: 2rem;
}

.book-card .card-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.book-card .btn {
    background: var(--secondary-color);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.book-card .btn:hover {
    background: var(--primary-color);
}

/* Chapter List */
.chapter-list {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 2rem;
}

.chapter-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.chapter-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.chapter-item a {
    display: block;
    padding: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.chapter-item a:hover {
    color: var(--secondary-color);
}

/* Chapter Content */
.chapter-content {
    background: white;
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    line-height: 1.8;
    font-size: 1.1rem;
}

.chapter-content h1 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
}

.breadcrumb-item a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--dark-gray);
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 0.75rem 0;
}

.navbar-brand {
    position: relative;
    font-weight: 700;
    font-size: 1.7rem;
    color: #ffffff !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

/* Logo image adjustments */
.navbar-brand img {
    transform: translateY(5px) scale(1.05);
    transition: all 0.3s ease;
}

/* Pen icon styling */
.pen-icon {
    color: #ffffff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.navbar-brand:hover .pen-icon {
    color: #4ecdc4;
    transform: rotate(-15deg) scale(1.1);
    opacity: 1;
}

/* Splash effect under logo */
.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
    border-radius: 2px;
    transition: width 0.4s ease;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.5);
}

.navbar-brand:hover::after {
    width: 100%;
}

.navbar-brand:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

/* Navigation links */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 1.1rem;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    text-decoration: none;
}

.navbar-nav .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Dropdown menu styling */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    color: var(--text-color);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateX(5px);
}

/* Mobile navbar toggler */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Fullscreen Image Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.fullscreen-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    text-align: center;
}

.fullscreen-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.close-fullscreen {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-fullscreen:hover {
    color: #ff6b6b;
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Animations for fullscreen modal */
@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 110px 0 50px 0;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-content .order-1 {
        margin-bottom: 3rem;
    }
    
    .hero-image {
        max-width: 80%;
        width: 100%;
        margin: 0 auto;
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0 40px 0;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-content .order-1 {
        margin-bottom: 2rem;
    }
    
    .hero-image {
        max-width: 90%;
        width: 100%;
        margin: 0 auto;
        display: block;
    }
    
    .book-card .card-body {
        padding: 1.5rem;
    }
    
    .chapter-content {
        padding: 2rem;
        font-size: 1rem;
    }
    
    .chapter-list {
        padding: 1.5rem;
    }
    
    .close-fullscreen {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 45px;
        height: 45px;
    }
    
    .fullscreen-content {
        max-width: 98%;
        max-height: 98%;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 90px 0 30px 0;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-content .order-1 {
        margin-bottom: 2.5rem;
    }
    
    .hero-image {
        max-width: 95%;
        width: 100%;
        margin: 0 auto;
        display: block;
    }
    
    .chapter-content {
        padding: 1.5rem;
    }
    
    .chapter-list {
        padding: 1rem;
    }
}

/* Scroll effect */
.navbar.scrolled {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Custom button styles */
.btn-primary-custom {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

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