/* Online Shahar Brand Colors */
:root {
    --primary-color: #1d6bc1; /* Extracted from logo - blue */
    --secondary-color: #304872; /* Darker blue for contrast */
    --accent-color: #f26722; /* Orange from logo */
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --info-color: #304872;
    --text-color: #333;
    --header-bg: #06355f; /* Exact match from onlineshahar.com */
    --red-color: #e31e24; /* Red from logo */
}

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    padding-top: 0;
    scroll-padding-top: 70px; /* Helps with anchor links */
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--header-bg);
}

h2 {
    color: var(--header-bg);
    margin-bottom: 15px;
}

.instructions {
    text-align: center;
    margin-bottom: 30px;
    font-style: italic;
    color: #555;
}

/* Input Form Styles */
.input-form {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.slider-container {
    margin-bottom: 20px;
}

.slider-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="range"] {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.input-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 16px;
}

button {
    display: block;
    width: 200px;
    margin: 10px auto;
    padding: 12px;
    background-color: var(--red-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #cd1b20;
}

/* Charts Styles */
.charts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

canvas {
    width: 100%;
    height: 250px !important;
    max-height: 250px;
}

/* Outputs Styles */
.outputs {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Make metrics row a grid area that spans full width */
.output-grid .metrics-row {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.output-item {
    padding: 15px;
    background-color: #f5f9fc;
    border-radius: 5px;
    border-left: 4px solid var(--primary-color);
}

.output-label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.output-value {
    font-size: 18px;
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .input-form {
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .output-item {
        padding: 12px;
    }
    
    .output-value {
        font-size: 16px;
    }
    
    /* Improved header for tablets */
    .main-header {
        padding: 10px 0;
    }
    
    .company-logo {
        max-height: 50px;
    }
    
    /* Mobile menu toggle button styling */
    .mobile-menu-toggle {
        padding: 8px;
        font-size: 24px;
        background: transparent;
        border: none;
        color: var(--text-color);
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-toggle i {
        position: relative;
        display: block;
        transition: all 0.3s;
    }
}

@media (max-width: 768px) {
    .charts {
        flex-direction: column;
    }
    
    .chart-container {
        width: 100%;
    }
    
    .output-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-row {
        grid-template-columns: 1fr;
    }
    
    .slider-with-input {
        flex-direction: column;
        gap: 10px;
    }
    
    .slider-manual-input {
        width: 100% !important;
    }
    
    .threshold-mode {
        flex-wrap: wrap;
    }
    
    button {
        width: 100%;
    }
    
    /* Hide top bar on mobile */
    .header-top-bar {
        display: none !important;
    }
    
    /* Make main header properly sticky on mobile */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100%;
        padding: 10px 0;
        background-color: #fff;
    }
    
    .main-header.sticky-active {
        padding: 10px 0;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    }
    
    /* Adjust logo size on mobile */
    .company-logo {
        max-height: 45px;
    }
    
    /* Mobile menu improvements */
    .mobile-menu-container {
        width: 280px;
        right: -280px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .output-label {
        font-size: 14px;
    }
    
    .output-value {
        font-size: 15px;
    }
    
    .metrics-row .output-item {
        padding: 10px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    canvas {
        height: 200px !important;
        max-height: 200px;
    }
    
    .page-header {
        padding: 25px 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    /* Enhance back to top for small screens */
    .back-to-top {
        bottom: 15px;
        left: 15px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

.slider-with-input {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-with-input input[type="range"] {
    flex: 1;
}

.slider-manual-input {
    width: 80px !important;
    padding: 5px !important;
    text-align: center;
}

/* Switch styles */
.threshold-mode {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #f5f9fc;
    border-radius: 5px;
    border-left: 4px solid var(--primary-color);
}

.threshold-mode label:first-child {
    margin-right: 15px;
    font-weight: bold;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

.switch input:checked + .slider {
    background-color: var(--primary-color);
}

.switch input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

.switch input:checked + .slider:before {
    transform: translateX(26px);
}

.switch .slider.round {
    border-radius: 24px;
}

.switch .slider.round:before {
    border-radius: 50%;
}

/* Key metrics styling */
.key-metric {
    background-color: #e9f7ef !important;
    border-left: 4px solid #28a745 !important;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu */
.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background-color: white;
    z-index: 999;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding-top: 70px; /* Add space for the header */
}

.mobile-menu-container.active {
    right: 0;
}

.mobile-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.mobile-menu li a {
    padding: 15px 20px;
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
    font-size: 16px;
}

.mobile-menu li a:active,
.mobile-menu li a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.mobile-submenu {
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-submenu.active {
    max-height: 500px;
}

.mobile-submenu li a {
    padding: 12px 30px;
    font-weight: 400;
    font-size: 15px;
}

.mobile-contact {
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: var(--light-color);
}

.mobile-contact a {
    display: block;
    padding: 8px 0;
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
}

.mobile-btn {
    background-color: var(--red-color) !important;
    color: white !important;
    text-align: center;
    margin: 15px 20px;
    border-radius: 6px;
    padding: 12px !important;
}

/* Footer */
.app-footer {
    background-color: var(--header-bg);
    color: rgba(255, 255, 255, 0.8);
    padding: 30px 0;
    margin-top: 50px;
}

.app-footer a {
    color: white;
    text-decoration: none;
}

.app-footer a:hover {
    text-decoration: underline;
}

/* Footer Logo Container */
.footer-logo-container {
    display: inline-block;
    background-color: transparent;
    padding: 0;
    margin-bottom: 15px;
    border-radius: 0;
}

.app-footer .company-logo {
    max-height: 55px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.2);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 900;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--red-color);
}

/* Header Styles */
.header-top-bar {
    background-color: var(--header-bg);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.header-contact a, .header-social a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.header-contact a:hover, .header-social a:hover {
    opacity: 0.8;
    text-decoration: none;
}

.main-header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    transition: padding 0.3s;
}

.main-header.sticky-active {
    padding: 8px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: block;
}

.company-logo {
    max-height: 60px;
    width: auto;
}

/* Navigation Styles */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    display: block;
    transition: color 0.3s;
}

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

.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 100;
    border-radius: 4px;
    padding: 10px 0;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 8px 15px;
    font-weight: 400;
}

/* Button Styles */
.book-meeting-btn {
    display: inline-block;
    background-color: var(--red-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.book-meeting-btn:hover {
    background-color: #cd1b20;
    color: white;
    text-decoration: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: none;
}

.mobile-menu-toggle i.bi-list {
    display: block;
}

.mobile-menu-toggle i.bi-x-lg {
    display: none;
}

.mobile-menu-toggle.active i.bi-list {
    display: none;
}

.mobile-menu-toggle.active i.bi-x-lg {
    display: block;
}

/* Add these styles after your existing styles */
.page-header {
    background-color: #f5f9fc;
    padding: 40px 0;
    border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
    color: var(--header-bg);
    font-weight: 600;
    margin-bottom: 10px;
}

.page-header .lead {
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
}

/* Credential items styling */
.credential-item {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.credential-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.credential-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--header-bg);
}

.credential-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Text Logo Styles (until images are available) */
.text-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--header-bg);
    display: inline-block;
    padding: 5px 0;
    position: relative;
}

.text-logo:before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 30%;
    background-color: var(--red-color);
}

.text-logo-footer {
    font-size: 24px;
    font-weight: 700;
    color: white;
    display: inline-block;
    padding: 5px 0;
    position: relative;
}

.text-logo-footer:before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 30%;
    background-color: var(--red-color);
} 