/* ===================================
   Tales & Tails - Forest Green & Navy
   Sophisticated, Natural, Professional
   =================================== */

/* Import Google Fonts for Professional Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* Forest Green & Navy Professional Color System */
:root {
    /* Primary Forest Green Palette */
    --primary-50: #f0f9f4;
    --primary-100: #dcf2e4;
    --primary-200: #bce5cd;
    --primary-300: #8dd1a8;
    --primary-400: #56b77d;
    --primary-500: #2f855a;
    --primary-600: #1f6b49;
    --primary-700: #1b4332;
    --primary-800: #18362a;
    --primary-900: #152e23;
    
    /* Navy Blue Secondary Palette */
    --navy-50: #f7fafc;
    --navy-100: #edf2f7;
    --navy-200: #e2e8f0;
    --navy-300: #cbd5e0;
    --navy-400: #a0aec0;
    --navy-500: #718096;
    --navy-600: #4a5568;
    --navy-700: #2d3748;
    --navy-800: #1a202c;
    --navy-900: #171923;
    
    /* Natural Accent Colors */
    --sage-light: #68d391;
    --sage-medium: #48bb78;
    --cream: #fffef7;
    --warm-white: #fefefe;
    --natural-beige: #f7f5f3;
    
    /* Semantic Colors with Forest Theme */
    --success: #38a169;
    --success-light: #c6f6d5;
    --warning: #d69e2e;
    --warning-light: #fef5e7;
    --error: #e53e3e;
    --error-light: #fed7d7;
    --info: #3182ce;
    --info-light: #bee3f8;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows with Natural Feel */
    --shadow-sm: 0 1px 2px 0 rgb(27 67 50 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(27 67 50 / 0.1), 0 2px 4px -2px rgb(27 67 50 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(27 67 50 / 0.1), 0 4px 6px -4px rgb(27 67 50 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(27 67 50 / 0.1), 0 8px 10px -6px rgb(27 67 50 / 0.1);
}

/* ===================================
   Base Styles & Typography
   =================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    color: var(--navy-700);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Professional Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--navy-800);
    margin-bottom: var(--space-4);
}

h1 { font-size: 2.5rem; color: var(--primary-700); }
h2 { font-size: 2rem; color: var(--navy-800); }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: var(--space-4);
    color: var(--navy-600);
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--navy-700);
}

/* ===================================
   Navigation - Forest & Navy Theme
   =================================== */

.navbar {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--navy-800) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-4) 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--warm-white) !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand:hover {
    color: var(--sage-light) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--navy-200) !important;
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--warm-white) !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Modern Cart Button with Forest Theme */
.nav-link.position-relative .badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    background: var(--sage-medium);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    border: 2px solid var(--primary-700);
    font-weight: 600;
}

/* ===================================
   Hero Section - Natural & Professional
   =================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--warm-white) 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-12) var(--space-8);
    margin: var(--space-8) 0;
    border: 1px solid var(--primary-100);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, var(--primary-100), var(--sage-light));
    border-radius: 50%;
    transform: translate(50%, -50%);
    opacity: 0.3;
}

.hero-section h1 {
    color: var(--primary-700);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--space-6);
}

.hero-section .lead {
    font-size: 1.5rem;
    color: var(--navy-600);
    margin-bottom: var(--space-8);
}

/* ===================================
   Cards - Natural & Elegant
   =================================== */

.card {
    background: var(--warm-white);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-300);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--navy-50) 100%);
    border-bottom: 1px solid var(--primary-200);
    padding: var(--space-6);
    font-weight: 600;
    color: var(--navy-800);
}

.card-body {
    padding: var(--space-6);
}

/* ===================================
   Book Cards - Forest Theme
   =================================== */

.book-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--warm-white);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-600), var(--sage-medium));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.book-card:hover::before {
    transform: scaleX(1);
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-400);
}

.book-cover-container {
    position: relative;
    width: 100%;
    height: 320px;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--navy-50) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-cover-high-res {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s ease;
}

.book-card:hover .book-cover-high-res {
    transform: scale(1.05);
}

.no-image-placeholder {
    font-size: 4rem;
    color: var(--primary-300);
    text-align: center;
}

.book-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    background: var(--warm-white);
}

.book-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy-800);
    line-height: 1.4;
    margin-bottom: var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    color: var(--navy-600);
    font-size: 0.9rem;
    margin-bottom: var(--space-4);
    font-style: italic;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-600);
    margin-bottom: 0;
}

/* ===================================
   Buttons - Forest Green Theme
   =================================== */

.btn {
    font-weight: 600;
    font-size: 0.9rem;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    border-color: var(--primary-500);
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    border-color: var(--primary-600);
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-secondary {
    background: var(--navy-100);
    color: var(--navy-700);
    border: 1px solid var(--navy-300);
}

.btn-secondary:hover {
    background: var(--navy-200);
    color: var(--navy-800);
    transform: translateY(-1px);
}

.btn-success {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--success) 0%, var(--primary-600) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    border-color: var(--primary-500);
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1.1rem;
    border-radius: var(--radius-xl);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8rem;
}

/* ===================================
   Forms - Natural & Professional
   =================================== */

