/* ============================================================
   Word to PDF - Custom Styles
   All selectors scoped with .w2p-* prefix to avoid
   conflicting with Google AdSense auto ads.
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --w2p-primary: #2563eb;
    --w2p-primary-hover: #1d4ed8;
    --w2p-primary-light: #dbeafe;
    --w2p-success: #16a34a;
    --w2p-success-light: #dcfce7;
    --w2p-danger: #dc2626;
    --w2p-danger-light: #fee2e2;
    --w2p-text: #1e293b;
    --w2p-text-light: #64748b;
    --w2p-bg: #f8fafc;
    --w2p-white: #ffffff;
    --w2p-border: #e2e8f0;
    --w2p-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --w2p-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --w2p-radius: 12px;
    --w2p-radius-sm: 8px;
    --w2p-container: 1100px;
    --w2p-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --w2p-transition: 0.2s ease;
}

/* --- Base body/html (minimal, AdSense-safe) --- */
body {
    margin: 0;
    padding: 0;
    font-family: var(--w2p-font);
    color: var(--w2p-text);
    background: var(--w2p-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.w2p-container {
    max-width: var(--w2p-container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Header / Nav --- */
.w2p-header {
    background: var(--w2p-white);
    border-bottom: 1px solid var(--w2p-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.w2p-nav {
    max-width: var(--w2p-container);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.w2p-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--w2p-primary);
    text-decoration: none;
}

.w2p-logo:hover {
    color: var(--w2p-primary-hover);
}

.w2p-logo-icon {
    flex-shrink: 0;
}

.w2p-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.w2p-nav-links a {
    color: var(--w2p-text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--w2p-transition);
}

.w2p-nav-links a:hover {
    color: var(--w2p-primary);
}

/* --- Hero Section --- */
.w2p-hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: var(--w2p-white);
    text-align: center;
    padding: 3.5rem 1rem 3rem;
}

.w2p-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.w2p-hero-subtitle {
    font-size: 1.15rem;
    margin: 0;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Upload Section --- */
.w2p-upload-section {
    padding: 2.5rem 0 3rem;
    margin-top: -1.5rem;
    position: relative;
    z-index: 1;
}

.w2p-upload-card {
    background: var(--w2p-white);
    border-radius: var(--w2p-radius);
    box-shadow: var(--w2p-shadow-lg);
    padding: 2.5rem 2rem;
    max-width: 640px;
    margin: 0 auto;
}

/* --- Dropzone --- */
.w2p-dropzone {
    border: 2px dashed var(--w2p-border);
    border-radius: var(--w2p-radius-sm);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--w2p-transition), background var(--w2p-transition);
}

.w2p-dropzone:hover,
.w2p-dropzone.w2p-dragover {
    border-color: var(--w2p-primary);
    background: var(--w2p-primary-light);
}

.w2p-upload-icon {
    color: var(--w2p-primary);
    margin-bottom: 0.75rem;
}

.w2p-dropzone-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--w2p-text);
}

.w2p-dropzone-hint {
    font-size: 0.9rem;
    color: var(--w2p-text-light);
    margin: 0.5rem 0 1rem;
}

.w2p-dropzone-limit {
    font-size: 0.8rem;
    color: var(--w2p-text-light);
    margin: 1rem 0 0;
}

.w2p-file-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* --- Hidden state (override flex display) --- */
.w2p-file-info[hidden],
.w2p-progress-wrap[hidden],
.w2p-message[hidden],
.w2p-dropzone-content[hidden] {
    display: none;
}

/* --- File Info --- */
.w2p-file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.w2p-file-icon {
    color: var(--w2p-primary);
    flex-shrink: 0;
}

.w2p-file-details {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.w2p-file-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.w2p-file-size {
    display: block;
    font-size: 0.8rem;
    color: var(--w2p-text-light);
    margin-top: 0.15rem;
}

.w2p-btn-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 50%;
    color: var(--w2p-text-light);
    transition: color var(--w2p-transition), background var(--w2p-transition);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.w2p-btn-remove:hover {
    color: var(--w2p-danger);
    background: var(--w2p-danger-light);
}

/* --- Buttons --- */
.w2p-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--w2p-radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--w2p-transition), transform var(--w2p-transition), box-shadow var(--w2p-transition);
    font-family: var(--w2p-font);
}

.w2p-btn:active {
    transform: scale(0.97);
}

.w2p-btn-primary {
    background: var(--w2p-primary);
    color: var(--w2p-white);
}

.w2p-btn-primary:hover {
    background: var(--w2p-primary-hover);
}

.w2p-btn-convert {
    background: var(--w2p-primary);
    color: var(--w2p-white);
    width: 100%;
    padding: 0.85rem;
    font-size: 1.05rem;
}

.w2p-btn-convert:hover:not(:disabled) {
    background: var(--w2p-primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.w2p-btn-convert:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.w2p-btn-download {
    background: var(--w2p-success);
    color: var(--w2p-white);
    margin-left: auto;
}

.w2p-btn-download:hover {
    background: #15803d;
}

/* --- Actions --- */
.w2p-actions {
    margin-top: 1.5rem;
}

/* --- Progress --- */
.w2p-progress-wrap {
    margin-top: 1.5rem;
}

.w2p-progress-bar {
    height: 6px;
    background: var(--w2p-border);
    border-radius: 3px;
    overflow: hidden;
}

.w2p-progress-fill {
    height: 100%;
    background: var(--w2p-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.w2p-progress-fill.w2p-indeterminate {
    width: 30%;
    animation: w2p-indeterminate 1.5s ease-in-out infinite;
}

@keyframes w2p-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

.w2p-progress-text {
    font-size: 0.85rem;
    color: var(--w2p-text-light);
    margin: 0.5rem 0 0;
    text-align: center;
}

/* --- Messages --- */
.w2p-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--w2p-radius-sm);
    margin-top: 1.5rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.w2p-message-error {
    background: var(--w2p-danger-light);
    color: var(--w2p-danger);
}

.w2p-message-success {
    background: var(--w2p-success-light);
    color: var(--w2p-success);
}

.w2p-message-success .w2p-btn-download {
    margin-left: auto;
}

/* --- Section Title --- */
.w2p-section-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 2rem;
    color: var(--w2p-text);
}

/* --- Features Section --- */
.w2p-features {
    padding: 3rem 0;
    background: var(--w2p-white);
}

.w2p-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.w2p-feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--w2p-radius);
    border: 1px solid var(--w2p-border);
    transition: box-shadow var(--w2p-transition), transform var(--w2p-transition);
}

.w2p-feature-card:hover {
    box-shadow: var(--w2p-shadow-lg);
    transform: translateY(-2px);
}

.w2p-feature-icon-wrap {
    width: 60px;
    height: 60px;
    background: var(--w2p-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--w2p-primary);
}

.w2p-feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--w2p-text);
}

