/* ===================================
   Speech Time Calculator - Styles
   Freelancea Tools - 2026
   =================================== */

/* CSS Variables */
:root {
    --primary: #C62E2E;
    --primary-dark: #A02424;
    --primary-light: #E63946;
    --secondary: #1e1e1e;
    --accent: #C1E172;
    --accent-dark: #A8C85F;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #1e1e1e;
    --text-muted: #6c757d;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition);
}

.logo:hover .logo-text {
    color: var(--primary-dark);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: var(--accent);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    padding: 4rem 0;
}

.tool-section {
    margin-bottom: 4rem;
}

.tool-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

/* Input Styles */
.tool-input-group {
    margin-bottom: 2rem;
}

.input-label {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.text-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
    background: var(--bg-white);
}

.text-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.input-help {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

#wordCount {
    font-weight: 600;
    color: var(--primary);
}

/* Speed Selector */
.speed-selector {
    margin-bottom: 2rem;
}

.speed-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.speed-option {
    cursor: pointer;
}

.speed-radio {
    display: none;
}

.speed-card {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.speed-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.speed-radio:checked + .speed-card {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.speed-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.speed-rate {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.speed-desc {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-white);
    border-color: var(--text-dark);
}

/* Results Section */
.results-section {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--radius-md);
    border: 2px solid #bae6fd;
}

.results-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.primary-result {
    grid-column: 1 / -1;
    background: var(--primary);
    color: white;
}

.result-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.primary-result .result-value {
    font-size: 3.5rem;
}

.result-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.results-details {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.results-details p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.results-details p:last-child {
    margin-bottom: 0;
}

.results-details strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Features Section */
.features-section {
    margin-bottom: 4rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.feature-text {
    color: var(--text-muted);
    line-height: 1.6;
}

/* How To Section */
.how-to-section {
    margin-bottom: 4rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.step-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    margin-top: 1rem;
    color: var(--text-dark);
}

.step-description {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Content Section */
.content-section {
    margin-bottom: 4rem;
}

.content-article {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.content-article h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.content-article h3:first-child {
    margin-top: 0;
}

.content-article p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.content-article strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, #2d2d2d 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 4rem;
    box-shadow: var(--shadow-lg);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-description {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn-cta {
    background: var(--primary);
    color: white;
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-cta:hover {
    background: var(--primary-light);
}

.btn-cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-cta-secondary:hover {
    background: white;
    color: var(--secondary);
}

.cta-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 4rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition);
}

.faq-item[open] .faq-question::after {
    content: '−';
}

.faq-question:hover {
    color: var(--primary);
    background: var(--bg-light);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    grid-column: 1 / -1;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.footer-tagline {
    margin-top: 0.5rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-link:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-copyright,
.footer-made {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .speed-options {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .cta-title {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-cta,
    .btn-cta-secondary {
        width: 100%;
    }

    .features-grid,
    .steps-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .content-article {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-icon {
        width: 60px;
        height: 60px;
    }

    .result-value {
        font-size: 2rem;
    }

    .primary-result .result-value {
        font-size: 2.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .nav,
    .cta-section,
    .footer {
        display: none;
    }

    body {
        background: white;
    }

    .tool-card,
    .feature-card,
    .step {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}