/* ============================================================
   SEON v2 - Content Block Styles
   Extends Tailwind with custom block-specific styling
   ============================================================ */

/* ------------------------------------------------------------
   Prose Block Styling
   ------------------------------------------------------------ */
.prose-block {
    @apply text-gray-700 leading-relaxed;
}

.prose-block p {
    @apply mb-4;
}

.prose-block strong {
    @apply font-semibold text-gray-900;
}

.prose-block a {
    @apply text-primary-600 hover:text-primary-800 underline underline-offset-2;
}

/* ------------------------------------------------------------
   Animation Classes
   ------------------------------------------------------------ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Staggered animation for lists */
.checklist-block li,
.icon-list > div {
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.checklist-block li:nth-child(1) { animation-delay: 0.1s; }
.checklist-block li:nth-child(2) { animation-delay: 0.15s; }
.checklist-block li:nth-child(3) { animation-delay: 0.2s; }
.checklist-block li:nth-child(4) { animation-delay: 0.25s; }
.checklist-block li:nth-child(5) { animation-delay: 0.3s; }
.checklist-block li:nth-child(6) { animation-delay: 0.35s; }
.checklist-block li:nth-child(7) { animation-delay: 0.4s; }
.checklist-block li:nth-child(8) { animation-delay: 0.45s; }
.checklist-block li:nth-child(9) { animation-delay: 0.5s; }
.checklist-block li:nth-child(10) { animation-delay: 0.55s; }

/* ------------------------------------------------------------
   Percentage Bar Animation
   ------------------------------------------------------------ */
.percentage-bar .h-full {
    width: 0;
    animation: growBar 1s ease-out forwards;
}

@keyframes growBar {
    to { width: var(--target-width, 100%); }
}

/* ------------------------------------------------------------
   Open Loop Styling
   ------------------------------------------------------------ */
.open-loop {
    position: relative;
}

.open-loop::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #8b5cf6, #a855f7, #8b5cf6);
    border-radius: 2px;
}

/* ------------------------------------------------------------
   Stat Card Glow Effect
   ------------------------------------------------------------ */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
}

/* ------------------------------------------------------------
   Timeline Styling
   ------------------------------------------------------------ */
.timeline-block .relative::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 0.75rem;
    bottom: -1.5rem;
    width: 2px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
}

.timeline-block .relative:last-child::before {
    display: none;
}

/* ------------------------------------------------------------
   Table Styling
   ------------------------------------------------------------ */
.data-table table {
    border-spacing: 0;
}

.data-table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.comparison-table tr:hover td {
    background-color: rgba(102, 126, 234, 0.05);
}

/* ------------------------------------------------------------
   FAQ Accordion
   ------------------------------------------------------------ */
.faq-item summary {
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item[open] summary {
    @apply text-primary-600;
}

/* ------------------------------------------------------------
   Callout Box Hover Effects
   ------------------------------------------------------------ */
.tip-box,
.warning-box,
.danger-box {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tip-box:hover,
.warning-box:hover,
.danger-box:hover {
    transform: translateX(4px);
}

/* ------------------------------------------------------------
   CTA Box Effects
   ------------------------------------------------------------ */
.cta-box {
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.cta-box:hover::before {
    left: 100%;
}

/* ------------------------------------------------------------
   Testimonial Quote Mark
   ------------------------------------------------------------ */
.testimonial-block {
    position: relative;
}

/* ------------------------------------------------------------
   Expert Quote Styling
   ------------------------------------------------------------ */
.expert-quote {
    position: relative;
}

.expert-quote::after {
    content: '"';
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: rgba(59, 130, 246, 0.1);
    line-height: 1;
}

/* ------------------------------------------------------------
   Story Hook Styling
   ------------------------------------------------------------ */
.story-hook::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #f59e0b, #d97706);
    border-radius: 2px;
}

/* ------------------------------------------------------------
   Key Takeaways Animation
   ------------------------------------------------------------ */
.key-takeaways li {
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.key-takeaways li:nth-child(1) { animation-delay: 0.2s; }
.key-takeaways li:nth-child(2) { animation-delay: 0.3s; }
.key-takeaways li:nth-child(3) { animation-delay: 0.4s; }
.key-takeaways li:nth-child(4) { animation-delay: 0.5s; }
.key-takeaways li:nth-child(5) { animation-delay: 0.6s; }

/* ------------------------------------------------------------
   Table of Contents
   ------------------------------------------------------------ */
.toc a {
    transition: all 0.2s ease;
}

.toc a:hover {
    padding-left: 0.5rem;
}

/* Active state for scroll spy */
.toc a.active {
    @apply text-primary-600 font-semibold;
}

/* ------------------------------------------------------------
   Responsive Adjustments
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .stat-card {
        @apply text-center;
    }

    .stat-row {
        @apply grid-cols-2;
    }

    .before-after {
        @apply grid-cols-1;
    }

    .pro-con {
        @apply grid-cols-1;
    }

    .comparison-table {
        @apply text-sm;
    }

    .comparison-table th,
    .comparison-table td {
        @apply p-2;
    }
}

/* ------------------------------------------------------------
   Print Styles
   ------------------------------------------------------------ */
@media print {
    .cta-box,
    .cta-inline,
    .cta-inline-box {
        display: none !important;
    }

    .stat-card,
    .tip-box,
    .warning-box,
    .danger-box {
        border: 1px solid #ccc !important;
        background: white !important;
        color: black !important;
    }

    .open-loop {
        border-left: 2px solid #666 !important;
    }
}

/* ------------------------------------------------------------
   Dark Mode (Future Enhancement)
   ------------------------------------------------------------ */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here when needed */
}
