/* Modern CSS styling for calculator websites */
:root {
    --primary-color: #4a6fa5;
    --primary-dark: #395782;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --light-gray: #f0f0f0;
    --border-color: #ddd;
    --success-color: #28a745;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: white;
    margin: 0;
    padding: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    /* position: sticky; */
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    color: var(--primary-color);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
/* 
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
    text-decoration: underline;
} */

h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h2 {
    font-size: 1.6rem;
    margin: 1.5rem 0 1rem;
    color: var(--primary-dark);
}

h3 {
    font-size: 1.3rem;
    margin: 1.2rem 0 0.8rem;
}

p {
    margin-bottom: 1rem;
}

/* Calculator Input Styles */
.calculator {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.input-group {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.input-group label {
    width: 100px;
    font-weight: 600;
}

input[type="number"] {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    width: 200px;
}

.result {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.6rem;
    background-color: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    min-width: 200px;
    min-height: 41px;
    display: inline-flex;
    align-items: center;
}

/* Conversion widget (inline calculator) */
#conversion-widget {
    background-color: var(--secondary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#conversion-widget input {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    margin-right: 0.5rem;
}

#result {
    font-weight: 600;
    color: var(--primary-color);
}

/* Content section */
.content {
    margin-top: 2rem;
}

.content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

/* Home page specific styles */
.hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.categories-container {
    margin: 2rem 0;
}

.category-section {
    margin-bottom: 3rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.calculator-card {
    padding: 1.5rem;
    background-color: var(--secondary-color);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

.calculator-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}

.calculator-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.calculator-card p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.use-now {
    margin-top: auto;
    align-self: flex-start;
    color: var(--primary-color);
    font-weight: 500;
}

.about-section {
    max-width: 800px;
    margin: 3rem auto;
    text-align: center;
}

/* Category page styles */
.category-description {
    margin: 2rem 0;
    max-width: 800px;
}

.back-link {
    margin-top: 2rem;
}

/* Footer styles */
footer {
    background-color: var(--secondary-color);
    padding: 2.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.coming-soon {
    color: #999;
    cursor: default;
}

.creator-credit {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        padding: 0.8rem 0;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .input-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .input-group label {
        margin-bottom: 0.5rem;
    }
    
    input[type="number"], .result {
        width: 100%;
    }
}

/* ===== Cookie Consent Styles ===== */

/* Cookie consent banner styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none;
    animation: slideUp 0.3s ease-out;
}

.cookie-consent-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: #3498db;
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.cookie-consent-btn-accept-all {
    background: #27ae60;
    color: white;
}

.cookie-consent-btn-accept-all:hover {
    background: #229954;
}

.cookie-consent-btn-essential {
    background: #95a5a6;
    color: white;
}

.cookie-consent-btn-essential:hover {
    background: #7f8c8d;
}

.cookie-consent-btn-settings {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.cookie-consent-btn-settings:hover {
    background: rgba(255,255,255,0.1);
}

/* Cookie settings modal */
.cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    color: #333;
}

.cookie-settings-header {
    margin-bottom: 20px;
}

.cookie-settings-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.cookie-category {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.cookie-category p {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 50px;
    height: 24px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #27ae60;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(26px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-settings-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
    }

    .cookie-consent-buttons {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-consent-btn {
        flex: 1;
    }
}