/* Turkish Text Summarizer — editorial redesign (light theme) */

:root {
    --color-text: #111827;
    --color-text-secondary: #6B7280;
    --color-border: #E5E7EB;
    --color-surface: #F9FAFB;
    --color-primary: #000000;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: #FFFFFF;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--color-border);
    background: #FFFFFF;
    position: relative;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 5rem;
}

.brand a {
    color: inherit;
    text-decoration: none;
}

.brand {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-text);
    text-decoration: none;
    margin: 0;
    white-space: nowrap;
}

.main-nav {
    display: none;
}

@media (min-width: 1024px) {
    .main-nav {
        display: flex;
        gap: 0.5rem;
    }
}

.main-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--color-text);
}

.main-nav a.active {
    color: var(--color-text);
    font-weight: 700;
}

.main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1rem 1rem;
    z-index: 50;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.lang-switch .divider {
    color: #D1D5DB;
}

.lang-switch a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.lang-switch a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.lang-switch .current {
    color: var(--color-text);
    font-weight: 700;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 0.25rem;
    padding: 0.4rem;
    cursor: pointer;
    color: var(--color-text);
}

@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
    }
}

/* Tagline */
.tagline {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    margin: 2.5rem auto 0;
    max-width: 48rem;
}

/* Main two-pane layout */
.main-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}

/* Grid items default to min-width:auto, which sizes them to their content's
   min-content width. A long unbroken result string (the noun/verb list) would
   otherwise stretch its column and squeeze the other one. */
.pane {
    min-width: 0;
}

@media (min-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .pane-input {
        padding-right: 3rem;
    }

    .pane-output {
        border-left: 1px solid var(--color-border);
        padding-left: 3rem;
    }
}

.pane-title {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.75rem;
}

.pane-desc {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
    margin: 0 0 1.5rem;
}

.field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

textarea {
    display: block;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background: #FFFFFF;
    color: var(--color-text);
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 20rem;
}

textarea::placeholder {
    color: #9CA3AF;
}

textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 0;
}

.btn-primary {
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
    padding: 0.85rem 2rem;
    margin-top: 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #1F2937;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: default;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border: 1px solid var(--color-border);
    background: #FFFFFF;
    color: #374151;
}

.btn-secondary:hover {
    background: var(--color-surface);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: default;
}

.btn-secondary .material-icons-outlined {
    font-size: 1.125rem;
}

/* Result panel */
.result-panel {
    background: var(--color-surface);
    padding: 2rem;
    min-height: 420px;
}

.result-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text);
    margin: 0;
    white-space: pre-wrap;
    /* "anywhere" rather than "break-word": it also reduces the element's
       min-content width, so a long unbroken string cannot widen the grid. */
    overflow-wrap: anywhere;
}

.result-text.placeholder {
    color: #9CA3AF;
}

.result-text.loading {
    color: #9CA3AF;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

/* Alerts */
.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

[hidden] {
    display: none !important;
}

/* Ads */
.ad-row {
    text-align: center;
    padding-bottom: 2rem;
}

.ad_responsive_1 {
    width: 320px;
    height: 100px;
}

@media (min-width: 500px) {
    .ad_responsive_1 {
        width: 468px;
        height: 60px;
    }
}

@media (min-width: 800px) {
    .ad_responsive_1 {
        width: 728px;
        height: 90px;
    }
}

/* App banner */
.app-banner {
    background: var(--color-primary);
}

.app-banner-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .app-banner-inner {
        flex-direction: row;
        text-align: left;
    }
}

.app-banner h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 0.5rem;
}

.app-banner p {
    color: #9CA3AF;
    margin: 0;
}

.store-badges {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.store-badge {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.store-badge:hover {
    background: #F3F4F6;
}

.store-badge .material-icons-outlined {
    font-size: 1.875rem;
    margin-right: 0.75rem;
    color: #1F2937;
    transition: transform 0.2s;
}

.store-badge:hover .material-icons-outlined {
    transform: scale(1.1);
}

.badge-top {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    color: #4B5563;
    text-align: left;
}

.badge-name {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 0.25rem;
    text-align: left;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    background: #FFFFFF;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
    }
}

.footer-inner a {
    color: var(--color-text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-inner a:hover {
    color: var(--color-text);
}

/* Article content sections */
.content-section {
    border-top: 1px solid var(--color-border);
    padding-top: 3rem;
    padding-bottom: 1rem;
    margin-top: 3rem;
}

.content-section h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.content-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 2rem 0 0.5rem;
}

.content-section p,
.content-section li {
    color: var(--color-text-secondary);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.content-section p {
    margin: 0 0 1rem;
    max-width: 46rem;
}

.content-section ul,
.content-section ol {
    max-width: 46rem;
    padding-left: 1.25rem;
    margin: 0 0 1rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

.content-section strong {
    color: var(--color-text);
    font-weight: 600;
}

.faq-item {
    border-top: 1px solid var(--color-border);
    padding: 1.25rem 0;
    max-width: 46rem;
}

.faq-item h3 {
    margin: 0 0 0.5rem;
}

.faq-item p {
    margin: 0;
}
