/* style.css - Main stylesheet for gaminantis.lt */
:root {
    --primary-color: #005f73;
    --secondary-color: #0077b6;
    --highlight-color: #d4edda;
    --text-color: #333;
    --background-color: #ffffff;
    --light-gray: #f4f7f6;
    --border-color: #dee2e6;
    --positive-color: #155724;
    --negative-color: #721c24;
}

body.dark-mode {
    --primary-color: #48cae4;
    --secondary-color: #0096c7;
    --highlight-color: #023e8a;
    --text-color: #e9ecef;
    --background-color: #121212;
    --light-gray: #1f1f1f;
    --border-color: #495057;
    --positive-color: #90ee90;
    --negative-color: #f8d7da;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    transition: background-color 0.3s, color 0.3s;
}

.main-container {
    width: 100%;
    max-width: 960px;
    background-color: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

/* Theme Toggle Button */
.theme-toggle-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Header and Logo Styles */
.site-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}
.site-logo {
    max-width: 50px;
    height: auto;
}
.header-title-link {
    text-decoration: none;
}
.site-header h1 {
    margin: 0;
    text-align: left;
    font-size: 28px;
    color: var(--primary-color);
}

/* Main Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.nav-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 6px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}
.nav-link.active, .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--light-gray);
}
.nav-link.active {
    border-bottom-color: var(--primary-color);
}

h2, h3 {
    color: var(--primary-color);
    text-align: center;
}
h2 { margin-bottom: 20px; }
h3 { text-align: left; margin-top: 25px; border-bottom: 2px solid var(--primary-color); padding-bottom: 5px; }

/* Hero Section (for index.html) */
.hero-section {
    text-align: center;
    padding: 40px 20px;
}
.hero-section .subtitle {
    font-size: 1.2em;
    color: #555;
    max-width: 600px;
    margin: 15px auto 30px auto;
    line-height: 1.6;
}
body.dark-mode .hero-section .subtitle {
    color: #adb5bd;
}
.cta-button {
    font-size: 1.2em;
    padding: 15px 30px;
}

/* Content Section (for index.html, about.html etc.) */
.content-section {
    padding: 10px 0;
    line-height: 1.7;
}
.content-section ul {
    list-style-type: '✅ ';
    padding-left: 20px;
    line-height: 1.8;
}
.content-section h3 {
    text-align: center;
}
.content-section p, .content-section ul {
    margin-bottom: 1.5em;
}


/* Form & Calculator */
.calculator-intro { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); line-height: 1.6; }
.calculator-intro h2 { text-align: left; }
.calculator-intro h3 { border-bottom: none; font-size: 1.1em; margin-top: 15px; }
.calculator-intro ul { list-style-type: none; padding-left: 0; }
.calculator-intro ul li { margin-bottom: 8px; }