.form-control {
    font-size: 1rem;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--primary-300);
    border-radius: var(--radius-lg);
    background: var(--warm-white);
    transition: all 0.3s ease;
    font-family: var(--font-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(47, 133, 90, 0.1);
    background: var(--warm-white);
}

.form-label {
    font-weight: 600;
    color: var(--navy-700);
    margin-bottom: var(--space-2);
    font-size: 0.9rem;
}

/* ===================================
   Alerts - Natural Theme
   =================================== */

.alert {
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    border: none;
    border-left: 4px solid;
    font-weight: 500;
    margin-bottom: var(--space-6);
}

.alert-success {
    background: var(--success-light);
    color: #22543d;
    border-left-color: var(--success);
}

.alert-warning {
    background: var(--warning-light);
    color: #975a16;
    border-left-color: var(--warning);
}

.alert-danger {
    background: var(--error-light);
    color: #c53030;
    border-left-color: var(--error);
}

.alert-info {
    background: var(--info-light);
    color: #2c5282;
    border-left-color: var(--info);
}

/* ===================================
   Footer - Forest Theme
   =================================== */

footer {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--navy-800) 100%);
    color: var(--navy-200);
    padding: var(--space-12) 0 var(--space-8);
    margin-top: var(--space-12);
}

footer h5 {
    color: var(--warm-white);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

footer p {
    color: var(--navy-300);
    line-height: 1.6;
}

footer em {
    color: var(--sage-light);
    font-style: italic;
}

/* ===================================
   Utility Classes
   =================================== */

.text-primary-custom { color: var(--primary-600) !important; }
.text-secondary-custom { color: var(--navy-600) !important; }
.text-accent-custom { color: var(--sage-medium) !important; }

.bg-primary-custom { background-color: var(--primary-500) !important; }
.bg-light-custom { background-color: var(--natural-beige) !important; }

/* ===================================
   Professional Checkout Styles
   =================================== */

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

.order-summary {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--warm-white) 100%);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.security-badge {
    background: var(--warm-white);
    color: var(--navy-600);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    border: 1px solid var(--primary-200);
    font-weight: 500;
}

/* ===================================
   Cart Styles
   =================================== */

.cart-item {
    padding: var(--space-6);
    border-bottom: 1px solid var(--primary-200);
    transition: background 0.3s ease;
}

.cart-item:hover {
    background: var(--primary-50);
}

.quantity-input {
    max-width: 80px;
    text-align: center;
}

/* ===================================
   Category Chips - Forest Theme
   =================================== */

.category-chip {
    background: var(--primary-100);
    color: var(--navy-700);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin: var(--space-1);
    border: 1px solid var(--primary-200);
    transition: all 0.3s ease;
}

.category-chip:hover {
    border-color: var(--primary-500);
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
    transform: translateY(-1px);
}

/* Stock Badges */
.stock-badge {
    background: var(--success);
    color: white;
    font-size: 0.75rem;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.out-of-stock {
    background: var(--error);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .hero-section {
        padding: var(--space-8) var(--space-6);
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .book-cover-container {
        height: 250px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.25rem;
    }
    
    .book-cover-container {
        height: 220px;
    }
    
    .card-body {
        padding: var(--space-4);
    }
    
    .btn-lg {
        padding: var(--space-3) var(--space-6);
        font-size: 1rem;
    }
}

/* Enhanced hover effects for category cards */
.hover-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-400) !important;
}

/* Image error handling */
.book-cover-high-res[src=""] {
    display: none;
}

/* Better no-image placeholder */
.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-300);
    background: linear-gradient(135deg, var(--primary-50), var(--navy-50));
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
}

/* Enhanced Category Cards */
.category-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--primary-200) !important;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-400) !important;
}

.category-icon {
    font-size: 3rem;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.category-card:hover .category-icon {
    filter: grayscale(0%);
}

/* Enhanced Book Cards with Better Spacing */
.book-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.book-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
}

/* Better Badge Positioning */
.badge.bg-success {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-lg);
}

/* Enhanced Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--navy-50) 50%, var(--warm-white) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-200), transparent);
    border-radius: 50%;
    opacity: 0.3;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--navy-200), transparent);
    border-radius: 50%;
    opacity: 0.2;
}

/* Better Typography Hierarchy */
.display-3 {
    font-weight: 700;
    color: var(--primary-700);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.display-5 {
    font-weight: 600;
    color: var(--primary-700);
}

/* Enhanced Stats Cards */
.bg-light-custom .card-body {
    background: linear-gradient(135deg, var(--warm-white) 0%, var(--primary-50) 100%);
    border-radius: var(--radius-xl);
}

/* Better Button Spacing */
.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: var(--space-8) var(--space-4);
    }
    
    .category-icon {
        font-size: 2.5rem;
    }
}

/* Loading Animation for Images */
.book-cover-high-res {
    opacity: 0;
    animation: fadeInImage 0.6s ease-in-out forwards;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* Enhanced spacing utilities */
.g-4 > * {
    padding: var(--space-4);
}

/* ===================================
   Premium About & Contact Page Styles
   =================================== */

/* Hero Sections - Premium Design */
.premium-hero {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--navy-50) 50%, var(--warm-white) 100%);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    margin: var(--space-8) 0;
    padding: var(--space-12) var(--space-8);
    border: 1px solid var(--primary-200);
    box-shadow: var(--shadow-xl);
}

