/* ============================================
   DULANEY PUBLISHING - CUSTOM STYLES
   Modern, Animated, Mobile-First Design
   ============================================ */

/* ============================================
   BASE & TYPOGRAPHY
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */
nav {
    transition: all 0.3s ease;
}

.nav-link {
    color: #ffffff;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link.active {
    color: #ffffff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

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

.nav-dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #ffffff;
    border-radius: 0.75rem;
    padding: 1rem;
    min-width: 230px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    z-index: 100;
}

.dropdown-link {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    transition: background 0.3s ease;
}

.dropdown-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-link[aria-current="page"] {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 1rem;
    margin-top: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-dropdown a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.35rem 0;
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero-section {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

/* Default Hero Background - Home Page */
.hero-section {
    background-image: url('../images/hero-home.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Children's Books Hero */
.hero-children {
    background-image: url('../images/hero-children.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Faith-Based Books Hero */
.hero-faith {
    background-image: url('../images/hero-faith.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Adult Coloring Books Hero */
.hero-coloring {
    background-image: url('../images/hero-coloring.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Adult Books Hero */
.hero-adult {
    background-image: url('../images/adultheroimage.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Business Books Hero */
.hero-business {
    background-image: url('../images/businesshero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-bg {
    backdrop-filter: blur(2px);
}

/* Enhanced text visibility with lighter overlay */
.hero-section h1,
.hero-section h2,
.hero-section p {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 
                 0 0 20px rgba(0, 0, 0, 0.6);
}

.hero-section .btn-primary,
.hero-section .btn-secondary {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    position: relative;
    display: inline-block;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background-color: #dc2626;
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
    min-height: 44px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(220, 38, 38, 0.4);
    background-color: #991b1b;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: transparent;
    color: white;
    font-weight: 600;
    border: 2px solid white;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: white;
    color: black;
    transform: translateY(-2px);
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
}

/* ============================================
   BOOK CARDS
   ============================================ */
.book-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
    border: 1px solid #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-12px);
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.3);
}

.book-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.book-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.book-card:hover .book-image {
    transform: scale(1.1);
}



/* ============================================
   CATEGORY CARDS
   ============================================ */
.category-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
    border: 1px solid #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: white;
    display: block;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.3);
}

.category-icon {
    color: #dc2626;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}


/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animation-delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

.section-title-lg {
    font-size: 3rem;
}

.animation-delay-400 {
    animation-delay: 0.4s;
    opacity: 0;
}

.animation-delay-600 {
    animation-delay: 0.6s;
    opacity: 0;
}

/* Pulse Animation for Scroll Indicator */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    50% {
        transform: translateY(-10px) translateX(-50%);
    }
}

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* Float Animation for Cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   SCROLL BEHAVIOR
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        background-position: center center;
    }
    
    /* Center hero content on mobile for better readability */
    .hero-section .max-w-2xl {
        max-width: 100%;
        text-align: center;
    }
    
    /* Stack buttons vertically on mobile */
    .hero-section .flex-col,
    .hero-section .sm\:flex-row {
        width: 100%;
    }
    
    .hero-section .btn-primary,
    .hero-section .btn-secondary {
        width: 100%;
    }
    
    .book-image-container {
        height: 300px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 640px) {
    .book-image-container {
        height: 250px;
    }
}

/* ============================================
   FOOTER STYLES
   ============================================ */
footer a {
    transition: color 300ms ease;
}
footer a:hover {
    transform: translateX(4px);
    display: inline-block;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    transition: background-color 300ms ease, color 300ms ease, opacity 300ms ease;
}
.footer-social a:hover {
    background-color: #000000;
    color: #ffffff;
}

.partner-logo {
    height: 20px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 300ms ease;
}
.partner-logo:hover {
    opacity: 1;
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    background-color: #111111;
    border: 1px solid #ffffff;
    color: #ffffff;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    z-index: 1000;
}
.cookie-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.btn-cookie {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid #ffffff;
    background-color: #dc2626;
    color: #ffffff;
    font-weight: 600;
    transition: background-color 300ms ease, color 300ms ease, transform 300ms ease;
    text-decoration: none;
}
.btn-cookie:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translateY(-1px);
}
.cookie-hidden {
    display: none;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    background-color: #000000;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease, transform 300ms ease;
    z-index: 900;
}
.scroll-to-top.show {
    opacity: 1;
    pointer-events: auto;
}
.scroll-to-top:hover {
    transform: translateY(-2px);
}

/* ============================================
   LOADING STATES
   ============================================ */
.btn-buy:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #991b1b;
}

/* ============================================
   FOCUS STATES FOR ACCESSIBILITY
   ============================================ */
a:focus,
button:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* ============================================
   GRADIENT TEXT EFFECT
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   BACKDROP EFFECTS
   ============================================ */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
}

/* ============================================
   TRANSITIONS
   ============================================ */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .hero-section,
    nav,
    footer {
        display: none;
    }
}
/* Cover Frame for precise book cover dimensions */
.cover-frame {
    width: 600px;
    height: 900px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .cover-frame {
        width: 480px;
        height: 720px;
    }
}

@media (max-width: 768px) {
    .cover-frame {
        width: 360px;
        height: 540px;
    }
}

@media (max-width: 640px) {
    .cover-frame {
        width: 320px;
        height: 480px;
    }
}