/*
Theme Name: CalcPortalPro
Theme URI: https://calcportalpro.com
Author: CalcPortalPro Team
Author URI: https://calcportalpro.com
Description: Fully dynamic calculator portal with admin-managed categories, popular calculators, blog posts, FAQs, and legal pages.
Version: 2.0.0
License: GPL v2 or later
Text Domain: calcportalpro
*/

:root {
    --primary-color: #2c3e66;
    --primary-dark: #1e2a47;
    --secondary-color: #27ae60;
    --accent-color: #f39c12;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --light-text: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    background: #ffffff;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

/* Header & Navigation - Horizontal Menu */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 800;
}

.site-title a {
    text-decoration: none;
    color: var(--primary-color);
}

.site-tagline {
    font-size: 0.9rem;
    color: #666;
}

/* Main menu - horizontal */
.main-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.main-menu li {
    margin: 0;
}

.main-menu a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.3s;
}

.main-menu a:hover {
    color: var(--secondary-color);
}

/* Responsive menu */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        text-align: center;
    }
    .main-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%);
    border-radius: 0 0 40px 40px;
    margin-bottom: 3rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: #4a5568;
}

.search-box {
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
}

.features-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.feature-card {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
    min-width: 140px;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Categories & Calculators & Articles Grids */
.categories-grid, .popular-grid, .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card, .calculator-card, .article-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.category-card:hover, .calculator-card:hover, .article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
    border-color: transparent;
}

.category-card h3, .calculator-card h3, .article-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.category-link {
    font-weight: 600;
    color: var(--secondary-color);
}

/* Calculator Device */
.calculator-device {
    background: #2d3436;
    border-radius: 30px;
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.3);
}

.calc-display {
    background: #1e272e;
    color: #0be881;
    font-size: 2.5rem;
    font-family: 'Courier New', monospace;
    text-align: right;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    min-height: 90px;
    word-wrap: break-word;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.calc-btn {
    background: #485460;
    color: white;
    border: none;
    padding: 18px 0;
    font-size: 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

.calc-btn.operator { background: #f39c12; color: #2c3e50; }
.calc-btn.equal { background: #27ae60; grid-column: span 2; }
.calc-btn.clear { background: #e74c3c; }

/* Trust Section with Animation */
.trust-section {
    background: var(--light-bg);
    padding: 3rem 0;
    text-align: center;
    margin: 3rem 0;
    border-radius: 24px;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FAQ Section */
.faq-grid {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.faq-item {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

.faq-question {
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    display: none;
    padding-top: 1rem;
    color: #4a5568;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.footer-links h4 {
    margin-bottom: 1rem;
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
}

/* Archive / Page Titles */
.content-area h1,
.archive h1,
.search h1,
.blog h1 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .container { padding: 0 16px; }
    .categories-grid, .popular-grid, .articles-grid { grid-template-columns: 1fr; }
    .stats-grid { gap: 1.5rem; }
    .footer-links { text-align: center; }
    .footer-links ul { text-align: center; }
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}