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

:root {
    --primary-color: #edb826;
    --secondary-color: #2b2b2b;
    --bg-light: #ffffff;
    --bg-gray: #f8f9fa;
    --text-dark: #2b2b2b;
    --text-gray: #666666;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --error-color: #dc3545;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

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

/* ===========================
   Container & Layout
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   Header Styles
   =========================== */
.header {
    background-color: var(--secondary-color);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--bg-light);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    font-size: 2rem;
}

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

/* Navigation */
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--bg-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-close {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--bg-light);
    cursor: pointer;
}

/* ===========================
   Ad Section
   =========================== */
.ad-section {
    background-color: var(--bg-gray);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.ad-placeholder {
    background-color: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: var(--text-gray);
    font-weight: 500;
}

/* ===========================
   Section Styles
   =========================== 
section {
    padding: 4rem 0;
}*/

section h1,
section h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

section h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

section h2 {
    font-size: 2rem;
    text-align: center;
}

section h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ===========================
   Introduction Section
   =========================== */
.intro-section {
    background-color: var(--bg-light);
}

.intro-section p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.intro-section strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* ===========================
   Calculator Section
   =========================== */
.calculator-section {
    background-color: var(--bg-gray);
}

.calculator-card {
    background-color: var(--bg-light);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.calculator-tabs {
    display: flex;
    background-color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-btn {
    flex: 1;
    padding: 1.2rem 1rem;
    background: none;
    border: none;
    color: var(--bg-light);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn:hover {
    background-color: rgba(237, 184, 38, 0.1);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.tab-content {
    display: none;
    padding: 2.5rem;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(237, 184, 38, 0.1);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

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

.btn-primary:hover {
    background-color: #d4a520;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-gray);
    color: var(--secondary-color);
    border: 2px solid var(--border-color);
}

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

.btn-copy {
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: var(--bg-light);
}

.btn-copy:hover {
    background-color: #1a1a1a;
}

/* Result Styles */
.result-container {
    margin-top: 2rem;
}

.result-success {
    background-color: #f0f9ff;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
}

.result-value {
    text-align: center;
    margin-bottom: 2rem;
}

.result-value h4 {
    color: var(--text-gray);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.result-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.result-explanation {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.result-explanation h5 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.result-explanation ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.result-explanation li {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.result-interpretation {
    background-color: var(--bg-gray);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.error-message {
    background-color: #fff5f5;
    color: var(--error-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--error-color);
    font-weight: 500;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background-color: var(--secondary-color);
    color: var(--bg-light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(400px);
    transition: var(--transition);
    z-index: 10000;
}

.copy-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* ===========================
   Explanation Section
   =========================== */
.explanation-section {
    background-color: var(--bg-light);
}

.explanation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.explanation-card {
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
}

.explanation-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.explanation-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.explanation-card p {
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.explanation-card ol {
    margin-left: 1.5rem;
}

.explanation-card li {
    margin-bottom: 0.5rem;
}

.formula-box {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: center;
}

.formula-box p {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ===========================
   Examples Section
   =========================== */
.examples-section {
    background-color: var(--bg-gray);
}

.examples-section > .container > p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

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

.example-card {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-color);
}

.example-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.example-card p {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.example-card p strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* ===========================
   FAQ Section
   =========================== */
.faq-section {
    background-color: var(--bg-light);
}

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

.faq-item {
    background-color: var(--bg-gray);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
}

.faq-item:hover {
    background-color: #fff;
    box-shadow: var(--shadow-md);
}

.faq-item h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.faq-item p {
    color: var(--text-dark);
    line-height: 1.8;
}

.faq-item strong {
    color: var(--secondary-color);
}

/* ===========================
   Internal Links Section
   =========================== */
.internal-links-section {
    background-color: var(--bg-gray);
}

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

.link-card {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.link-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.link-card p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.link-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.link-btn:hover {
    background-color: #d4a520;
    transform: scale(1.05);
}

/* ===========================
   Footer Styles
   =========================== */
.footer {
    background-color: var(--secondary-color);
    color: var(--bg-light);
    padding: 3rem 0 1rem;
}

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

.footer-column h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-column p {
    color: #cccccc;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--bg-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444444;
    color: #cccccc;
}

/* ===========================
   Additional Pages Styles
   =========================== */
.page-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a1a1a 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    color: var(--bg-light);
}

.page-header h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.page-header p {
    color: #cccccc;
    font-size: 1.1rem;
}

.page-content {
    padding: 4rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.page-content h2 {
    color: var(--secondary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    text-align: left;
}

.page-content h3 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.page-content ul,
.page-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.page-content li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

/* Contact Form */
.contact-form {
    background-color: var(--bg-gray);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(237, 184, 38, 0.1);
}

.contact-info {
    background-color: var(--bg-gray);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-info strong {
    color: var(--secondary-color);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    /* Mobile Navigation */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--secondary-color);
        transition: var(--transition);
        padding: 4rem 2rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-close {
        display: block;
    }
    
    /* Typography */
    section h1 {
        font-size: 2rem;
    }
    
    section h2 {
        font-size: 1.7rem;
    }
    
    section h3 {
        font-size: 1.3rem;
    }
    
    /* Calculator */
    .calculator-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 1rem;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .result-number {
        font-size: 2.5rem;
    }
    
    /* Grids */
    .explanation-grid,
    .example-grid,
    .faq-grid,
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Copy Notification */
    .copy-notification {
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    section h1 {
        font-size: 1.7rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .result-number {
        font-size: 2rem;
    }
    
    .explanation-card,
    .example-card,
    .faq-item,
    .link-card {
        padding: 1.5rem;
    }
}

/* ===========================
   Performance Optimizations
   =========================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .ad-section,
    .nav-toggle,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
}
/* New CPM Calculator Style */
.new-calc {
    max-width: 500px;
    margin: auto;
}

.step-input {
    display: flex;
    align-items: center;
}

.step-input input {
    flex: 1;
    padding: 10px;
    text-align: center;
}

.step-input button {
    width: 40px;
    height: 40px;
    font-size: 18px;
    border: none;
    background: #edb826;
    cursor: pointer;
}

.step-input button:hover {
    background: #d9a815;
}

/* Remove border around calculator */
.new-calc {
    max-width: 800px;
    margin: auto;
    background: transparent;
    box-shadow: none;
    border: none;
}

/* Wider input boxes */
.input-row {
    display: flex;
    gap: 10px;
}

.input-row input {
    flex: 1;
    padding: 14px;
    font-size: 16px;
}

/* Clear button beside input */
.clear-field {
    padding: 12px 16px;
    background: #edb826;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.clear-field:hover {
    background: #d9a815;
}

/* Warning message */
.warning-message {
    margin-top: 15px;
    color: #d93025;
    font-weight: 600;
}