/* ========================================
   GLOBAL CSS - Counter-Words.com
   ======================================== */

/* ---------- BASE & RESET ---------- */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --light: linear-gradient(135deg,var(--brand-50) 0%,#e0f2fe 100%);
    --dark: #1e293b;
    --gray: #64748b;
    --border: #e2e8f0;
    --shadow: 0 2px 8px rgba(0,0,0,0.05);
    --radius: 12px;
    --gray-200: #e5e7eb;
    --brand-50: #eff6ff;
    --gray-400: #9ca3af;
    --gray-700: #374151;
    --brand-700: #1d4ed8;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background:var(--light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* ---------- HEADER & NAVIGATION ---------- */
.header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo a {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
    white-space: nowrap;
}

.logo span {
    color: var(--dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 1rem;
}

.nav-links a:hover {
    color: var(--primary-dark);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dark);
    cursor: pointer;
}

.menu-btn i {
    width: 1.2em;
    height: 1.2em;
    font-size: 22px;
}

/* ---------- MAIN CONTAINER ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
}

/* ---------- HERO SECTION ---------- */
.hero {
    text-align: center;
    padding: 0rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 2rem;
    background: var(--primary-dark);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 2rem;
}

/* ---------- SECTION TITLES ---------- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark);
}

/* ---------- TEXT AREA COMPONENT ---------- */
.text-area-container {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-300);
}

.text-area-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

textarea {
    width: 100%;
    min-height: 250px;
    padding: 1.5rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea::placeholder {
    color: #94a3b8;
}

/* ---------- STATS CARDS ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: var(--brand-50);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--gray-400);
}

.stat-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.stat-card i {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 0.4rem;
}

/* ---------- BUTTONS ---------- */
.actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn i {
    width: 1.3em;
    height: 1.3em;
}

.btn-primary {
    background: var(--primary-dark);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-700);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--dark);
    border: 1px solid var(--gray-400);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* ---------- FEATURES GRID ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-300);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ---------- TOOLS SECTION ---------- */
.tools-section {
    margin: 4rem 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tool-category {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-300);
}

.tool-category h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-category ul {
    list-style: none;
}

.tool-category li {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
}

.tool-category li:last-child {
    border-bottom: none;
}

.tool-category a {
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.tool-category a i {
    width: 1.2em;
    height: 1.2em;
}

.tool-category a:hover {
    color: var(--primary-dark);
}

/* ---------- BLOG SECTION ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    border: 1px solid var(--gray-300);
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.blog-content p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-link i {
    width: 1.2em;
    height: 1.2em;
}

.view-all {
    text-align: center;
    margin: 2rem 0;
    padding-bottom: 80px;
}

/* ---------- SEO CONTENT ---------- */
.seo-content {
    background: white;
    border-radius: var(--radius);
    padding: 3rem;
    box-shadow: var(--shadow);
    margin: 3rem 0;
    line-height: 1.8;
    border: 1px solid var(--gray-300);
}

.seo-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.seo-content h3 {
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    color: var(--primary-dark);
}

.seo-content h4 {
    margin: 1.5rem 0 1rem;
    color: var(--dark);
}

.seo-content p {
    margin-bottom: 1rem;
    color: var(--dark);
}

.seo-content ul,
.seo-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.highlight-box {
    background: var(--brand-50);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 2rem 0;
}

.highlight-box h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    text-decoration: underline;
}

/* ---------- TABLE STYLES ---------- */
.requirements-table {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin: 2rem 0;
    overflow-x: auto;
    border: 1px solid var(--gray-300);
}

.requirements-table h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.word-count-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.word-count-table th {
    background: var(--brand-50);
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-top: 1px solid var(--border);
    font-weight: 600;
    color: var(--dark);
}

.word-count-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

/* ---------- FAQ SECTION ---------- */
.faq {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.faq-item {
    margin-bottom: 1rem;
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-300);
}

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.faq-item p {
    color: var(--gray-700);
    font-size: 0.95rem;
}

/* ---------- FOOTER ---------- */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 2rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-content h4 {
    margin-bottom: 0.9rem;
    color: #e2e8f0;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.9rem;
}

.copyright {
    margin-bottom: 0.5rem;
}

.footer-links-bottom {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links-bottom a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links-bottom a:hover {
    color: white;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    .menu-btn {
        display: block;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .logo a {
        font-size: 1.5rem;
    }

    .menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--light);
        padding: 2rem;
        box-shadow: var(--shadow);
        flex-direction: column;
        gap: 1rem;
        text-align: left;
        height: 100vh;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .actions {
        flex-direction: column;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .seo-content {
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .logo a {
        font-size: 1.3rem;
        padding: 0;
        margin: 0;
    }

    .header {
        padding: 0.5rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .seo-content h3 {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .word-count-table {
        font-size: 0.7em;
    }

    textarea {
        min-height: 200px;
    }

    .footer-links-bottom {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stat-card h3 {
        font-size: 0.9rem;
    }

    .stat-card .number {
        font-size: 2rem;
    }

    .stat-card i {
        font-size: 1.5rem;
        margin-bottom: 0.4rem;
    }

    .text-area-container {
        padding: 1.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .blog-card img {
        height: 150px;
    }

    .blog-content {
        padding: 1rem;
    }

    .highlight-box p {
        font-size: 1rem;
    }
}