/* -------------------------------------------------------
   Global Reset and Normalization
------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #fff;
}

/* Normalize HTML5 Block Elements */
main, section, header, footer, nav, aside {
    display: block;
    width: 100%;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/Webroot/images/dale-harbour-bg.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    z-index: -1;
}

textarea {
    width: 100%;
    font-size: 1em;
    padding: 10px;
    resize: vertical;
}

/* -------------------------------------------------------
   Header
------------------------------------------------------- */
header {
    background: linear-gradient(to bottom, #252525, #fcfcfc);
    height: 100px;
    max-height: 100px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo img {
    height: 100px;
    width: auto;
}

.right-side {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu {
    display: flex;
    gap: 20px;
    font-size: 1.2em;
}

.nav-menu a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
}

.nav-menu a:hover {
    text-decoration: underline;
}

.menu-icon {
    font-size: 2em;
    cursor: pointer;
    display: none;
}

/* -------------------------------------------------------
   Main Container
------------------------------------------------------- */
main {
    flex: 1;
    padding: 120px 20px 20px 20px; /* Top padding to clear the fixed header */
}

/* General container for centering content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
}

/* -------------------------------------------------------
   Buttons (Homepage Hero)
------------------------------------------------------- */
.main-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 200px);
    gap: 40px;
    flex-wrap: wrap;
}

.button-card {
    padding: 15px 20px;
    text-align: center;
    border-radius: 8px;
    border: 3px solid;
    background-color: #999999;
    color: #FFFFFF;
    font-size: 1.2em;
    font-weight: bold;
    min-width: 250px;
    transition: all 0.3s ease;
    cursor: pointer;

    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 2s forwards;
}

.button-card.buy {
    border-color: #A72D2B;
}

.button-card.sell {
    border-color: #3A3D42;
}

.button-card:hover {
    background-color: #3A3D42;
    color: #FFFFFF;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------------------------------------------------
    Tables and Div
------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #A72D2B;
    color: #fff;
}

.clients-header a {
    color: #A72D2B;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
}

.clients-header a:hover {
    text-decoration: underline;
}

table td:first-child,
table th:first-child {
    text-align: center;
    width: 40px;
}

.cma-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.cma-steps .step {
    padding: 6px 12px;
    border-radius: 5px;
    background-color: #f0f0f0;
    color: #333;
    font-weight: bold;
}

.cma-steps .step.active {
    background-color: #A72D2B;
    color: #fff;
}

.cma-steps-bar a.active {
    background-color: #A72D2B;
    color: #fff;
}

select[multiple] {
    width: 100%;
    height: auto;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 1em;
}

.pages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.pages-box {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    font-size: 0.9em;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pages-box ul {
    flex-grow: 1;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.pages-box ul li {
    padding: 8px 12px;
    margin-bottom: 6px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.pages-box ul li:hover {
    background-color: #eaeaea;
}

.pages-box li.selected {
    background-color: #e3e3e3;
    border-color: #A72D2B;
    font-weight: bold;
}

.central-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
}
.central-controls button {
    background-color: #A72D2B;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}
.central-controls button:hover {
    background-color: #3A3D42;
}

.controls button {
    background: none;
    border: none;
    font-size: 1em;
    cursor: pointer;
    margin-left: 6px;
}

.bottom-controls, .bottom-link {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.bottom-controls button,
.bottom-link a {
    background-color: #A72D2B;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
}

.bottom-controls button:hover,
.bottom-link a:hover {
    background-color: #3A3D42;
}

.pro-tip-box {
    background: #fff4cc;
    padding: 10px 15px;
    border-left: 6px solid #ffc107;
    margin-top: 30px;
    font-size: 0.95em;
    border-radius: 6px;
}

.cma-steps-bar {
    background: #f4f4f4;
    padding: 12px 20px;
    border-bottom: 2px solid #ccc;
    margin-bottom: 20px;
}
.cma-steps-bar ul {
    display: flex;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.cma-steps-bar li a {
    text-decoration: none;
    font-weight: bold;
    color: #333;
    padding: 6px 10px;
    border-radius: 4px;
}
.cma-steps-bar li a:hover {
    background-color: #A72D2B;
    color: #fff;
}

/* -------------------------------------------------------
   Footer
------------------------------------------------------- */
footer {
    background: rgb(109, 2, 2);
    padding: 1em;
    text-align: center;
    color: #fff;
}

/* -------------------------------------------------------
   Sections Styling
------------------------------------------------------- */
.scroll-section {
    padding: 80px 20px;
    margin-bottom: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: stretch;
    text-align: left;
    background-color: rgba(255,255,255,0.8);
    color: #000;
    overflow-x: hidden;
}

/* Section Layout Variations */
.section-default {
    padding: 40px 20px;
    margin-bottom: 40px;
    min-height: auto;
    display: block;
    background-color: rgba(255,255,255,0.8);
    color: #000;
    text-align: left;
}

.section-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.section-image-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-image-left img {
    width: 250px;
    height: 250px;
    object-fit: cover;
}

.section-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.section-three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.section-wrap-text img {
    float: left;
    margin: 0 20px 20px 0;
    width: 250px;
    height: 250px;
    object-fit: cover;
}

.section-leftMenu-RightContent {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    padding: 40px 20px;
}

.admin-side-menu {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.admin-side-menu h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.admin-side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-side-menu li {
    margin-bottom: 12px;
}

.admin-side-menu a {
    text-decoration: none;
    color: #A72D2B;
    font-weight: bold;
    display: block;
    transition: background-color 0.2s ease;
    padding: 8px 12px;
    border-radius: 5px;
}

.admin-side-menu a:hover {
    background-color: #f1f1f1;
}

.admin-dashboard-content {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    color: #000; /* Add this */
}



/* -------------------------------------------------------
   Back to Top Button
------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #A72D2B;
    color: #ffffff;
    text-align: center;
    line-height: 50px;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #3A3D42;
}

/* -------------------------------------------------------
   Mobile Responsive Fixes
------------------------------------------------------- */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .menu-icon {
        display: block;
    }

    .main-buttons {
        flex-direction: column;
        justify-content: flex-end;
        height: 100%;
        padding-bottom: 30px;
    }

    .section-two-columns {
        grid-template-columns: 1fr;
    }

    .section-three-columns {
        grid-template-columns: 1fr;
    }

    .section-image-left {
        flex-direction: column;
        text-align: center;
    }

    .section-image-left img {
        margin: 0 auto;
    }

    .background-image {
        background-attachment: scroll;
        background-position: center top;
        background-size: cover;
    }

    .section-leftMenu-RightContent {
        grid-template-columns: 1fr;
    }
}

.links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.links a {
    text-decoration: none;
    color: white;
    background-color: #007BFF;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s ease;
}
.links a:hover {
    background-color: #0056b3;
}




/* -------------------------------------------------------
   Admin Login Form Styling
------------------------------------------------------- */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-form {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    color: #000;
}

.login-form h1 {
    margin-bottom: 20px;
    text-align: center;
}

.login-form label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.login-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-form button {
    width: 100%;
    background-color: #A72D2B;
    color: #fff;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.login-form button:hover {
    background-color: #3A3D42;
}

.error-message {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}

/* Logout Button */
.logout-button {
    display: inline-block;
    background-color: #3A3D42;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.logout-button:hover {
    background-color: #A72D2B;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.dashboard-box {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    font-size: 1.1em;
    font-weight: bold;
}
