@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #FCBF4A;
    --primary-hover: #e5ac42;
    --primary-light: #FFD700;
    --secondary-color: #23282d;
    --accent-blue: #1467BC;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --bg-color: #f8f9fa;
    --bg-light: #fafbfc;
    --white: #ffffff;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --border: #e9ecef;
    --gradient-primary: linear-gradient(135deg, #FCBF4A 0%, #FFD700 100%);
    --gradient-dark: linear-gradient(135deg, #23282d 0%, #2c3e50 100%);
    --gradient-hero: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Styles - Critical Priority */
.ebook-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.ebook-modal:not(.active) {
    display: none !important;
}

.ebook-modal.active {
    display: flex !important;
}

.ebook-modal-content {
    background-color: #fff;
    margin: auto;
    padding: 40px;
    border: none;
    width: 90%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: left;
    overflow: visible;
}

.modal-ebook-cover {
    display: none;
    /* JS toggles this */
    position: absolute;
    top: -40px;
    right: -40px;
    /* Floating on top right */
    width: 90px;
    /* Sweet spot */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border: 3px solid #fff;
    /* White border for 'frame' look */
    transform: rotate(5deg);
    z-index: 10;
}

/* On mobile, maybe hide or position differently */
@media (max-width: 600px) {
    .modal-ebook-cover {
        position: static;
        width: 60px;
        /* Smaller */
        margin: 0 auto 15px;
        /* Centered above title */
        display: block !important;
        transform: rotate(0);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
}

.ebook-modal-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: #23282d;
    font-weight: 700;
}

.ebook-modal-content p {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Elegant Form Styling */
.ebook-form-group {
    margin-bottom: 20px;
}

.ebook-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
}

.ebook-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Fix sizing issues */
    background: #f9f9f9;
}

.ebook-form-group input:focus {
    border-color: #FCBF4A;
    box-shadow: 0 0 0 3px rgba(252, 191, 74, 0.2);
    background: #fff;
    outline: none;
}

.ebook-btn-block {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: var(--secondary-color);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(252, 191, 74, 0.25);
    position: relative;
    overflow: hidden;
}

.ebook-btn-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.ebook-btn-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(252, 191, 74, 0.4);
}

.ebook-btn-block:hover::before {
    left: 100%;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- Admin Layout --- */

.admin-header {
    background: var(--white);
    padding: 18px 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(252, 191, 74, 0.1);
    transition: var(--transition);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    height: 40px;
}

.brand-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.ebook-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- Components --- */

/* Buttons */
.ebook-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 50px;
    /* Pill shape */
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(252, 191, 74, 0.2);
}

.ebook-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(252, 191, 74, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #e8ecf1 0%, #dbe2e8 100%);
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #dbe2e8 0%, #cdd6e0 100%);
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
}

.btn-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(252, 191, 74, 0.2);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 0;
}

.btn-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(252, 191, 74, 0.35);
}

.btn-header:hover::before {
    width: 300px;
    height: 300px;
}

.btn-header span {
    position: relative;
    z-index: 1;
}