.premium-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-200), transparent);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse-slow 6s ease-in-out infinite;
}

.premium-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--sage-light), transparent);
    border-radius: 50%;
    opacity: 0.2;
    animation: pulse-slow 8s ease-in-out infinite reverse;
}

@keyframes pulse-slow {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.2; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.4; }
}

/* Floating Animation */
.floating-element {
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.floating-element:nth-child(2) {
    animation-delay: 0.5s;
}

.floating-element:nth-child(3) {
    animation-delay: 1s;
}

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

/* Premium Stats Cards */
.premium-stats .card {
    background: linear-gradient(135deg, var(--warm-white) 0%, var(--primary-50) 100%);
    border: 2px solid var(--primary-200);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.premium-stats .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(47, 133, 90, 0.15), transparent);
    transition: left 0.6s;
}

.premium-stats .card:hover::before {
    left: 100%;
}

.premium-stats .card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-400);
}

/* Animated Counters */
.number-counter {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: var(--space-2);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Premium Mission Card */
.premium-mission-card {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--navy-700) 100%);
    color: var(--warm-white);
    border: none;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    margin: var(--space-10) 0;
}

.premium-mission-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate-slow 15s linear infinite;
}

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

/* Premium Service Cards */
.premium-service-card {
    background: var(--warm-white);
    border: 2px solid var(--primary-200);
    border-radius: var(--radius-xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.premium-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-600), var(--sage-medium));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.premium-service-card:hover::before {
    transform: scaleX(1);
}

.premium-service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-400);
}

.premium-service-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    font-size: 2.5rem;
    color: var(--warm-white);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--primary-100);
}

.premium-service-card:hover .premium-service-icon {
    transform: scale(1.15) rotate(10deg);
    background: linear-gradient(135deg, var(--sage-medium) 0%, var(--primary-600) 100%);
    box-shadow: var(--shadow-xl);
}

/* Premium Timeline */
.premium-timeline-item {
    position: relative;
    padding-left: 4rem;
    margin-bottom: var(--space-10);
}

.premium-timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    border: 4px solid var(--warm-white);
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.premium-timeline-item::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 24px;
    width: 3px;
    height: calc(100% + var(--space-6));
    background: linear-gradient(180deg, var(--primary-600) 0%, var(--primary-400) 100%);
    border-radius: var(--radius-sm);
}

.premium-timeline-item:last-child::after {
    display: none;
}

/* Premium CTA Section */
.premium-cta-section {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--navy-800) 100%);
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
    margin: var(--space-12) 0;
    color: var(--warm-white);
    box-shadow: var(--shadow-xl);
}

.premium-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate-slow 20s linear infinite;
}

/* Premium Glass Effect */
.premium-glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Premium Values Section */
.premium-values-section {
    background: linear-gradient(135deg, var(--natural-beige) 0%, var(--primary-50) 100%);
    border-radius: var(--radius-2xl);
    position: relative;
    margin: var(--space-12) 0;
    padding: var(--space-12) var(--space-8);
    border: 1px solid var(--primary-200);
    box-shadow: var(--shadow-lg);
}

/* Premium Contact Form */
.premium-contact-form {
    background: linear-gradient(135deg, var(--warm-white) 0%, var(--primary-50) 100%);
    border: 2px solid var(--primary-200);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.premium-contact-form::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-600), var(--sage-medium), var(--primary-600));
    border-radius: var(--radius-2xl);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-contact-form:hover::before {
    opacity: 1;
}

.premium-form-control {
    font-size: 1rem;
    padding: var(--space-4) var(--space-5);
    border: 2px solid var(--primary-300);
    border-radius: var(--radius-lg);
    background: var(--warm-white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary);
    box-shadow: var(--shadow-sm);
}

.premium-form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(47, 133, 90, 0.15);
    background: var(--warm-white);
    transform: translateY(-2px);
}

.premium-form-label {
    font-weight: 600;
    color: var(--navy-700);
    margin-bottom: var(--space-3);
    font-size: 1rem;
    font-family: var(--font-display);
}

/* Premium Contact Info Cards */
.premium-info-card {
    background: linear-gradient(135deg, var(--warm-white) 0%, var(--navy-50) 100%);
    border: 2px solid var(--primary-200);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: var(--space-6);
}

.premium-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-400);
}

/* Premium FAQ Accordion */
.premium-accordion .accordion-item {
    border: 2px solid var(--primary-200);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.premium-accordion .accordion-button {
    background: linear-gradient(135deg, var(--warm-white) 0%, var(--primary-50) 100%);
    border: none;
    padding: var(--space-5) var(--space-6);
    font-weight: 600;
    color: var(--navy-700);
    font-family: var(--font-display);
}

.premium-accordion .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: var(--warm-white);
    box-shadow: none;
}

.premium-accordion .accordion-body {
    background: var(--warm-white);
    padding: var(--space-6);
    color: var(--navy-600);
}

/* Premium Section Divider */
.premium-section-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-600), var(--sage-medium), var(--primary-600), transparent);
    margin: var(--space-12) 0;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* Premium Badge System */
