/* 
 * styles.css
 * Stylesheet for Gomathy novel landing page
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300;1,400&family=Noto+Serif+Tamil:wght@400;700&display=swap');

:root {
    --color-primary: #1b4332;
    --color-primary-rgb: 27, 67, 50;
    --color-primary-light: #2d6a4f;
    --color-primary-dark: #081c15;
    --color-secondary: #c99f36;
    --color-secondary-light: #e0b94c;
    --color-accent: #c05c3e;
    --color-bg-light: #faf9f5;
    --color-bg-white: #ffffff;
    --color-bg-dark: #121c15;
    --color-text-dark: #111d13;
    --color-text-light: #f4f6f4;
    --color-text-muted: #5e6b5f;
    --color-shadow: rgba(0, 0, 0, 0.08);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Merriweather', serif;
    --font-tamil: 'Noto Serif Tamil', 'Merriweather', serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius: 12px;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    font-weight: 700;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--color-accent);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   State & Mode Management (Pre/Post Swapping)
   ========================================================================== */

/* By default, hide mode-specific items, Javascript will apply .mode-pre or .mode-post to body */
body.mode-pre .only-post {
    display: none !important;
}

body.mode-post .only-pre {
    display: none !important;
}

/* Smooth fade-in wrapper for toggled sections */
.fade-in-section {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ==========================================================================
   Admin Mode Switcher Floating Bar
   ========================================================================== */
.admin-switcher-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(27, 67, 50, 0.95);
    backdrop-filter: blur(10px);
    padding: 6px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.admin-switcher-bar:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.switcher-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.switcher-btn.active {
    background: var(--color-secondary);
    color: var(--color-primary-dark);
    box-shadow: 0 4px 10px rgba(201, 159, 54, 0.3);
}

.switcher-label {
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-heading);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    margin-left: 14px;
    margin-right: 6px;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
header {
    background: rgba(250, 249, 245, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(27, 67, 50, 0.05);
    position: sticky;
    top: 0;
    z-index: 99;
    padding: 16px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bg-light);
    font-family: var(--font-tamil);
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(27, 67, 50, 0.15);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 15px;
    color: var(--color-text-dark);
}

nav ul li a:hover {
    color: var(--color-primary);
}

.btn-header {
    background: var(--color-primary);
    color: var(--color-bg-light) !important;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(27, 67, 50, 0.1);
}

.btn-header:hover {
    background: var(--color-accent);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(192, 92, 62, 0.2);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 80px 0;
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    position: relative;
    background-image: radial-gradient(circle at 80% 20%, rgba(27, 67, 50, 0.03) 0%, transparent 60%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    background: rgba(201, 159, 54, 0.12);
    color: #987216;
    padding: 6px 14px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border: 1px solid rgba(201, 159, 54, 0.25);
    display: inline-block;
}

.hero-title {
    font-size: 52px;
    line-height: 1.15;
    margin-bottom: 12px;
}

.tamil-title {
    font-family: var(--font-tamil);
    color: var(--color-accent);
    display: block;
    margin-bottom: 8px;
    font-size: 60px;
}

.hero-author {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-description {
    font-size: 17px;
    color: var(--color-text-muted);
    margin-bottom: 35px;
    max-width: 540px;
}

/* Excerpt Button & Form styles */
.cta-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    box-shadow: 0 4px 15px var(--color-shadow);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-bg-light);
}

.btn-primary:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(27, 67, 50, 0.04);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-bg-light);
}

.btn-accent:hover {
    background: #d46b4d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 92, 62, 0.25);
}

/* Countdown in Pre-pub Mode */
.countdown-box {
    margin-top: 35px;
    width: 100%;
    max-width: 500px;
}

.countdown-label {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.countdown-digits {
    display: flex;
    gap: 12px;
}

.digit-card {
    background: var(--color-bg-white);
    border-radius: var(--border-radius);
    padding: 12px 0;
    width: 76px;
    text-align: center;
    box-shadow: 0 4px 12px var(--color-shadow);
    border: 1px solid rgba(27, 67, 50, 0.05);
}

.digit-val {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.1;
}

.digit-lbl {
    font-family: var(--font-heading);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Signup Form in Pre-pub */
.signup-form-container {
    background: var(--color-bg-white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(27, 67, 50, 0.05);
    border: 1px solid rgba(27, 67, 50, 0.03);
    width: 100%;
    max-width: 500px;
    margin-top: 30px;
}

.signup-title {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--color-primary-dark);
}

.signup-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    gap: 10px;
}

.form-input {
    flex-grow: 1;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid rgba(27, 67, 50, 0.15);
    font-family: var(--font-heading);
    font-size: 14px;
    background-color: var(--color-bg-light);
    outline: none;
    transition: var(--transition-smooth);
}

.form-input:focus {
    border-color: var(--color-primary);
    background-color: var(--color-bg-white);
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

.form-submit {
    padding: 12px 24px;
    border-radius: 8px;
    background: var(--color-primary);
    color: var(--color-bg-light);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.form-submit:hover {
    background: var(--color-primary-light);
}

.form-message {
    font-family: var(--font-heading);
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

.form-message.success {
    color: #2d6a4f;
    display: block;
}

/* Post-publication Features */
.post-action-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 500px;
    margin-top: 25px;
}

.price-tag {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--color-accent);
    font-weight: 700;
}

.price-tag span {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 400;
    text-decoration: line-through;
    margin-right: 8px;
}

.like-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 15px;
}

.btn-like {
    background: #fff;
    border: 1px solid rgba(27, 67, 50, 0.15);
    border-radius: 50px;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
    position: relative;
    overflow: visible;
}

.btn-like:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: scale(1.03);
}

