/**
 * Instagram Caption Generator - CreatorFlow Free Tool
 *
 * Brand Colors:
 * - Primary Accent: #d1fe17 (Lime Green)
 * - Primary Dark: #000000 (Pure Black) - ONLY dark color allowed
 * - White: #FFFFFF
 *
 * CRITICAL RULES:
 * - NO box-shadows anywhere
 * - NO gradients on dark backgrounds
 * - ONLY #000000 for dark backgrounds (NO #111827, #2d2d2d, etc.)
 * - Font: Stack Sans Headline for headings, Inter for body
 */

/* ========================================
   TOOL CONTAINER
======================================== */

.tool-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
}

/* ========================================
   HERO SECTION
======================================== */

.tool-hero {
    background: #ffffff;
    padding: 5rem 2rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.tool-hero__container {
    max-width: 800px;
    margin: 0 auto;
}

.tool-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #d1fe17;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: 'Stack Sans Headline', sans-serif;
}

.tool-hero__badge .instagram-icon {
    flex-shrink: 0;
}

.tool-hero__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #000000;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.tool-hero__description {
    font-size: 1.125rem;
    color: #374151;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   TOOL SECTION
======================================== */

.tool-section {
    background: #ffffff;
    padding: 4rem 2rem;
}

.tool-section__container {
    max-width: 900px;
    margin: 0 auto;
}

/* ========================================
   TABS
======================================== */

.tool-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.tool-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Stack Sans Headline', sans-serif;
    margin-bottom: -2px;
}

.tool-tab:hover:not(:disabled) {
    color: #000000;
    border-bottom-color: #d1fe17;
}

.tool-tab--active {
    color: #000000;
    border-bottom-color: #d1fe17;
}

.tool-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tool-tab__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
}

.tool-tab--active .tool-tab__number {
    background: #d1fe17;
    color: #000000;
}

.tool-tab__text {
    font-size: 1rem;
}

/* ========================================
   TAB CONTENT
======================================== */

.tool-content {
    display: none;
}

.tool-content--active {
    display: block;
}

.tool-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
}

.tool-card__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1.5rem;
}

/* ========================================
   FORM ELEMENTS
======================================== */

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.required {
    color: #ef4444;
}

.input-wrapper,
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon,
.select-icon {
    position: absolute;
    left: 1rem;
    color: #6b7280;
    pointer-events: none;
    z-index: 1;
}

.form-input,
.form-select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #000000;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
    padding-right: 3rem;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #d1fe17;
}

.form-input.input-error {
    border-color: #ef4444;
}

.form-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.form-error {
    font-size: 0.875rem;
    color: #ef4444;
    margin: 0.5rem 0 0 0;
}

/* ========================================
   CHECKBOXES
======================================== */

.form-group-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.form-checkbox:checked {
    background: #d1fe17;
    border-color: #d1fe17;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.checkbox-icon {
    color: #6b7280;
    flex-shrink: 0;
}

/* ========================================
   BUTTONS
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: #000000;
    color: #ffffff;
}

.btn--primary:hover {
    background: #d1fe17;
    color: #000000;
}

.btn--secondary {
    background: #f3f4f6;
    color: #000000;
    border: 1px solid #e5e7eb;
}

.btn--secondary:hover {
    background: #d1fe17;
    border-color: #d1fe17;
}

.btn--outline {
    background: transparent;
    color: #000000;
    border: 1px solid #d1d5db;
}

.btn--outline:hover {
    border-color: #d1fe17;
    color: #000000;
}

.btn--cta {
    background: #d1fe17;
    color: #000000;
    padding: 1rem 2rem;
}

.btn--cta:hover {
    background: #000000;
    color: #ffffff;
}

.btn--cta-large {
    background: #d1fe17;
    color: #000000;
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn--cta-large:hover {
    background: #000000;
    color: #ffffff;
}

.btn-icon {
    flex-shrink: 0;
}

/* ========================================
   CAPTIONS GRID (RESULTS)
======================================== */

.captions-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.caption-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.caption-card:hover {
    border-color: #d1fe17;
}

.caption-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.caption-card__label {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.caption-card__count {
    font-size: 0.8125rem;
    color: #9ca3af;
}

.caption-card__text {
    font-size: 1rem;
    color: #000000;
    line-height: 1.7;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.caption-card__footer {
    display: flex;
    justify-content: flex-end;
}

.caption-card__copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Stack Sans Headline', sans-serif;
}

.caption-card__copy-btn:hover {
    background: #d1fe17;
    color: #000000;
}

.caption-card__copy-btn.copied {
    background: #10b981;
    color: #ffffff;
}

/* ========================================
   RESULT ACTIONS
======================================== */

.result-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ========================================
   TOOL INFO SECTION (SEO Content)
======================================== */

.tool-info {
    background: #ffffff;
    padding: 5rem 2rem;
}

.tool-info__container {
    max-width: 800px;
    margin: 0 auto;
}

.tool-info__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #000000;
    margin-bottom: 2rem;
    text-align: center;
}

.tool-info__subtitle {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    margin: 3rem 0 1.5rem 0;
}

.tool-info__content {
    color: #374151;
    line-height: 1.8;
    font-size: 1.0625rem;
}

.tool-info__content p {
    margin-bottom: 1.25rem;
}

.tool-info__content code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.9375rem;
    color: #000000;
}