.form-section { margin-bottom: 25px; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; }
.form-section:last-child { border-bottom: none; }
.input-group { margin-bottom: 20px; position: relative; }
label { display: block; margin-bottom: 8px; font-weight: 600; color: #003440; display: flex; align-items: center; gap: 8px; }
body.dark-mode label { color: #ced4da; }
input[type="number"], input[type="range"], select { width: 100%; box-sizing: border-box; }
input[type="number"], select { padding: 10px; border: 1px solid var(--border-color); border-radius: 6px; font-size: 16px; background-color: var(--background-color); color: var(--text-color); }
.button, .action-button { display: inline-block; padding: 12px 25px; background-color: var(--secondary-color); color: white; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease; text-align: center; }
.button:hover { background-color: #005f8a; }
.action-button { font-size: 14px; padding: 8px 15px; background-color: #6c757d; }
.action-button:hover { background-color: #5a6268; }
.actions-container { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Results & Comparison */
#all-results-block {
    margin-top: 30px;
}
.comparison-summary { background-color: #eaf4f4; border-left: 5px solid var(--primary-color); padding: 20px; margin-bottom: 30px; font-size: 1.1em; line-height: 1.6; }
body.dark-mode .comparison-summary { background-color: #0353a4; border-left-color: #48cae4;}
.comparison-summary p { margin: 5px 0; }
.comparison-summary .savings { font-size: 1.3em; font-weight: bold; color: var(--positive-color); }
.comparison-summary .no-savings { font-weight: bold; color: var(--primary-color); }

/* Table */
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.95em; }
th, td { padding: 12px 10px; border: 1px solid var(--border-color); text-align: left; vertical-align: middle; }
th { background-color: #eaf4f4; color: var(--primary-color); font-weight: bold; text-align: center; }
body.dark-mode th { background-color: #2b2b2b; }
.best-plan { background-color: var(--highlight-color); font-weight: bold; color: #155724; }
body.dark-mode .best-plan { color: var(--background-color); }
.best-plan td:first-child::before { content: '🏆 '; }
.plan-description { font-size: 0.9em; color: #555; max-width: 300px; }
body.dark-mode .plan-description { color: #adb5bd; }
.current-plan-row { background-color: #e9ecef; }
body.dark-mode .current-plan-row { background-color: #343a40; }
.savings-col { text-align: center; font-weight: bold; }
.positive-savings { color: var(--positive-color); }
.negative-savings { color: var(--negative-color); }

/* Tooltip */
.tooltip { position: relative; cursor: help; }
.tooltip .tooltip-text { visibility: hidden; width: 250px; background-color: #555; color: #fff; text-align: center; border-radius: 6px; padding: 8px; position: absolute; z-index: 1; bottom: 125%; left: 50%; margin-left: -125px; opacity: 0; transition: opacity 0.3s; }
.tooltip:hover .tooltip-text { visibility: visible; opacity: 1; }

/* Slider */
.slider-group { display: flex; align-items: center; gap: 15px; }
.slider-group output { font-weight: bold; color: var(--primary-color); min-width: 40px; }

/* Articles Page Specific */
.article {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.article:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.article ul { list-style-type: '✔ '; padding-left: 20px; }
.article h3 { text-align: left; }

.hidden { display: none; }

/* Footer */
footer { text-align: center; margin-top: 10px; color: #777; font-size: 0.9em; }
footer a { color: #555; text-decoration: none; }
footer a:hover { text-decoration: underline; }
body.dark-mode footer a { color: #999; }

/* Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.modal-content { background-color: var(--background-color); margin: 15% auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 600px; border-radius: 8px; text-align: center; }
.modal-content h3 { margin-top: 0; }
.modal-content input { width: 100%; padding: 8px; margin: 10px 0; box-sizing: border-box; background-color: var(--light-gray); color: var(--text-color); border: 1px solid var(--border-color); }
.close-button { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
}
#toast.show {
    visibility: visible;
    opacity: 1;
}

/* Print styles */
@media print {
    body {
        background-color: #fff !important;
        color: #000 !important;
    }
    .main-container {
        box-shadow: none;
        padding: 0;
        border: none;
    }
    .site-header, .main-nav, .calculator-intro, #calculator-form, .theme-toggle-button, .actions-container, footer, .modal {
        display: none !important;
    }
    #all-results-block, #results-container, .comparison-summary {
        display: block !important;
    }
    .best-plan {
        background-color: #d4edda !important;
        -webkit-print-color-adjust: exact; 
        print-color-adjust: exact;
    }
    .current-plan-row {
        background-color: #e9ecef !important;
        -webkit-print-color-adjust: exact; 
        print-color-adjust: exact;
    }
    .comparison-summary {
        background-color: #eaf4f4 !important;
        -webkit-print-color-adjust: exact; 
        print-color-adjust: exact;
        border: none;
    }
}
/* FAQ Section Styles */
.faq-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-item h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
    text-align: left;
}
.faq-item p {
    margin: 0;
    color: var(--text-color);
}