/* Global Styles */
body {
    font-family: 'Open Sans', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Header */
.site-header {
    background-color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.site-title {
    font-size: 20px;
    font-weight: bold;
    color: #444;
}

.site-nav {
    display: flex;
    align-items: center;
}

.site-nav a {
    margin-left: 20px;
    color: #666;
    font-size: 14px;
}

.search-icon {
    margin-left: 20px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero h1 {
    font-size: 42px;
    font-weight: 300;
    margin: 0;
    padding: 0 20px;
}

/* Main Content Container */
.container {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Grid Layout for Home */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: auto;
    display: block;
}

.card-link {
    display: block;
}

/* Charts Grid container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.chart-widget {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 180px;
    /* Specific height for Mini Symbol Overview widget */
}

/* Secondary Pages Specifics */
.page-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('img/page-header-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 30px;
    padding-left: 40px;
    color: white;
}

.page-header h1 {
    font-size: 32px;
    border-bottom: 4px solid #f1c40f;
    /* Yellow underline */
    display: inline-block;
    padding-bottom: 5px;
    margin: 0;
}

.content-section {
    background: #fff;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.button-row {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-brown {
    background-color: #8d6e63;
    color: white;
    padding: 10px 20px;
    border-radius: 2px;
    font-weight: bold;
    text-align: center;
    min-width: 120px;
    transition: background 0.3s;
}

.btn-brown:hover {
    background-color: #6d4c41;
}

.text-content p {
    margin-bottom: 1.5em;
    font-size: 16px;
    color: #444;
}

.text-content h1,
.text-content h2 {
    color: #333;
}

/* Footer Redesign */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0 20px 0;
    margin-top: 60px;
    font-size: 14px;
    text-align: center;
}

.simple-footer {
    margin-bottom: 15px;
}

.simple-footer a {
    color: #bdc3c7;
    text-decoration: none;
    padding: 0 10px;
    font-weight: 600;
    transition: color 0.2s;
}

.simple-footer a:hover {
    color: #f1c40f;
}

.footer-bottom {
    color: #7f8c8d;
    font-size: 13px;
    margin-top: 20px;
}

/* News List Styles */
.news-item:hover h3 {
    color: #8d6e63 !important;
}

/* User Message Popup */
.message-popup {
    position: fixed;
    bottom: -450px;
    /* Hidden initially */
    right: 30px;
    width: 320px;
    background: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Open Sans', sans-serif;
}

.message-popup.show {
    bottom: 0px;
}

.message-popup-header {
    background: #2c3e50;
    color: white;
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #f1c40f;
}

.message-popup-body {
    padding: 20px;
}

.popup-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 13px;
}

.popup-input:focus {
    border-color: #8d6e63;
    outline: none;
}

.popup-textarea {
    resize: none;
    height: 80px;
}

.popup-submit {
    width: 100%;
    background: #8d6e63;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s;
}

.popup-submit:hover {
    background: #6d4c41;
}

/* Language Selector Bottom Left */
.language-selector {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    /* Below message popup */
    background: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
}

/* Hide annoying google top bar if possible */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

/* Responsive */
@media (max-width: 900px) {
    .charts-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group label {
        width: auto;
        text-align: left;
        margin-bottom: 8px;
    }

    .auth-form .btn-brown {
        margin-left: 0 !important;
        width: 100%;
    }
}

/* Authentication Forms & Dashboard */
.form-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Softer, larger shadow for depth */
    border: 1px solid #eaeaea;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.form-group label {
    width: 140px;
    flex-shrink: 0;
    margin-bottom: 0px;
    margin-right: 15px;
    text-align: right;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-control:focus {
    border-color: #8d6e63;
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.15);
    /* Soft brown glow */
}

.auth-form .btn-brown {
    margin-top: 25px !important;
    margin-left: 155px;
    /* Aligns with input field (140px label + 15px margin) */
    width: calc(100% - 155px);
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(141, 110, 99, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form .btn-brown:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(141, 110, 99, 0.3);
}

.auth-form .btn-brown:active {
    transform: translateY(0);
}

/* Redesigned Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px !important;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.alert-danger {
    background-color: #fdf3f4;
    border-left: 4px solid #d9534f;
    color: #b52b27 !important;
}

.alert-success {
    background-color: #f4fdf8;
    border-left: 4px solid #28a745;
    color: #1e7e34 !important;
}

.nav-btn {
    margin-left: 15px;
    background-color: #f1c40f;
    color: #333 !important;
    padding: 8px 18px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: #e5b700;
    box-shadow: 0 2px 5px rgba(241, 196, 15, 0.3);
}

.nav-welcome {
    margin-left: 15px;
    font-size: 14px;
    color: #555;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-welcome:hover {
    color: #8d6e63;
}