.btn-header i {
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.btn-header.secondary {
    background: linear-gradient(135deg, #e8ecf1 0%, #dbe2e8 100%);
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-header.secondary:hover {
    background: linear-gradient(135deg, #dbe2e8 0%, #cdd6e0 100%);
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-header.danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.btn-header.danger:hover {
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.35);
}

/* Icon Buttons (Sophisticated) */
.btn-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    background: transparent;
    font-size: 1.2rem;
    text-decoration: none;
    margin: 0 6px;
    position: relative;
    overflow: hidden;
}

.btn-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.btn-icon > * {
    position: relative;
    z-index: 1;
}

.btn-icon:hover {
    transform: translateY(-3px);
}

.btn-icon:active {
    transform: translateY(-1px);
}

.btn-icon.edit {
    color: white;
}

.btn-icon.edit::before {
    background: linear-gradient(135deg, #1667bc 0%, #0d4fa5 100%);
    box-shadow: 0 4px 16px rgba(22, 103, 188, 0.2);
}

.btn-icon.edit:hover::before {
    box-shadow: 0 8px 24px rgba(22, 103, 188, 0.35);
}

.btn-icon.edit:hover {
    color: #ffffff;
}

.btn-icon.delete {
    color: white;
}

.btn-icon.delete::before {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.2);
}

.btn-icon.delete:hover::before {
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.35);
}

.btn-icon.delete:hover {
    color: #ffffff;
}

.btn-icon.restore {
    color: #23282d;
}

.btn-icon.restore::before {
    background: linear-gradient(135deg, #FCBF4A 0%, #FFD700 100%);
    box-shadow: 0 4px 16px rgba(252, 191, 74, 0.25);
}

.btn-icon.restore:hover::before {
    box-shadow: 0 8px 24px rgba(252, 191, 74, 0.4);
}

.btn-icon.restore:hover {
    color: #23282d;
}

/* Cards */
.admin-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
}

.admin-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(252, 191, 74, 0.2);
}

.card-header {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    border-bottom: 2px solid transparent;
    border-image: var(--gradient-primary) 1;
    display: inline-block;
    padding-bottom: 10px;
}

/* Forms */
.form-grid {
    display: grid;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e0e7ff;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    box-sizing: border-box;
    background-color: rgba(248, 249, 250, 0.8);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(252, 191, 74, 0.15);
    background-color: #fff;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.admin-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f8 100%);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 16px 15px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    transition: var(--transition);
}

.admin-table td {
    padding: 16px 15px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--text-color);
    transition: var(--transition);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: rgba(252, 191, 74, 0.05);
}

.admin-table input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.table-img {
    width: 50px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Badges */
.badge {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    transition: var(--transition);
}

.badge-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid rgba(21, 87, 36, 0.2);
}

.badge-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(21, 87, 36, 0.15);
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid rgba(133, 100, 4, 0.2);
}

.badge-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(133, 100, 4, 0.15);
}

.badge-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    color: #721c24;
    border: 1px solid rgba(114, 28, 36, 0.2);
}

.badge-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(114, 28, 36, 0.15);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
    border-left: 4px solid;
    animation: slideDown 0.4s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, #d1e7dd 0%, #c3e6cb 100%);
    color: #0f5132;
    border-left-color: #198754;
}

.alert-danger,
.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #842029;
    border-left-color: #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #664d03;
    border-left-color: #ffc107;
}

.admin-table-compact th,
.admin-table-compact td {
    padding: 10px 12px;
    font-size: 0.9rem;
}

.invalid-summary {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
}

.invalid-actions {
    margin-bottom: 15px;
}

.filter-controls {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #555;
}

.filter-controls input {
    margin-right: 6px;
}

.whatsapp-note {
    display: inline-block;
    margin-top: 8px;
    color: #666;
    font-size: 0.85rem;
}

.waha-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.waha-status .waha-status-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Utility */
.d-flex {
    display: flex;
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-10 {
    gap: 10px;
}

.text-danger {
    color: #dc3545;
}

.text-primary {
    color: #0d6efd;
}

.mr-10 {
    margin-right: 10px;
}

/* Existing Landing Page Styles (Preserved) */
/* Grid Layout */
.ebook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ebook-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    position: relative;
    border: 1px solid rgba(252, 191, 74, 0.1);
}

.ebook-card:nth-child(1) { animation-delay: 0.1s; }
.ebook-card:nth-child(2) { animation-delay: 0.2s; }
.ebook-card:nth-child(3) { animation-delay: 0.3s; }
.ebook-card:nth-child(4) { animation-delay: 0.4s; }
.ebook-card:nth-child(5) { animation-delay: 0.5s; }
.ebook-card:nth-child(6) { animation-delay: 0.6s; }

.ebook-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ebook-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(252, 191, 74, 0.3);
}

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

/* Image Container to guarantee size */
.ebook-cover-container {
    width: 100%;
    height: 300px;
    /* Fixed height for image area */
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
}

.ebook-cover {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
}