.w2p-feature-card p {
    font-size: 0.9rem;
    color: var(--w2p-text-light);
    margin: 0;
    line-height: 1.5;
}

/* --- How It Works Section --- */
.w2p-howto {
    padding: 3rem 0;
}

.w2p-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
}

.w2p-step {
    text-align: center;
    flex: 1;
    max-width: 260px;
    padding: 1.5rem 1rem;
}

.w2p-step-number {
    width: 50px;
    height: 50px;
    background: var(--w2p-primary);
    color: var(--w2p-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.w2p-step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--w2p-text);
}

.w2p-step p {
    font-size: 0.9rem;
    color: var(--w2p-text-light);
    margin: 0;
}

.w2p-step-arrow {
    color: var(--w2p-text-light);
    padding-top: 2rem;
    flex-shrink: 0;
}

/* --- FAQ Section --- */
.w2p-faq {
    padding: 3rem 0;
    background: var(--w2p-white);
}

.w2p-faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.w2p-faq-item {
    border: 1px solid var(--w2p-border);
    border-radius: var(--w2p-radius-sm);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.w2p-faq-question {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--w2p-transition);
}

.w2p-faq-question::-webkit-details-marker {
    display: none;
}

.w2p-faq-question::after {
    content: "+";
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--w2p-text-light);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform var(--w2p-transition);
}

.w2p-faq-item[open] .w2p-faq-question::after {
    content: "\2212";
}

.w2p-faq-item[open] .w2p-faq-question {
    background: var(--w2p-primary-light);
}

.w2p-faq-answer {
    padding: 0 1.25rem 1rem;
    font-size: 0.95rem;
    color: var(--w2p-text-light);
    line-height: 1.6;
}

.w2p-faq-answer p {
    margin: 0.5rem 0 0;
}

/* --- Footer --- */
.w2p-footer {
    background: var(--w2p-text);
    color: rgba(255,255,255,0.7);
    padding: 2rem 1.25rem;
    margin-top: 2rem;
}

.w2p-footer-inner {
    max-width: var(--w2p-container);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.w2p-footer p {
    margin: 0;
    font-size: 0.9rem;
}

.w2p-footer a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color var(--w2p-transition);
}

.w2p-footer a:hover {
    color: var(--w2p-white);
}

/* --- Content Pages (Privacy, etc.) --- */
.w2p-content-page {
    padding: 2rem 0 3rem;
}

.w2p-content-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--w2p-text);
}

.w2p-content-page h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--w2p-text);
}

.w2p-content-page p,
.w2p-content-page li {
    font-size: 0.95rem;
    color: var(--w2p-text-light);
    line-height: 1.7;
}

.w2p-content-page ul {
    padding-left: 1.5rem;
}

.w2p-content-page li {
    margin-bottom: 0.5rem;
}

.w2p-content-page a {
    color: var(--w2p-primary);
    text-decoration: none;
}

.w2p-content-page a:hover {
    text-decoration: underline;
}

.w2p-content-updated {
    font-size: 0.85rem;
    color: var(--w2p-text-light);
    margin-top: 0;
}

.w2p-request-id {
    color: var(--w2p-text-light);
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet */
@media (max-width: 768px) {
    .w2p-hero-title {
        font-size: 1.75rem;
    }

    .w2p-hero-subtitle {
        font-size: 1rem;
    }

    .w2p-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .w2p-steps {
        flex-direction: column;
        align-items: center;
    }

    .w2p-step-arrow {
        transform: rotate(90deg);
        padding: 0;
    }

    .w2p-step {
        max-width: 100%;
    }

    .w2p-upload-card {
        padding: 1.5rem 1.25rem;
    }

    .w2p-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .w2p-hero {
        padding: 2.5rem 1rem 2rem;
    }

    .w2p-hero-title {
        font-size: 1.5rem;
    }

    .w2p-features-grid {
        grid-template-columns: 1fr;
    }

    .w2p-section-title {
        font-size: 1.4rem;
    }

    .w2p-upload-card {
        padding: 1.25rem 1rem;
    }

    .w2p-dropzone {
        padding: 1.5rem 1rem;
    }

    .w2p-message {
        flex-direction: column;
        align-items: flex-start;
    }

    .w2p-message-success .w2p-btn-download {
        margin-left: 0;
        margin-top: 0.75rem;
        width: 100%;
    }

    .w2p-nav-links {
        gap: 1rem;
    }
}