/* ============================================
   COMMON STYLES - SEO Optimized Calculator Website
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    font-size: 16px;
}

/* Header */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo:hover {
    color: var(--primary-dark);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Main Container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-weight: 500;
    color: var(--text-dark);
    transition: transform 0.2s, box-shadow 0.2s;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.badge-icon {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

/* Intro Section */
.intro-section {
    margin: 4rem 0;
}

.intro-section h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.section-intro {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto 3rem auto;
    text-align: center;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.feature-benefits {
    list-style: none;
    padding: 0;
}

.feature-benefits li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dark);
}

.feature-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

/* Category Section */
.category-section {
    margin: 4rem 0;
}

.category-section h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    text-align: center;
}

/* Why Choose Section */
.why-choose-section {
    margin: 4rem 0;
    padding: 3rem 0;
    background: var(--bg-white);
    border-radius: 12px;
}

.why-choose-section h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.benefit-item {
    text-align: center;
}

.benefit-item h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.benefit-item p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Closing Section */
.closing-section {
    margin: 4rem 0;
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    color: white;
}

.closing-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.closing-text {
    font-size: 1.125rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    color: rgba(255, 255, 255, 0.95);
}

/* AdSense Placeholders & Custom Ads */
.ad-container {
    background-color: #f3f4f6;
    border: 1px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 1.5rem 0;
    min-height: 100px;
}

.ad-container.ad-custom {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid var(--primary-color);
    border-style: solid;
    border-radius: 12px;
    padding: 2rem;
    min-height: auto;
}

.ad-banner {
    width: 100%;
    min-height: 100px;
}

.ad-incontent {
    width: 100%;
    min-height: 250px;
    margin: 2rem 0;
}

.ad-bottom {
    width: 100%;
    min-height: 100px;
}

/* Custom Ad Styles */
.custom-ad {
    width: 100%;
    text-align: center;
}

.custom-ad-content {
    max-width: 600px;
    margin: 0 auto;
}

.custom-ad-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.custom-ad-description {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.custom-ad-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
}

.custom-ad-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: #ffffff;
    padding: 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.category-card ul {
    list-style: none;
}

.category-card ul li {
    margin-bottom: 0.75rem;
}

.category-card a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

.category-card a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    nav ul {
        justify-content: center;
        gap: 1rem;
    }

    main {
        padding: 1rem 0.75rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.5rem 0;
    }

    /* Footer stays in grid layout on mobile - 2 columns */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    footer {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }

    .footer-section h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .footer-section ul li {
        margin-bottom: 0.4rem;
        font-size: 0.875rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        font-size: 0.8125rem;
    }

    /* Compact hero section */
    .hero-section {
        padding: 1.5rem 0;
        margin-bottom: 2rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .trust-badges {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .badge {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    /* Compact intro section */
    .intro-section {
        margin: 2rem 0;
    }

    .intro-section h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .section-intro {
        font-size: 0.9375rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .feature-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .feature-card p {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
        line-height: 1.6;
    }

    .feature-benefits li {
        font-size: 0.875rem;
        padding: 0.4rem 0;
    }

    /* Compact category sections */
    .category-section {
        margin: 2rem 0;
    }

    .category-section h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .section-description {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .category-card {
        padding: 1.25rem;
    }

    .category-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .category-card ul li {
        margin-bottom: 0.5rem;
        font-size: 0.9375rem;
    }

    /* Compact why choose section */
    .why-choose-section {
        margin: 2rem 0;
        padding: 2rem 0;
    }

    .why-choose-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .benefit-item h3 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .benefit-item p {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    /* Compact closing section */
    .closing-section {
        margin: 2rem 0;
        padding: 2rem 1rem;
    }

    .closing-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .closing-text {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
        line-height: 1.6;
    }

    /* Compact ads */
    .ad-container {
        margin: 1rem 0;
        min-height: 80px;
    }

    .ad-incontent {
        min-height: 200px;
        margin: 1.5rem 0;
    }

    .ad-container.ad-custom {
        padding: 1.25rem;
    }

    .custom-ad-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .custom-ad-description {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    .custom-ad-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.125rem;
    }

    nav ul {
        gap: 0.75rem;
        font-size: 0.8125rem;
    }

    main {
        padding: 0.75rem 0.5rem;
    }

    /* Footer stays in 2 columns even on very small screens */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    footer {
        padding: 1.25rem 0.75rem;
    }

    .footer-section h3 {
        font-size: 0.9375rem;
        margin-bottom: 0.5rem;
    }

    .footer-section ul li {
        font-size: 0.8125rem;
        margin-bottom: 0.35rem;
    }

    .footer-bottom {
        font-size: 0.75rem;
        padding-top: 1.25rem;
    }

    .hero-section {
        padding: 1.25rem 0;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.875rem;
    }

    .trust-badges {
        gap: 0.5rem;
    }

    .badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.8125rem;
    }

    .badge-icon {
        font-size: 1rem;
    }

    .intro-section {
        margin: 1.5rem 0;
    }

    .intro-section h2 {
        font-size: 1.375rem;
    }

    .section-intro {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .features-grid {
        gap: 1.25rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .feature-card h3 {
        font-size: 1.125rem;
    }

    .feature-card p {
        font-size: 0.875rem;
    }

    .category-section {
        margin: 1.5rem 0;
    }

    .category-section h2 {
        font-size: 1.375rem;
    }

    .section-description {
        font-size: 0.875rem;
    }

    .category-card {
        padding: 1rem;
    }

    .category-card h3 {
        font-size: 1.125rem;
    }

    .category-card ul li {
        font-size: 0.875rem;
    }

    .why-choose-section {
        padding: 1.5rem 0;
        margin: 1.5rem 0;
    }

    .why-choose-section h2 {
        font-size: 1.375rem;
        margin-bottom: 1.25rem;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        padding: 0 0.75rem;
    }

    .benefit-item h3 {
        font-size: 1rem;
    }

    .benefit-item p {
        font-size: 0.8125rem;
    }

    .closing-section {
        margin: 1.5rem 0;
        padding: 1.5rem 0.75rem;
    }

    .closing-section h2 {
        font-size: 1.375rem;
    }

    .closing-text {
        font-size: 0.875rem;
    }

    .ad-container {
        margin: 0.75rem 0;
        min-height: 70px;
    }

    .ad-incontent {
        min-height: 180px;
        margin: 1.25rem 0;
    }

    .ad-container.ad-custom {
        padding: 1rem;
    }

    .custom-ad-title {
        font-size: 1rem;
    }

    .custom-ad-description {
        font-size: 0.8125rem;
    }

    .custom-ad-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