.premium-badge {
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-200) 100%);
    color: var(--navy-700);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--primary-300);
    margin: var(--space-1);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.premium-badge:hover {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: var(--warm-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Premium Responsive Design */
@media (max-width: 768px) {
    .premium-hero {
        padding: var(--space-8) var(--space-6);
        text-align: center;
    }
    
    .number-counter {
        font-size: 2.5rem;
    }
    
    .premium-service-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .premium-timeline-item {
        padding-left: 3rem;
    }
    
    .premium-contact-form {
        padding: var(--space-6);
    }
}

@media (max-width: 576px) {
    .premium-hero {
        margin: var(--space-4) 0;
        padding: var(--space-6) var(--space-4);
    }
    
    .number-counter {
        font-size: 2rem;
    }
    
    .premium-values-section,
    .premium-cta-section {
        margin: var(--space-8) 0;
        padding: var(--space-8) var(--space-4);
    }
}

/* Premium Loading Animation */
.premium-loading {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.premium-loading:nth-child(1) { animation-delay: 0.1s; }
.premium-loading:nth-child(2) { animation-delay: 0.2s; }
.premium-loading:nth-child(3) { animation-delay: 0.3s; }
.premium-loading:nth-child(4) { animation-delay: 0.4s; }

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

/* ===================================
   Contact Form Hover State Fix
   =================================== */

/* Form control hover and focus states with proper text color */
.form-control:hover {
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%) !important;
    border-color: var(--primary-400) !important;
    color: var(--navy-800) !important;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.form-control:focus {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%) !important;
    border-color: var(--primary-500) !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(47, 133, 90, 0.15) !important;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.form-control:focus::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Select dropdown focus state */
.form-control:focus option {
    background: white !important;
    color: var(--navy-800) !important;
}

/* Textarea specific styling */
textarea.form-control:focus {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%) !important;
    color: white !important;
}

textarea.form-control:focus::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Input field active state */
.form-control:active {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%) !important;
    color: white !important;
}

/* ===================================
   Contact Form Fix - Keep White Backgrounds
   =================================== */

/* Override any existing form control styles for contact page */
.form-control {
    background: white !important;
    color: var(--navy-800) !important;
    border: 2px solid var(--primary-300);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.form-control:hover {
    border-color: var(--primary-400) !important;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    background: white !important;
    color: var(--navy-800) !important;
}

.form-control:focus {
    outline: none !important;
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 3px rgba(47, 133, 90, 0.15), var(--shadow-lg) !important;
    background: white !important;
    color: var(--navy-800) !important;
    transform: translateY(-2px);
}

.form-control:active {
    background: white !important;
    color: var(--navy-800) !important;
}

.form-control::placeholder {
    color: var(--navy-500) !important;
}

.form-control:focus::placeholder {
    color: var(--navy-400) !important;
}

/* Select dropdown options */
.form-control option {
    background: white !important;
    color: var(--navy-800) !important;
}

/* Textarea specific fixes */
textarea.form-control {
    background: white !important;
    color: var(--navy-800) !important;
    resize: vertical;
}

textarea.form-control:hover,
textarea.form-control:focus,
textarea.form-control:active {
    background: white !important;
    color: var(--navy-800) !important;
}

/* ===================================
   Contact Form Labels and Heading Hover Fix
   =================================== */

/* Make form container and labels responsive to hover */
.premium-contact-form {
    transition: all 0.3s ease;
}

.premium-contact-form:hover {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%) !important;
}

.premium-contact-form:hover h3 {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.premium-contact-form:hover .form-label {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Keep form inputs white with dark text even when container is hovered */
.premium-contact-form:hover .form-control {
    background: white !important;
    color: var(--navy-800) !important;
    border-color: rgba(255,255,255,0.8) !important;
}

.premium-contact-form:hover .form-control:focus {
    background: white !important;
    color: var(--navy-800) !important;
    border-color: white !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3) !important;
}

/* ===================================
   Navigation Dropdown Z-Index Fix
   =================================== */

/* Ensure navbar and dropdowns are always on top */
.navbar {
    z-index: 1050 !important;
    position: relative;
}

.navbar .dropdown-menu {
    z-index: 1060 !important;
    position: absolute;
}

/* Ensure dropdown toggle and items are clickable */
.navbar .dropdown-toggle {
    z-index: 1055 !important;
    position: relative;
}

/* Bootstrap dropdown menu z-index override */
.dropdown-menu.show {
    z-index: 1060 !important;
}

/* Make sure navbar stays above cards and other content */
.navbar-nav .nav-item .dropdown-menu {
    z-index: 1060 !important;
}


/* ===================================
   Facebook Button Styling
   =================================== */

/* Facebook Button Styling */
.btn-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.btn-facebook:hover {
    background: linear-gradient(135deg, #166fe5 0%, #1565c0 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-facebook:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-facebook {
        width: 100%;
        justify-content: center;
    }
}


/* =================================================
   BOOK CARD ACCESSIBILITY - CONTRAST FIXES
   Applied globally for consistency across all pages
   ================================================= */

/* Book titles - dark gray for excellent contrast */
.book-title,
.card .book-title,
.book-card .book-title {
    color: #212529 !important;  /* Dark gray - WCAG AA compliant */
    font-weight: 600;           /* Bolder for better readability */
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Book authors - medium gray for good contrast */
.book-author,
.card .book-author,
.book-card .book-author {
    color: #495057 !important;  /* Medium gray - good contrast ratio */
    font-size: 0.85rem;
    font-weight: 400;
}

/* Book prices - darker green for better contrast */
.price,
.book-price,
.card .price,
.price-button-stack .price {
    color: #1a5f1a !important;  /* Darker green - meets contrast standards */
    font-weight: bold !important;
    font-size: 1.1rem;
}

/* Hover states for enhanced visibility */
.book-card:hover .book-title,
.card:hover .book-title {
    color: #000000 !important;  /* Pure black on hover */
}

.book-card:hover .book-author,
.card:hover .book-author {
    color: #343a40 !important;  /* Darker gray on hover */
}

/* Button contrast improvements */
.book-card .btn-primary,
.card .btn-primary {
    border-color: var(--primary-500);
    background-color: #1a5f1a !important;  /* Darker green */
    border-color: #1a5f1a !important;
    color: #ffffff !important;
}

.book-card .btn-primary:hover,
.card .btn-primary:hover {
    border-color: var(--primary-600);
    background-color: #155315 !important;  /* Even darker on hover */
    border-color: #155315 !important;
    color: #ffffff !important;
}

/* Ensure text remains readable in all states */
.book-card .card-body,
.card .card-body {
    color: #212529;  /* Default dark text */
}

/* Featured/Special book cards */
.featured .book-title {
    color: #000000 !important;
}

.featured .book-author {
    color: #495057 !important;
}

/* ==========================================
   PROFESSIONAL FORM STYLING - Tales & Tails
   ========================================== */

:root {
    --primary-green: #2d5530;
    --light-green: #4a7c59;
    --accent-green: #6bb77b;
    --soft-green: #e8f5e8;
    --warning-amber: #ff9800;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-radius: 12px;
    --shadow-light: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-medium: 0 8px 25px rgba(45, 85, 48, 0.15);
    --shadow-strong: 0 15px 35px rgba(45, 85, 48, 0.2);
    --transition: all 0.3s ease;
}

/* Form Page Background */
body.form-page {
    background: linear-gradient(135deg, #f8fffe 0%, #e8f5e8 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* Main Container - Responsive */
.main-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    margin: 1rem auto;
    max-width: 1000px;
    width: 95%;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .main-container {
        border-radius: 15px;
        margin: 0.5rem auto;
        width: 98%;
    }
}

@media (max-width: 576px) {
    .main-container {
        border-radius: 10px;
        margin: 0.25rem auto;
        width: 100%;
    }
}

/* Header Section */
.header-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: var(--white);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20px;
    width: 100px;
    height: 200%;
    background: rgba(255,255,255,0.1);
    transform: rotate(15deg);
}

.header-section h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.header-section p {
    margin: 0.5rem 0 0 0;
    opacity: 0.85;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-section {
        padding: 1.5rem 1rem;
    }
    
    .header-section h1 {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .header-section p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .header-section {
        padding: 1rem;
    }
    
    .header-section h1 {
        font-size: 1.3rem;
    }
    
    .header-section p {
        font-size: 0.85rem;
    }
}

/* Section Cards */
.section-card {
    border: none;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.section-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.section-header {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--light-green) 100%);
    color: var(--white);
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-body {
    padding: 1.5rem;
    background: #fdfdfd;
}

/* Responsive Sections */
@media (max-width: 768px) {
    .section-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .section-body {
        padding: 1rem;
    }
    
    .section-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .section-header {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .section-body {
        padding: 0.75rem;
    }
}

/* Form Labels */
.form-label {
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.95rem;
}

/* Form Controls */
.form-control, .form-select {
    border: 2px solid #e8f0e8;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background: var(--white);
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 0.2rem rgba(107, 183, 123, 0.25);
    background: var(--white);
}

.form-control:hover, .form-select:hover {
    border-color: var(--light-green);
}

/* Responsive Form Controls */
@media (max-width: 576px) {
    .form-control, .form-select {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Image Preview */
.image-preview {
    border: 3px dashed var(--accent-green);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    background: var(--soft-green);
    margin-top: 0.5rem;
    transition: var(--transition);
}

.image-preview:hover {
    border-color: var(--light-green);
    background: #ddf2dd;
}

.image-preview img {
    max-width: 120px;
    max-height: 160px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.image-preview img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Responsive Image Preview */
@media (max-width: 768px) {
    .image-preview {
        padding: 0.75rem;
    }
    
    .image-preview img {
        max-width: 100px;
        max-height: 130px;
    }
}

@media (max-width: 576px) {
    .image-preview {
        padding: 0.5rem;
    }
    
    .image-preview img {
        max-width: 80px;
        max-height: 100px;
    }
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-success { 
    color: #28a745; 
}

.status-warning { 
    color: var(--warning-amber); 
}

/* Form Checks */
.form-check {
    background: var(--soft-green);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 2px solid transparent;
    transition: var(--transition);
}

.form-check:hover {
    border-color: var(--accent-green);
    background: #ddf2dd;
}

.form-check-input:checked {
    border-color: var(--primary-500);
    background-color: var(--accent-green);
    border-color: var(--accent-green);
}

.form-check-label {
    font-weight: 500;
    color: var(--primary-green);
    cursor: pointer;
}

/* Responsive Form Checks */
@media (max-width: 576px) {
    .form-check {
        padding: 0.75rem;
    }
}

/* Buttons */
.btn-success {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--light-green) 100%);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(107, 183, 123, 0.3);
    transition: var(--transition);
    color: var(--white);
}

.btn-success:hover {
    border-color: var(--primary-500);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 183, 123, 0.4);
    background: linear-gradient(135deg, var(--light-green) 0%, var(--primary-green) 100%);
    color: var(--white);
}

.btn-secondary {
    background: #6c757d;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--white);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    color: var(--white);
}

/* Responsive Buttons */
@media (max-width: 768px) {
    .btn-success, .btn-secondary {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .btn-success, .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .action-buttons .d-flex {
        flex-direction: column-reverse;
    }
    
    .action-buttons .d-flex .btn:first-child {
        margin-bottom: 0;
    }
}

/* Alert Success */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: none;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-green);
    color: var(--primary-green);
    font-weight: 500;
    animation: slideInDown 0.5s ease;
}

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

/* Form Text */
.form-text {
    color: var(--light-green);
    font-style: italic;
    font-size: 0.8rem;
}

/* Action Buttons */
.action-buttons {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-top: 3px solid var(--soft-green);
}

/* Responsive Action Buttons */
@media (max-width: 768px) {
    .action-buttons {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .action-buttons {
        padding: 1rem 0.75rem;
    }
}

/* Form Section */
.form-section {
    padding: 0 2rem 0 2rem;
}

@media (max-width: 768px) {
    .form-section {
        padding: 0 1rem;
    }
}

@media (max-width: 576px) {
    .form-section {
        padding: 0 0.5rem;
    }
}

/* Grid Responsive Adjustments */
@media (max-width: 768px) {
    .row > [class*="col-md-"] {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .row > [class*="col-"] {
        margin-bottom: 0.75rem;
    }
}

/* Textarea Specific */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

@media (max-width: 576px) {
    textarea.form-control {
        min-height: 100px;
    }
}

/* Select Multiple Styling */
select[multiple] {
    min-height: 120px;
}

@media (max-width: 576px) {
    select[multiple] {
        min-height: 100px;
        font-size: 0.85rem;
    }
}

/* Loading Animation for Image Previews */
.image-preview.loading {
    position: relative;
}

.image-preview.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-green);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Focus Management */
*:focus {
    outline: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
    .form-control, .form-select {
        border-width: 3px;
    }
    
    .section-card {
        border: 2px solid var(--primary-green);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .btn, .action-buttons {
        display: none;
    }
    
    .main-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .header-section {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
}


/* Header Text Contrast Fix */
.header-section h1,
.header-section h1 span,
.header-section p {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.header-section h1 i {
    color: #ffffff !important;
}

/* Ensure header background has enough contrast */
.header-section {
    background: linear-gradient(135deg, #1a3d1f 0%, #2d5530 50%, #4a7c59 100%) !important;
}


/* ==========================================
   MOBILE SPACING FIXES
   ========================================== */

/* Fix Add New Book button spacing on mobile */
@media (max-width: 768px) {
    /* Add spacing between title and button */
    .d-flex.justify-content-between.align-items-center {
        gap: 1rem;
        flex-direction: column;
        align-items: stretch !important;
    }
    
    /* Make button full width on mobile for better touch target */
    .d-flex.justify-content-between.align-items-center .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Alternative: Keep them side by side but add margin */
    .page-header .d-flex {
        gap: 1rem;
    }
    
    .page-header h1 {
        margin-bottom: 1rem;
    }
}

/* For very small screens */
@media (max-width: 576px) {
    .d-flex.justify-content-between.align-items-center {
        gap: 1.5rem;
    }
    
    .d-flex.justify-content-between.align-items-center .btn {
        margin-top: 1.5rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* If you have a specific header class, target it directly */
.book-management-header .d-flex {
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .book-management-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .book-management-header .btn {
        align-self: stretch;
    }
}

/* ========================================
   PAGINATION STYLING - Tales & Tails
   ======================================== */

/* Custom Pagination Styling */
.pagination-custom {
    --bs-pagination-padding-x: 0.875rem;
    --bs-pagination-padding-y: 0.5rem;
    --bs-pagination-font-size: 1rem;
    --bs-pagination-color: #2B7A2B;
    --bs-pagination-bg: #ffffff;
    --bs-pagination-border-width: 2px;
    --bs-pagination-border-color: #2B7A2B;
    --bs-pagination-border-radius: 8px;
    --bs-pagination-hover-color: #ffffff;
    --bs-pagination-hover-bg: #2B7A2B;
    --bs-pagination-hover-border-color: #2B7A2B;
    --bs-pagination-focus-color: #ffffff;
    --bs-pagination-focus-bg: #1e5a1e;
    --bs-pagination-focus-border-color: #1e5a1e;
    --bs-pagination-active-color: #ffffff;
    --bs-pagination-active-bg: #2B7A2B;
    --bs-pagination-active-border-color: #2B7A2B;
    --bs-pagination-disabled-color: #6c757d;
    --bs-pagination-disabled-bg: #f8f9fa;
    --bs-pagination-disabled-border-color: #dee2e6;
}

.pagination-custom .page-link {
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(43, 122, 43, 0.1);
    border-radius: 8px;
    margin: 0 2px;
}

.pagination-custom .page-item.active .page-link {
    background: linear-gradient(135deg, #2B7A2B 0%, #1e5a1e 100%);
    border-color: #2B7A2B;
    font-weight: 700;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(43, 122, 43, 0.3);
}

.pagination-custom .page-link:hover:not(.active) {
    border-color: var(--primary-400);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 122, 43, 0.25);
    background-color: #2B7A2B;
    border-color: #2B7A2B;
    color: #ffffff;
}

.pagination-custom .page-item:first-child .page-link {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.pagination-custom .page-item:last-child .page-link {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Book counter styling */
.book-counter {
    color: #2B7A2B;
    font-weight: 500;
    font-size: 0.95rem;
    background: rgba(43, 122, 43, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(43, 122, 43, 0.2);
}

.book-counter .fas {
    color: #2B7A2B;
    margin-right: 6px;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-custom {
        --bs-pagination-padding-x: 0.5rem;
        --bs-pagination-padding-y: 0.375rem;
        --bs-pagination-font-size: 0.875rem;
    }
    
    .pagination-custom .page-link {
        margin: 0 1px;
    }
    
    /* Hide text on mobile, keep icons */
    .pagination-custom .page-link .d-none.d-sm-inline {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .pagination-custom .page-item:not(.active) .page-link {
        padding: 0.375rem 0.5rem;
    }
    
    /* Show only essential pagination on mobile */
    .pagination-custom .page-item:first-child,
    .pagination-custom .page-item:last-child {
        display: none;
    }
}

/* Pagination container styling */
.pagination-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin-top: 3rem;
    box-shadow: 0 8px 32px rgba(43, 122, 43, 0.1);
    border: 1px solid rgba(43, 122, 43, 0.1);
}

/* Pagination loading state */
.pagination-loading .page-link {
    opacity: 0.6;
    pointer-events: none;
}


/* ===================================
   BREADCRUMB STYLING - Tales & Tails  
   =================================== */

.breadcrumb-nav {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9f4 100%);
    border: 1px solid #bce5cd;
    border-radius: 12px;
    padding: 1rem 0;
    margin: 1rem 0 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.breadcrumb-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2f855a, #68d391, #2f855a);
}

.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 1rem;
    font-weight: 500;
}

.breadcrumb-item {
    color: #2d3748;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #2f855a;
    font-weight: 700;
    font-size: 1.3rem;
    padding: 0 0.75rem;
}

.breadcrumb-item.active {
    color: #1b4332;
    font-weight: 600;
    background: rgba(47, 133, 90, 0.15);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #8dd1a8;
}

.breadcrumb-link {
    color: #4a5568;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.breadcrumb-link:hover {
    color: #1b4332;
    background: #dcf2e4;
    text-decoration: none;
    border-color: #8dd1a8;
}


/* ===================================
   Search Bar & Auto-suggest Styling
   =================================== */

.search-form {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.15);
    color: var(--warm-white);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.search-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    color: var(--warm-white);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--warm-white);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    z-index: 1050;
    transition: all 0.3s ease;
}

.search-results.show {
    max-height: 400px;
    opacity: 1;
    margin-top: 0.25rem;
    overflow-y: auto;
}

.search-result-item {
    border-bottom: 1px solid var(--primary-100);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-link {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--navy-700);
    transition: all 0.2s ease;
}

.search-result-link:hover {
    background: var(--primary-50);
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--primary-700);
}

.search-result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--navy-600);
}

.search-result-price {
    font-weight: 600;
    color: var(--primary-600);
}

.search-no-results {
    padding: 1rem;
    text-align: center;
    color: var(--navy-600);
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-form {
        max-width: none;
        margin: 0.5rem 0;
    }
    
    .search-input {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* ===================================
   ENHANCED BREADCRUMB STYLING - Tales & Tails
   =================================== */

.breadcrumb-nav {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--navy-50) 100%);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-xl);
    padding: 0.75rem 1.25rem;
    margin: 1rem 0 2rem 0;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.breadcrumb-nav:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-300);
}

.breadcrumb-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-600), var(--sage-medium), var(--primary-600));
    opacity: 0.8;
}

.breadcrumb-nav::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-200), transparent);
    border-radius: 50%;
    opacity: 0.2;
    z-index: 0;
}

