/* CSS for Pregnancy Calculator */
:root {
    --primary: #2c3e50;
    --secondary: #ff6b6b;
    --accent: #3d5a80;
    --light-bg: #f8f9fa;
    --teal: #4ecdc4;
    --border-color: #e0e0e0;
    --text-color: #000000;
    --text-light: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', Times, serif;
}

body {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #000;
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container styles */
.container {
    max-width: 1400px;
    width: 100%;
    padding: 0 15px;
    flex: 1;
}

.content-wrapper {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    grid-template-areas: 
        "main"
        "mobile-ad"
        "related-tools"
        "left"
        "right";
}

/* Main content area */
.main-content {
    grid-area: main;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.calculator-header {
    background-color: white;
    color: var(--primary);
    text-align: center;
    border-bottom: 2px solid var(--teal);
}

.calculator-header h1 {
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 0.5rem;
    font-family: 'Times New Roman', Times, serif;
}

.calculator-container {
    padding: 1.5rem;
}

/* Sidebars */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.left-sidebar {
    grid-area: left;
}

.right-sidebar {
    grid-area: right;
}

/* Ad styles */
.ad {
    background: var(--light-bg);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #000;
    font-size: 1rem;
    padding: 1rem;
    font-family: 'Times New Roman', Times, serif;
}

#ad-left {
    height: 250px;
}

#ad-right {
    height: 600px;
}

#ad-tablet {
    height: 250px;
    margin-top: 10px;
}

#ad-mobile {
    height: 100px;
    grid-area: mobile-ad;
}

/* Related tools */
.related-tools-box {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
    grid-area: related-tools;
    font-family: 'Times New Roman', Times, serif;
}

.related-tools-box strong {
    color: #000;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--teal);
    font-family: 'Times New Roman', Times, serif;
    display: block;
    font-size: 1.25rem;
}

.tools-list {
    list-style: none;
}

.tools-list li {
    margin-bottom: 0.8rem;
}

.tools-list a {
    display: flex;
    align-items: center;
    color: #000;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
}

.tools-list a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.tools-list i {
    margin-right: 10px;
    color: var(--teal);
    font-size: 1.125rem;
}

/* Calculator form */
.input-section {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-section strong {
    color: #000;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-family: 'Times New Roman', Times, serif;
    display: block;
}

.method-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 1rem;
}

.method-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Times New Roman', Times, serif;
}

.method-card:hover, .method-card.active {
    border-color: var(--teal);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.2);
}

.method-card.active {
    background-color: rgba(78, 205, 196, 0.1);
}

.method-card strong {
    color: #000;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
}

.method-card p {
    font-size: 1rem;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

.method-form {
    display: none;
    animation: fadeIn 0.5s ease;
}

.method-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Times New Roman', Times, serif;
}

.btn-calculate {
    background-color: var(--teal);
    color: white;
}

.btn-calculate:hover {
    background-color: #3dada5;
    transform: translateY(-2px);
}

.btn-reset {
    background-color: var(--secondary);
    color: white;
}

.btn-reset:hover {
    background-color: #e55a5a;
}

/* Results section */
.results-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    display: none;
}

.result-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
    border-top: 4px solid var(--teal);
}

.result-card strong {
    color: #000;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.25rem;
}

.result-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #000;
    margin: 0.5rem 0;
    font-family: 'Times New Roman', Times, serif;
}

.result-description {
    color: #000;
    font-size: 1rem;
    font-family: 'Times New Roman', Times, serif;
}

/* Simple Progress Bar */
.progress-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: none;
    font-family: 'Times New Roman', Times, serif;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #000;
    font-size: 1rem;
}

.progress-bar {
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #2c9c94);
    border-radius: 10px;
    transition: width 1s ease;
}

.progress-milestones {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 1rem;
    color: #000;
}

.progress-milestone {
    position: relative;
    text-align: center;
    width: 33%;
    color: #000;
    font-size: 1rem;
}

.progress-milestone:not(:last-child):after {
    content: '';
    position: absolute;
    top: 10px;
    right: -16%;
    width: 32%;
    height: 2px;
    background: var(--border-color);
}

.progress-milestone.active {
    color: var(--accent);
    font-weight: bold;
}

/* Weekly Amortization Table - Scrollable */
.amortization-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: none;
}

.amortization-section strong {
    color: #000;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.25rem;
}

.table-container {
    overflow: auto;
    max-height: 500px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Times New Roman', Times, serif;
    min-width: 900px;
}

