/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #4ac73c;
    --text-color: #333;
    --light-text: #666;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --spacing: 1rem;

    --bg-dark: #0f0f0f;
    --bg-light: #f7f7f7;
    --text-dark: #222;
    --text-light: #eaeaea;
    --muted: #777;
    --accent: #e5c158;
    --accent-2: #4ac73c;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0,0,0,.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================
   NAVIGATION
===================== */
.navbar {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* =====================
   HERO
===================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: grid;
    place-items: center;
    background: url('images/book5.jpeg') center / cover no-repeat;
    color: var(--white);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.75));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
    padding: 2rem 1rem;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: var(--accent);
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.hero .flashy-text {
  font-size: 16px;
  font-weight: bold;
  color: #FF6347;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: flashText 1.5s infinite alternate;
}

@keyframes flashText {
  0% { color: #FF6347; }
  50% { color: #FFD700; }
  100% { color: #32CD32; }
}


.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #f0f0f0;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================
   BUTTONS
===================== */
.btn {
    padding: .85rem 2.2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #1b1b1b;
    box-shadow: 0 8px 20px rgba(229,193,88,.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #1b1b1b;
}

.btn-secondary {
    background: var(--accent);
    color: #1b1b1b;
    box-shadow: 0 8px 20px rgba(229,193,88,.35);
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

/* =====================
   PAYMENT MODAL (SINGLE)
===================== */
.payment-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 3000;
}

.payment-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.payment-modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    width: min(420px, 90%);
    text-align: center;
    position: relative;
}

.payment-modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.payment-modal-content p {
    color: var(--light-text);
    margin-bottom: 2rem;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-options .btn {
    width: 100%;
}

/* Fix outline button visibility inside payment modal */
.payment-modal .btn-outline {
    color: var(--primary-color);
    border-color: var(--accent);
}

.payment-modal .btn-outline:hover {
    background: var(--accent);
    color: #1b1b1b;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #F32013;
}

/* =====================
   MESSAGES
===================== */
.messages {
    padding: 60px 0;
    background: var(--light-bg);
    text-align: center;
}

.messages h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.messages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.message-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 4px solid var(--secondary-color);
}

/* =====================
   PREVIEW + LIGHTBOX
===================== */
.preview-section {
    padding: 60px 0;
    background: var(--light-bg);
}

.container h1{
    text-align: center;
}

.preview-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.preview-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.preview-thumb {
    width: 100%;
    display: block;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox.hidden {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.8);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 6px;
}

/* =====================
   FORMATS
===================== */
.formats-section {
    padding: 60px 0;
}

.formats-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.format-card {
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.format-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.format-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ===== FORMAT IMAGE CORRECTION (RESPONSIVE + SMALLER) ===== */

.format-image {
    width: 100%;
    max-height: 400px;                 /* controls overall image size */
    aspect-ratio: 3 / 4;

    background: linear-gradient(135deg, var(--secondary-color) 0%, #b8960f 100%);
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;                  /* prevents image overflow */
}

.format-image .format-img,
.format-img {
    width: 100%;
    height: 100%;
    object-fit:cover;                 /* keeps image proportional */
    display: block;
    border-radius: 10px;
}

/* Mobile adjustment */
@media (max-width: 480px) {
    .format-image {
        max-height: 220px;
    }
}


.format-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.format-card .btn {
    width: 100%;
}

/* =====================
   AUTHOR
===================== */
.author-section {
    padding: 60px 0;
    text-align: center;
}

.author-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.author-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.author-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #b8960f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.author-text h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.author-text h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.author-text p {
    margin-bottom: 1.5rem;
    color: var(--light-text);
    line-height: 1.8;
}

.author-closing {
    font-style: italic;
    font-size: 20px;
    color: var(--primary-color);
    margin-top: 0.1rem;
}

/* =====================
   AUTHOR SLIDES (NEW)
===================== */
.author-slides {
    position: relative;
    min-height: 260px;
}

.author-slide {
    display: none;
    animation: fadeSlide 0.5s ease;
}

.author-slide.active {
    display: block;
}

.author-slide p {
    margin-bottom: 1.2rem;
    color: var(--light-text);
    line-height: 1.85;
    font-size: 1rem;
}

/* Slide animation */
@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   AUTHOR CONTROLS
===================== */
.author-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.author-controls button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    background: var(--accent);
    color: #1b1b1b;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.author-controls button:hover {
    transform: scale(1.1);
}

/* =====================
   CTA
===================== */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-color), #b8960f);
    padding: 80px 0;
    text-align: center;
}

/* =====================
   FOOTER
===================== */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
    text-align: center;
}



/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .nav-links {
        position: fixed;
        inset: 0;
        flex-direction: column;
        background: rgba(10,10,10,.98);
        opacity: 0;
        pointer-events: none;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
    }

    .author-content {
        grid-template-columns: 1fr;
    }
}