.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.breadcrumb-item {
    color: var(--navy-600);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--primary-600);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0 0.5rem;
    vertical-align: middle;
}

.breadcrumb-item.active {
    color: var(--primary-700);
    font-weight: 600;
    background: rgba(47, 133, 90, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary-300);
}

.breadcrumb-item a {
    color: var(--navy-700);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    display: inline-block;
}

.breadcrumb-item a:hover {
    color: var(--primary-700);
    background: var(--primary-100);
    text-decoration: none;
    border-color: var(--primary-300);
    transform: translateY(-1px);
}

/* First item (home) styling */
.breadcrumb-item:first-child a {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}

.breadcrumb-item:first-child a::before {
    content: "🏠";
    margin-right: 0.35rem;
    font-size: 1rem;
}

/* Animated hover effect for the breadcrumb nav */
.breadcrumb-nav:hover::before {
    animation: slide 1.5s linear infinite;
}

@keyframes slide {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 0%;
    }
}

/* Responsive breadcrumbs for mobile */
@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 0.6rem 1rem;
        margin: 0.75rem 0 1.5rem 0;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        font-size: 1.1rem;
        padding: 0 0.3rem;
    }
    
    .breadcrumb-item a, 
    .breadcrumb-item.active {
        padding: 0.3rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .breadcrumb-nav {
        padding: 0.5rem 0.75rem;
        margin: 0.5rem 0 1rem 0;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    /* For very small screens, simplify the breadcrumbs */
    .breadcrumb-item:not(:last-child):not(:first-child) {
        display: none;
    }
    
    /* Show ellipsis for truncated breadcrumbs */
    .breadcrumb-item:first-child + .breadcrumb-item::before {
        content: "...";
        font-size: 1rem;
        padding: 0 0.4rem;
    }
}

/* ===================================
   CART BUTTON CONTRAST FIX
   =================================== */

/* Update button - change from outline to solid */
.cart-item .btn-outline-primary {
    background-color: #0d6efd !important; /* Bootstrap primary blue */
    color: white !important;
    border-color: #0d6efd !important;
}

.cart-item .btn-outline-primary:hover,
.cart-item .btn-outline-primary:focus {
    background-color: #0b5ed7 !important; /* Darker blue */
    border-color: #0a58ca !important;
    color: white !important;
}

/* Remove button - change from outline to solid */
.cart-item .btn-outline-danger,
.cart-item .remove-btn {
    background-color: #dc3545 !important; /* Bootstrap danger red */
    color: white !important;
    border-color: #dc3545 !important;
}

.cart-item .btn-outline-danger:hover,
.cart-item .btn-outline-danger:focus,
.cart-item .remove-btn:hover,
.cart-item .remove-btn:focus {
    background-color: #bb2d3b !important; /* Darker red */
    border-color: #b02a37 !important;
    color: white !important;
}

/* Clear Cart button - change from outline to solid */
.btn-outline-danger {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background-color: #bb2d3b !important;
    border-color: #b02a37 !important;
    color: white !important;
}

/* Plus/minus quantity buttons */
.cart-item .minus-btn,
.cart-item .plus-btn {
    background-color: #6c757d !important; /* Bootstrap secondary gray */
    color: white !important;
    border-color: #6c757d !important;
}

.cart-item .minus-btn:hover,
.cart-item .minus-btn:focus,
.cart-item .plus-btn:hover,
.cart-item .plus-btn:focus {
    background-color: #5c636a !important; /* Darker gray */
    border-color: #565e64 !important;
    color: white !important;
}

/* ===================================
   CART TEXT CONTRAST FIX
   =================================== */

/* Book title contrast fix */
.cart-item .book-title,
.cart-item .book-title a {
    color: #000000 !important; /* Pure black for maximum contrast */
    font-weight: 600 !important; /* Make it bold for better visibility */
}

.cart-item .book-title a:hover,
.cart-item .book-title a:focus {
    color: #0d6efd !important; /* Bootstrap primary blue */
    text-decoration: underline !important;
}

/* Shipping "FREE" text contrast fix */
.card-body .text-success {
    color: #198754 !important; /* Darker green for better contrast */
    font-weight: 700 !important; /* Bold for emphasis */
}

/* Price contrast improvement */
.price {
    color: #0f5132 !important; /* Very dark green for price */
    font-weight: 700 !important;
}

/* General text improvements for cart */
.cart-item .text-muted {
    color: #495057 !important; /* Darker gray instead of default muted */
}

/* Ensure quantity text is readable */
.cart-item .quantity-input {
    color: #212529 !important; /* Dark text color */
    font-weight: 500 !important;
}

/* Ensure all cart headings have good contrast */
.card-header h5 {
    color: #000000 !important;
    font-weight: 600 !important;
}

/* Strong text enhancement */
.card-body strong {
    color: #000000 !important;
}

/* Trust indicators better contrast */
.text-muted {
    color: #495057 !important; /* Darker than default text-muted */
}

/* ===================================
   ADDITIONAL CART CONTRAST FIXES
   =================================== */

/* Shipping "FREE" text specific fix */
.card-body .justify-content-between .text-success,
span.text-success,
.order-summary .text-success {
    color: #0f5132 !important; /* Very dark green */
    font-weight: 700 !important;
    background-color: #d1e7dd !important; /* Light green background */
    padding: 2px 6px !important;
    border-radius: 4px !important;
}

.notification-banner-container {
    margin-bottom: 1rem;
}

.notification-banner {
    padding: 1rem;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    animation: fadeInDown 0.6s ease-in-out;
}

.banner-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.banner-error,
.banner-danger {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.banner-warning {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.banner-info {
    background-color: #cff4fc;
    color: #055160;
    border: 1px solid #b6effb;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}