.amortization-table th {
    background-color: var(--light-bg);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #000;
    font-size: 1rem;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.amortization-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    color: #000;
    font-size: 1rem;
}

.amortization-table tr:last-child td {
    border-bottom: none;
}

.amortization-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.trimester-1 { background-color: rgba(78, 205, 196, 0.1) !important; }
.trimester-2 { background-color: rgba(61, 90, 128, 0.1) !important; }
.trimester-3 { background-color: rgba(255, 107, 107, 0.1) !important; }

.week-highlight {
    background-color: rgba(78, 205, 196, 0.3) !important;
    font-weight: bold;
}

.milestone-item {
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
    color: #000;
    font-size: 1rem;
}

.milestone-item:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--teal);
}

/* Visualization */
.visualization-section {
    margin-top: 2rem;
    display: none;
}

.visualization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.visual-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Times New Roman', Times, serif;
}

.visual-card i {
    font-size: 3rem;
    color: var(--teal);
    margin-bottom: 1rem;
}

.visual-card strong {
    color: #000;
    margin-bottom: 0.5rem;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.25rem;
}

/* Export buttons */
.export-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-top: 2rem;
    display: none;
}

.export-section strong {
    color: #000;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.25rem;
}

.export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.export-btn {
    flex: 1;
    min-width: 150px;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    background-color: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Times New Roman', Times, serif;
}

.export-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.export-btn.pdf {
    background-color: #e74c3c;
}

.export-btn.image {
    background-color: #3498db;
}

.export-btn.print {
    background-color: #2c3e50;
}

/* Detailed results */
.detailed-results {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: none;
}

.detailed-results strong {
    color: #000;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--teal);
    padding-bottom: 0.5rem;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.25rem;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 1rem;
}

.detail-card {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.detail-card strong {
    color: #000;
    margin-bottom: 0.5rem;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    border: none;
    padding: 0;
}

.detail-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #000;
    margin: 0.5rem 0;
    font-family: 'Times New Roman', Times, serif;
}

.milestone-list {
    list-style: none;
    margin-top: 1rem;
    text-align: left;
}

.milestone-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: #000;
    font-size: 1rem;
}

.milestone-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--teal);
    font-weight: bold;
}

/* H2 elements with special color */
h2 {
    color: #ff6b6b;
    font-size: 1.375rem;
}

h3 {
    color: #000;
    font-size: 1.25rem;
}

h4 {
    color: #000;
    font-size: 1.125rem;
}

/* Responsive Design */
@media (min-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "main"
            "tablet-ad"
            "related-tools"
            "left"
            "right";
    }
    
    #ad-tablet {
        grid-area: tablet-ad;
        display: flex;
        margin: 0 auto;
    }
    
    #ad-mobile, #ad-left, #ad-right {
        display: none;
    }
    
    .related-tools-box {
        margin-top: 0;
    }
    
    .method-selector {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    /* Tablet responsive headings */
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
    
    h4 {
        font-size: 1rem;
    }
}

@media (min-width: 1025px) {
    .content-wrapper {
        grid-template-columns: 300px 1fr 300px;
        grid-template-areas: "left main right";
    }
    
    #ad-left, #ad-right, #related-tools {
        display: block;
    }
    
    #ad-tablet, #ad-mobile {
        display: none;
    }
    
    .sidebar {
        position: sticky;
        top: 20px;
        align-self: start;
    }
    
    .method-selector {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    /* Desktop responsive headings */
    .calculator-header h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.375rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h4 {
        font-size: 1.125rem;
    }
}

@media (max-width: 767px) {
    #ad-mobile {
        display: flex;
        margin: 0 auto;
    }
    
    #ad-tablet, #ad-left, #ad-right {
        display: none;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .results-section, .visualization-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile responsive headings */
    .calculator-header h1 {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.125rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    h4 {
        font-size: 0.9375rem;
    }
    
    /* Mobile tab text size */
    .tools-list a {
        font-size: 0.875rem;
    }
}

/* Add breadcrumb styles */
.breadcrumb {
    padding: 0px 10px;
    color: #000;
    margin-bottom: 5px;
    font-size: 1rem;
}

.breadcrumb a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.mobile-table {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 8px;
}

.mobile-table table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.mobile-table th, .mobile-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    color: #000;
    font-size: 1rem;
}

.mobile-table th {
    background-color: #4ecdc4;
    font-weight: bold;
    color: white;
    font-size: 1rem;
}

.mobile-table tr:nth-child(even) {
    background-color: #fafafa;
}