.btn-like svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    transition: var(--transition-smooth);
}

.btn-like.liked {
    background: rgba(192, 92, 62, 0.06);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-like.liked svg {
    fill: var(--color-accent);
    stroke: var(--color-accent);
    transform: scale(1.15);
}

.like-count {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary-dark);
}

/* Floating heart burst animation */
.floating-heart {
    position: absolute;
    color: var(--color-accent);
    font-size: 20px;
    pointer-events: none;
    animation: heartFlyUp 0.8s ease-out forwards;
    z-index: 10;
}

@keyframes heartFlyUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) rotate(20deg) scale(1.4);
        opacity: 0;
    }
}

/* ==========================================================================
   3D Book Mockup Display
   ========================================================================== */
.hero-book-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-perspective {
    perspective: 1200px;
    width: 320px;
    height: 460px;
}

.book-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-20deg) rotateX(10deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 15px 15px 30px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.book-perspective:hover .book-3d {
    transform: rotateY(-10deg) rotateX(5deg) scale(1.03);
    box-shadow: 20px 25px 40px rgba(0, 0, 0, 0.25);
}

.book-side {
    position: absolute;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
}

.book-front {
    width: 100%;
    height: 100%;
    background-image: url('gomathy_book_cover.png');
    transform: translateZ(15px); /* Thickness offset */
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.book-back {
    width: 100%;
    height: 100%;
    background: #dfd7cc;
    transform: rotateY(180deg) translateZ(15px);
    z-index: 1;
}

/* Spine effect */
.book-spine {
    width: 30px; /* Book thickness */
    height: 100%;
    background: var(--color-primary-dark);
    transform: rotateY(-90deg) translateZ(15px);
    left: 0;
    z-index: 3;
    box-shadow: inset 5px 0 10px rgba(0, 0, 0, 0.3);
}

/* Paper page stack look */
.book-pages {
    width: 30px;
    height: calc(100% - 8px);
    background: #fbf9f4;
    box-shadow: inset 2px 0 5px rgba(0,0,0,0.1),
                0 0 2px rgba(0,0,0,0.1);
    transform: rotateY(90deg) translateZ(305px); /* Translate by width minus half thickness */
    right: 0;
    top: 4px;
    z-index: 2;
    background-image: linear-gradient(to bottom, #eae4d9 1px, transparent 1px);
    background-size: 100% 3px;
}

/* ==========================================================================
   The Three Pillars Section (Ethical, Environmental, Health)
   ========================================================================== */
.pillars {
    padding: 100px 0;
    background-color: var(--color-bg-white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-subtitle {
    color: var(--color-accent);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-size: 38px;
    color: var(--color-primary-dark);
    line-height: 1.25;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.pillar-card {
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: 0 4px 15px rgba(27, 67, 50, 0.02);
    border: 1px solid rgba(27, 67, 50, 0.04);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(27, 67, 50, 0.07);
    border-color: rgba(27, 67, 50, 0.1);
}

.pillar-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 24px;
    color: var(--color-bg-light);
}

.pillar-card:nth-child(1) .pillar-icon {
    background: var(--color-accent);
}

.pillar-card:nth-child(2) .pillar-icon {
    background: var(--color-primary);
}

.pillar-card:nth-child(3) .pillar-icon {
    background: var(--color-secondary);
}

.pillar-title {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--color-primary-dark);
}

.pillar-desc {
    font-size: 15px;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Author & Publisher Section
   ========================================================================== */
.about-authors {
    padding: 100px 0;
    background-color: var(--color-bg-light);
    background-image: radial-gradient(circle at 10% 80%, rgba(192, 92, 62, 0.02) 0%, transparent 50%);
}

.author-flex {
    display: flex;
    gap: 60px;
    align-items: center;
}

.author-left {
    flex-shrink: 0;
    width: 400px;
}

.author-image-border {
    position: relative;
    border: 3px solid var(--color-primary);
    border-radius: var(--border-radius);
    padding: 15px;
}

.author-image-border::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 60px;
    height: 60px;
    border-top: 3px solid var(--color-accent);
    border-left: 3px solid var(--color-accent);
}

.author-illustration {
    background: #eae3d2;
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    color: var(--color-primary-dark);
}

.author-illus-title {
    font-family: var(--font-tamil);
    font-size: 24px;
    margin-bottom: 10px;
}

.author-right {
    flex-grow: 1;
}

.author-quotes {
    font-style: italic;
    font-size: 20px;
    color: var(--color-primary);
    border-left: 4px solid var(--color-accent);
    padding-left: 20px;
    margin: 25px 0;
    line-height: 1.5;
}

.publisher-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary);
    font-size: 14px;
}

.publisher-logo {
    width: 24px;
    height: 24px;
    background: var(--color-primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* ==========================================================================
   Reviews and Discussions Corner
   ========================================================================== */
.discussion-section {
    padding: 100px 0;
    background: var(--color-bg-white);
}

.discussion-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
}

.critics-cards {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.critic-card {
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
    padding: 24px;
    border-left: 4px solid var(--color-secondary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
}

.critic-text {
    font-style: italic;
    font-size: 15px;
    color: var(--color-text-dark);
    margin-bottom: 14px;
}

.critic-source {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    color: var(--color-primary);
}

.comments-panel {
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 8px 30px rgba(27, 67, 50, 0.02);
}

.comments-heading {
    font-size: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comments-heading span {
    font-size: 14px;
    background: var(--color-primary);
    color: var(--color-bg-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.comment-form {
    background: var(--color-bg-white);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.01);
    border: 1px solid rgba(27, 67, 50, 0.05);
}

.comment-form-title {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--color-primary-dark);
}

.stars-rating {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    align-items: center;
}

.stars-rating-label {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--color-text-muted);
}

.stars-wrapper {
    display: flex;
    flex-direction: row-reverse; /* Reverse for logical CSS sibling selectors */
    justify-content: flex-end;
}

.star-input {
    display: none;
}

.star-label {
    font-size: 24px;
    color: #ccc;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0 2px;
}

.star-label:hover,
.star-label:hover ~ .star-label,
.star-input:checked ~ .star-label {
    color: var(--color-secondary);
}

.form-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(27, 67, 50, 0.15);
    outline: none;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 12px;
    resize: vertical;
}

.form-textarea:focus {
    border-color: var(--color-primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar for Comments */
.comments-list::-webkit-scrollbar {
    width: 5px;
}
.comments-list::-webkit-scrollbar-track {
    background: transparent;
}
.comments-list::-webkit-scrollbar-thumb {
    background: rgba(27, 67, 50, 0.15);
    border-radius: 5px;
}

.comment-card {
    background: var(--color-bg-white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(27, 67, 50, 0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.01);
    animation: slideInComment 0.4s ease-out;
}

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

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    align-items: center;
}

.comment-author {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--color-primary-dark);
}

.comment-stars {
    color: var(--color-secondary);
    font-size: 12px;
}

.comment-body {
    font-size: 14px;
    color: var(--color-text-dark);
    line-height: 1.6;
}

/* ==========================================================================
   Excerpt Overlay / Modal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 28, 21, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 1005;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--color-bg-light);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(27, 67, 50, 0.1);
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    background: var(--color-primary);
    color: var(--color-bg-light);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    color: var(--color-bg-light);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--color-bg-light);
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex-grow: 1;
}

.excerpt-tab-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(27, 67, 50, 0.1);
    padding-bottom: 10px;
}

.excerpt-tab-btn {
    background: transparent;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.excerpt-tab-btn.active {
    background: var(--color-primary);
    color: var(--color-bg-light);
}

.excerpt-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-dark);
}

.excerpt-tamil {
    font-family: var(--font-tamil);
    display: none;
}

.excerpt-tamil.active {
    display: block;
}

.excerpt-english {
    display: none;
}

.excerpt-english.active {
    display: block;
}

.excerpt-source-page {
    margin-top: 20px;
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--color-primary-dark);
    color: var(--color-text-light);
    padding: 60px 0 40px 0;
    border-top: 4px solid var(--color-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(2, 0.9fr);
    gap: 60px;
    margin-bottom: 50px;
}

.footer-about h3 {
    color: var(--color-bg-light);
    font-size: 22px;
    margin-bottom: 16px;
}

.footer-about p {
    color: rgba(244, 246, 244, 0.7);
    font-size: 14px;
    margin-bottom: 20px;
}

.footer-links h4 {
    color: var(--color-secondary);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links ul li a {
    color: rgba(244, 246, 244, 0.7);
    font-size: 14px;
}

.footer-links ul li a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(244, 246, 244, 0.5);
}

.publisher-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(244, 246, 244, 0.7);
    font-size: 13px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-book-showcase {
        order: -1;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .pillars-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .author-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .author-left {
        width: 100%;
        max-width: 320px;
    }
    
    .discussion-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }
    
    .tamil-title {
        font-size: 48px;
    }
    
    .nav-wrapper {
        flex-direction: column;
        gap: 16px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