.ebook-details {
    padding: 20px;
    flex-grow: 1;
    /* Takes up remaining space */
    display: flex;
    flex-direction: column;
}

.ebook-title {
    margin: 0 0 10px;
    font-size: 1.2em;
    color: var(--secondary-color);
    font-weight: 600;
}

.ebook-desc {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}


/* --- Landing Page Sections (Premium Layout) --- */

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #fdfbfb 0%, #f0f4f8 50%, #ebedee 100%);
    padding: 100px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    margin-bottom: 80px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(252, 191, 74, 0.2) 0%, rgba(252, 191, 74, 0.05) 100%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: 1;
    animation: blobMorph 8s infinite alternate;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(20, 103, 188, 0.08) 0%, rgba(20, 103, 188, 0) 100%);
    border-radius: 50%;
    z-index: 0;
}

@keyframes blobMorph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 50% 30% 50% 70%;
    }
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1467BC 0%, #0d47a1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    line-height: 1.2;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 90%;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

.hero-image img {
    max-width: 120%;
    width: auto;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.12));
    transform: rotate(-2deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-image img:hover {
    transform: rotate(0deg) scale(1.05);
}

.hero-btn {
    display: inline-block;
    padding: 16px 45px;
    background: var(--gradient-primary);
    color: var(--secondary-color);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(252, 191, 74, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.hero-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hero-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(252, 191, 74, 0.4);
}

.hero-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Section Common */
.section-title {
    text-align: center;
    font-size: 2.8rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 800;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.section-wrapper p {
    color: #777;
    font-size: 1.1rem;
}

/* Author Section - Redesigned */
.author-section {
    background-color: var(--white);
    padding: 100px 20px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Decoration for author section */
.author-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 300px;
    height: 300px;
    background-color: rgba(252, 191, 74, 0.05);
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.author-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
    position: relative;
    z-index: 2;
}

.author-image {
    position: relative;
}

.author-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 8px 8px 0px var(--primary-color), 0 16px 40px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    position: relative;
}

.author-image img:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px var(--primary-color), 0 20px 50px rgba(0, 0, 0, 0.2);
}

.author-content h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
    font-weight: 700;
}

.author-content p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #555;
    margin-bottom: 25px;
}

/* Body Padding for Fixed Header */
body {
    padding-top: 10px;
}

body.ebook-page {
    padding-top: 85px;
    /* Compense for fixed header height */
}

/* Site Header (Index) */
.site-header {
    background: #fff;
    box-shadow: none;
    padding: 5px 0 !important;
    /* Hyper Compact Initial */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
}

.site-header.scrolled {
    padding: 0 !important;
    /* Minimal padding */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 15px !important;
    /* Force constraint on initial height */
    transition: height 0.4s ease;
}

.site-header.scrolled .header-content {
    height: 15px !important;
    /* Compact height constraint */
}

/* 3-column layout concept for perfect centering */
.header-left {
    flex: 1;
}

.logo-link {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}

.logo-link img {
    height: 60px !important;
    /* Small Initial Logo */
    width: auto;
    display: block;
    transition: all 0.4s ease;
}

.site-header.scrolled .logo-link img {
    height: 50px !important;
    /* Very small logo on scroll */
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* Premium Navigation Button (Yellow Style) */
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--gradient-primary);
    border: none;
    color: var(--secondary-color);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: var(--transition);
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(252, 191, 74, 0.25);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(252, 191, 74, 0.35);
}

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

.nav-btn i {
    font-size: 0.9em;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-btn:hover i {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .site-header {
        padding: 10px 0;
    }

    .site-header.scrolled {
        padding: 5px 0;
    }

    .logo-link img {
        height: 60px;
    }

    .site-header.scrolled .logo-link img {
        height: 40px;
    }


    /* Modal Styles */
    .ebook-modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(5px);
        align-items: center;
        justify-content: center;
    }

    .ebook-modal-content {
        background-color: #fff;
        margin: auto;
        padding: 30px;
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        width: 90%;
        max-width: 500px;
        position: relative;
        animation: slideIn 0.3s ease;
    }


    animation: slideIn 0.3s ease-out;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
}