.tool-info__content a {
    color: #000000;
    text-decoration: underline;
}

.tool-info__content a:hover {
    color: #d1fe17;
}

/* ========================================
   STEPS
======================================== */

.tool-info__steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.info-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.info-step__icon {
    position: relative;
    flex-shrink: 0;
}

.info-step__icon svg {
    color: #6b7280;
}

.info-step__number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: #d1fe17;
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.info-step__content {
    flex: 1;
}

.info-step__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.info-step__content p {
    color: #374151;
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   BENEFITS GRID
======================================== */

.tool-info__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.benefit-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.benefit-card:hover {
    border-color: #d1fe17;
}

.benefit-card__icon {
    color: #d1fe17;
    margin-bottom: 1rem;
}

.benefit-card__content h4 {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.benefit-card__text {
    color: #374151;
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   BEST PRACTICES
======================================== */

.best-practices-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.best-practice-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.best-practice-item__number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #d1fe17;
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.best-practice-item__content {
    flex: 1;
}

.best-practice-item__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.best-practice-item__content p {
    color: #374151;
    line-height: 1.7;
    margin: 0;
}

.tool-info__closing {
    color: #374151;
    line-height: 1.8;
    margin-top: 3rem;
    font-size: 1.0625rem;
}

/* ========================================
   NEXT STEP CTA SECTION
======================================== */

.tool-next-step {
    background: #ffffff;
    padding: 5rem 2rem;
}

.tool-next-step__container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.tool-next-step__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #d1fe17;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: 'Stack Sans Headline', sans-serif;
}

.tool-next-step__badge svg {
    color: #000000;
}

.tool-next-step__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
}

.tool-next-step__description {
    font-size: 1.125rem;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.tool-next-step__features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: left;
}

.next-step-feature {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.next-step-feature:hover {
    border-color: #d1fe17;
}

.next-step-feature__icon {
    color: #d1fe17;
    margin-bottom: 1rem;
}

.next-step-feature__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.next-step-feature__text {
    color: #374151;
    line-height: 1.7;
    margin: 0;
}

.tool-next-step__microcopy {
    font-size: 0.9375rem;
    color: #6b7280;
    margin-top: 1rem;
}

/* ========================================
   COMPARISON SECTION
======================================== */

.tool-comparison {
    background: #f9fafb;
    padding: 5rem 2rem;
}

.tool-comparison__container {
    max-width: 1000px;
    margin: 0 auto;
}

.tool-comparison__header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-comparison__badge {
    display: inline-block;
    background: #d1fe17;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: 'Stack Sans Headline', sans-serif;
}

.tool-comparison__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #000000;
}

.comparison-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.comparison-column {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
}

.comparison-column--automated {
    border: 3px solid #d1fe17;
}

.comparison-column__header {
    margin-bottom: 1.5rem;
}

.comparison-column__header--featured {
    padding-bottom: 1rem;
    border-bottom: 2px solid #d1fe17;
}

.comparison-column__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.comparison-column__subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
}

.comparison-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comparison-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.6;
}

.comparison-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.comparison-icon--check {
    color: #10b981;
}

.comparison-icon--cross {
    color: #ef4444;
}

.comparison-column .btn--cta {
    width: 100%;
    margin-top: 1.5rem;
}

/* ========================================
   FAQ SECTION
======================================== */

.tool-faq {
    background: #ffffff;
    padding: 5rem 2rem;
}

.tool-faq__container {
    max-width: 800px;
    margin: 0 auto;
}

.tool-faq__title {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #000000;
    text-align: center;
    margin-bottom: 3rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #d1fe17;
}

.faq-item[open] {
    border-color: #d1fe17;
}

.faq-question {
    font-family: 'Stack Sans Headline', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: #6b7280;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
    color: #d1fe17;
}

.faq-answer {
    margin-top: 1rem;
    color: #374151;
    line-height: 1.7;
    font-size: 1rem;
}

.faq-answer p {
    margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.9375rem;
    color: #000000;
}

.faq-answer a {
    color: #000000;
    text-decoration: underline;
}

.faq-answer a:hover {
    color: #d1fe17;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Tablet: 640px and up */
@media (min-width: 640px) {
    .tool-hero {
        padding: 6rem 2rem;
    }

    .result-actions {
        flex-direction: row;
    }

    .result-actions .btn {
        flex: 1;
    }
}

/* Desktop: 1024px and up */
@media (min-width: 1024px) {
    .tool-hero {
        padding: 7rem 2rem;
    }

    .tool-section {
        padding: 5rem 2rem;
    }

    .tool-info,
    .tool-next-step,
    .tool-faq {
        padding: 6rem 2rem;
    }
}

/* Mobile: < 640px */
@media (max-width: 639px) {
    .tool-hero {
        padding: 3rem 1.5rem;
    }

    .tool-section {
        padding: 3rem 1.5rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .tool-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tool-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
        justify-content: flex-start;
        padding: 1rem;
    }

    .tool-tab--active,
    .tool-tab:hover:not(:disabled) {
        border-left-color: #d1fe17;
        border-bottom-color: transparent;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }

    .tool-info,
    .tool-next-step,
    .tool-comparison,
    .tool-faq {
        padding: 3rem 1.5rem;
    }

    .comparison-table {
        grid-template-columns: 1fr;
    }
}
