/* Import Ubuntu font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700&display=swap');

/* Reset and base styles */
body {
    font-family: "Ubuntu", sans-serif !important; /* Force Ubuntu font */
    font-size: 16px;
    padding-top: 56px; /* Adjusted for default navbar height, refine as needed */
    background-color: #fff !important; /* Force white body background */
}

a, .nav a, .social-links a, .btn:not(.btn-success):not(.btn-danger), .nav-link {
    text-decoration: none !important;
    color: #666 !important;
    font-weight: bold;
}
a:hover, .nav a:hover, .social-links a:hover, .btn:not(.btn-success):not(.btn-danger):hover, .nav-link:hover {
    text-decoration: none !important;
    color: #555 !important;
    font-weight: bold;
}

/* Navbar specific styles */
.navbar {
    padding: 0.5rem 1rem; /* Reduced padding for mobile */
}

.navbar-brand img {
    max-width: 80px; /* Smaller logo for mobile */
    height: auto;
    transition: max-width 0.3s ease; /* Smooth scaling */
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.nav-item {
    margin-right: 15px;
}

.nav-link {
    padding: 8px 15px;
    font-size: 1rem;
}

.nav {
    margin-bottom: 20px;
}

.error {
    color: #ac3939;
    margin-bottom: 20px;
}
.success {
    color: #2d8659;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 20px;
}
.form-label {
    font-size: 1.1rem;
    font-weight: 500;
}
.form-control, .form-select {
    font-size: 1rem;
    min-height: 44px;
    padding: 10px;
}
textarea.form-control {
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
}
input[type="submit"], .btn-primary, .btn:not(.btn-success):not(.btn-danger) {
    font-size: 1.1rem;
    padding: 12px 24px;
    background-color: #666 !important;
    color: #fff !important;
    border: none !important;
}
input[type="submit"]:hover, .btn-primary:hover, .btn:not(.btn-success):not(.btn-danger):hover {
    background-color: #555 !important;
    color: #fff !important;
}

/* Allow Bootstrap's btn-success and btn-danger to use their default colors */
.btn-success {
    background-color: #198754 !important; /* Bootstrap green */
    color: #fff !important;
    border: none !important;
}
.btn-success:hover {
    background-color: #157347 !important; /* Darker green on hover */
    color: #fff !important;
}
.btn-danger {
    background-color: #dc3545 !important; /* Bootstrap red */
    color: #fff !important;
    border: none !important;
}
.btn-danger:hover {
    background-color: #bb2d3b !important; /* Darker red on hover */
    color: #fff !important;
}

img.logo-preview {
    max-width: 100px;
    margin-top: 10px;
}
img.logo {
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px;
}
.gallery img {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    margin: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.gallery-caption {
    font-size: 0.9rem;
    text-align: center;
    margin-top: 5px;
    color: #333;
}

.bg-overlay.video {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 3;
    background-color: #ffffff;
}

/* Banner styling */
.section-bg-video {
    position: relative;
    width: 100%;
    height: clamp(200px, 40vh, 400px);
    overflow: hidden;
    background-color: #fff !important;
    box-sizing: border-box;
}
.section-bg-video .grunge-border {
    background-color: #fff !important;
    border: none !important;
}
.section-bg-video .container {
    background-color: #fff !important;
}
.section-bg-video:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff !important;
    z-index: -1;
}
.videobox {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
.section-bg-video video,
.section-bg-video img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    box-sizing: border-box;
}
.bg-overlay.transparent-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}
.overlay-content {
    position: relative;
    z-index: 2;
}

/* Square logo style */
.square-logo {
    width: 100%;
    max-width: 410px;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0 auto;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1/1) {
    .square-logo {
        position: relative;
        width: 100%;
        max-width: 410px;
        height: 0;
        padding-bottom: 100%;
    }
    .square-logo img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .square-logo {
        max-width: 350px;
    }
    .section-bg-video {
        height: clamp(150px, 30vh, 300px);
        background-color: #fff !important;
    }
    .section-bg-video .grunge-border {
        background-color: #fff !important;
    }
    .section-bg-video .container {
        background-color: #fff !important;
    }
    .navbar-brand img {
        max-width: 60px; /* Smaller logo on medium screens */
    }
    body {
        padding-top: 50px; /* Adjust for smaller navbar height */
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
        padding-top: 50px; /* Ensure content isn’t hidden */
    }
    .form-label {
        font-size: 1rem;
    }
    .form-control, .form-select {
        font-size: 0.9rem;
        min-height: 40px;
        padding: 8px;
    }
    textarea.form-control {
        font-size: 0.9rem;
        min-height: 80px;
    }
    input[type="submit"], .btn-primary, .btn:not(.btn-success):not(.btn-danger) {
        font-size: 1rem;
        padding: 10px 20px;
        background-color: #666 !important;
        color: #fff !important;
    }
    input[type="submit"]:hover, .btn-primary:hover, .btn:not(.btn-success):not(.btn-danger):hover {
        background-color: #555 !important;
        color: #fff !important;
    }
    .btn-success {
        font-size: 1rem;
        padding: 10px 20px;
    }
    .btn-success:hover {
        background-color: #157347 !important; /* Darker green on hover */
    }
    .btn-danger {
        font-size: 1rem;
        padding: 10px 20px;
    }
    .btn-danger:hover {
        background-color: #bb2d3b !important; /* Darker red on hover */
    }
    img.logo {
        max-width: 250px;
        max-height: 250px;
    }
    .gallery img {
        max-width: 150px;
        max-height: 150px;
    }
    .gallery-caption {
        font-size: 0.8rem;
    }
    .square-logo {
        max-width: 250px;
    }
    .section-bg-video {
        height: clamp(100px, 25vh, 250px);
        background-color: #fff !important;
    }
    .section-bg-video .grunge-border {
        background-color: #fff !important;
    }
    .section-bg-video .container {
        background-color: #fff !important;
    }
    .navbar-brand img {
        max-width: 50px; /* Even smaller on small screens */
    }
    .nav-link {
        padding: 0.5rem 1rem; /* Larger touch targets */
        font-size: 0.9rem; /* Slightly smaller text */
    }
    .navbar-nav {
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start; /* Align to start */
    }
    .nav-item {
        width: 100%; /* Full width */
        margin-right: 0; /* Remove margin */
    }
    .navbar-toggler {
        padding: 0.25rem 0.75rem; /* Smaller padding */
        font-size: 1rem; /* Readable icon */
    }
}

@media (min-width: 992px) {
    .navbar-nav {
        flex-direction: row !important;
    }
    .nav-item {
        margin-right: 15px;
    }
    .navbar-brand img {
        max-width: 100px; /* Original size on desktop */
    }
    body {
        padding-top: 80px; /* Original padding on desktop */
    }
    input[type="submit"], .btn-primary, .btn:not(.btn-success):not(.btn-danger) {
        font-size: 1.1rem;
        padding: 12px 24px;
    }
    input[type="submit"]:hover, .btn-primary:hover, .btn:not(.btn-success):not(.btn-danger):hover {
        background-color: #555 !important;
    }
    .btn-success {
        font-size: 1.1rem;
        padding: 12px 24px;
    }
    .btn-danger {
        font-size: 1.1rem;
        padding: 12px 24px;
    }
}