/* File Input Styling */
input[type="file"] {
    display: none;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 2px dashed rgba(252, 191, 74, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    color: var(--secondary-color);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.file-input-label::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(252, 191, 74, 0.05) 0%, rgba(20, 103, 188, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.file-input-label:hover {
    border-color: rgba(252, 191, 74, 0.6);
    box-shadow: 0 8px 24px rgba(252, 191, 74, 0.15);
    background: linear-gradient(135deg, #fffbf5 0%, #f5f8fc 100%);
}

.file-input-label:hover::before {
    opacity: 1;
}

.file-input-label span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-input-label i {
    font-size: 1.4rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.file-input-label:hover i {
    transform: scale(1.15) rotate(5deg);
    color: var(--accent-blue);
}

.file-input-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-input-text strong {
    color: var(--secondary-color);
    font-size: 0.95rem;
    display: block;
}

.file-input-text small {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    display: block;
}

input[type="file"]::-webkit-file-upload-button {
    display: none;
}

.file-input-wrapper.drag-over .file-input-label {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(252, 191, 74, 0.1) 0%, rgba(252, 191, 74, 0.05) 100%);
    box-shadow: 0 12px 32px rgba(252, 191, 74, 0.2), inset 0 0 0 2px rgba(252, 191, 74, 0.15);
}

.file-input-wrapper.drag-over .file-input-label i {
    animation: bounce 0.6s ease infinite;
    color: var(--primary-color);
}

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

.file-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 8px;
}

.file-selected i {
    font-size: 1.2rem;
}


@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
        text-align: center;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        margin: 0 auto 30px;
    }

    .author-section {
        padding: 60px 20px;
    }

    .author-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .author-image {
        max-width: 400px;
        margin: 0 auto;
        order: 1;
    }

    .author-content {
        text-align: center;
        order: 2;
    }
}

/* Footer Styles (Restored) */
.site-footer {
    background: var(--gradient-dark) !important;
    color: #fff !important;
    padding: 60px 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto;
    border-top: 1px solid rgba(252, 191, 74, 0.2);
}

.site-footer p {
    color: rgba(255, 255, 255, 0.75) !important;
    margin: 0;
    font-weight: 500;
}

.footer-links {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    opacity: 0.85;
    padding: 8px 16px;
    border-radius: 50px;
}

.footer-links a:hover {
    color: #FCBF4A !important;
    opacity: 1;
    transform: translateY(-3px);
    background: rgba(252, 191, 74, 0.15);
}

.footer-links i {
    font-size: 1.2rem;
}

/* Force perfect alignment for buttons */
.ebook-btn {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    line-height: 1.2 !important;
    /* Allow multi-line text to look compact */
}

.btn-group-action {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 20px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(0.2);
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.action-btn i {
    font-size: 1.1rem;
}

.action-btn-primary {
    background: linear-gradient(135deg, #fcbf4a 0%, #f4a023 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(252, 191, 74, 0.25);
}

.action-btn-primary:hover {
    background: linear-gradient(135deg, #f4a023 0%, #e68a1f 100%);
    box-shadow: 0 6px 16px rgba(252, 191, 74, 0.35);
}

.action-btn-test {
    background: linear-gradient(135deg, #1667bc 0%, #0d4fa5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(22, 103, 188, 0.25);
}

.action-btn-test:hover {
    background: linear-gradient(135deg, #0d4fa5 0%, #094587 100%);
    box-shadow: 0 6px 16px rgba(22, 103, 188, 0.35);
}

.action-btn-export {
    background: linear-gradient(135deg, #4a7c4e 0%, #2d5133 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 124, 78, 0.25);
}

.action-btn-export:hover {
    background: linear-gradient(135deg, #2d5133 0%, #1f3622 100%);
    box-shadow: 0 6px 16px rgba(74, 124, 78, 0.35);
}

.action-btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.action-btn-whatsapp:hover {
    background: linear-gradient(135deg, #20ba5a 0%, #1aa84e 100%);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.badge-percent {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-percent:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}
