:root {
    --primary-color: #800000;
    --secondary-color: #a52a2a;
    --accent-color: #d4af37;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --font-family: 'Segoe UI', Roboto, "Helvetica Neue", Arial, sans-serif;
    --transition-speed: 0.3s;
}

body {
    font-family: var(--font-family) !important;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-color);
}

/* Modern Button Styles */
.btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

/* Card / Container Styles */
.container {
    max-width: 1200px;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed);
    background: var(--card-bg);
    overflow: hidden;
}

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

/* Drag and Drop Zone */
.upload-area {
    border: 3px dashed #ccc;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    background-color: #fff;
    transition: all var(--transition-speed);
    cursor: pointer;
    position: relative;
    margin: 20px auto;
    max-width: 600px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(128, 0, 0, 0.05);
}

.upload-area img {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    transition: transform var(--transition-speed);
}

.upload-area:hover img {
    transform: scale(1.1);
}

.upload-area p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

#nav {
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding: 0.3em 0;
    -webkit-overflow-scrolling: touch;
}

#nav > ul {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
    min-width: min-content;
    padding: 0 8px;
}

#nav > ul > li {
    flex: 0 0 auto;
    white-space: nowrap;
}

#nav ul li a {
    font-weight: 500;
    transition: color var(--transition-speed);
    padding: 0.3em 0.5em;
    font-size: 0.88em;
    line-height: 1.05;
    display: inline-block;
}

@media screen and (max-width: 768px) {
    #nav ul li a {
        font-size: 0.78em;
        padding: 0.28em 0.45em;
        line-height: 1.05;
    }
}

#nav ul li a:hover {
    color: var(--accent-color);
}

/* Footer Modernization */
#footer {
    background: #2c3e50;
    color: #fff;
    padding: 40px 0;
}

/* Fix Contact Us Section Alignment */
#footer .container {
    padding-left: 30px;
    padding-right: 30px;
}

#footer .row {
    margin-left: -20px;
    margin-right: -20px;
}

#footer .row > .col-6 {
    padding-left: 20px;
    padding-right: 20px;
}

@media screen and (max-width: 736px) {
    #footer .row > .col-12-mobile {
        width: 100%;
    }
}

/* Responsive Tweaks */
@media screen and (max-width: 768px) {
    .upload-area {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
}

/* Fix Header Overlap */
#nav {
    white-space: normal;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding: 0.8em 0.4em;
    -webkit-overflow-scrolling: touch;
}

#nav > ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 6px 8px;
    min-width: max-content;
    padding: 0 8px;
    line-height: 1.25;
    height: auto;
    border-left: 0;
    border-right: 0;
}

#nav > ul:before,
#nav > ul:after {
    display: none; /* Remove the decorative lines that cause overlap issues */
}

#nav > ul > li {
    flex: 0 1 auto;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

#nav > ul > li > a,
#nav > ul > li > span {
    display: inline-block;
    padding: 0.45em 0.7em;
    font-size: clamp(0.8rem, 1vw, 0.92rem);
    line-height: 1.12;
    border: 1px solid transparent;
    border-radius: 0.55em;
    background: transparent;
}

#nav > ul > li > a:hover,
#nav > ul > li > a:focus,
#nav > ul > li.current > a {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.12);
}

/* Let nav wrap/scroll only on narrow viewports */
@media screen and (max-width: 980px) {
    #nav {
        overflow-x: auto;
    }

    #nav > ul {
        flex-wrap: wrap;
    }
}

/* Increase Contact Image Size */
#footer .icon.circled {
    width: 6em;
    height: 6em;
    line-height: 6em;
    font-size: 1.25em;
}

#footer .icon.circled img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Loading Animation */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s ease infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fix Header Consistency */
#header {
    padding: 5em 0 1em 0 !important;
}

/* Active Navigation State */
#nav > ul > li.current {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#nav > ul > li.current a {
    color: #fff !important;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}
