:root {
    --brand-primary: #32A647;
    --brand-black: #141414;
    --brand-dark-grey: #181818;
    --brand-light-grey: #2f2f2f;
    --text-white: #FFFFFF;
    --text-grey: #b3b3b3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--brand-black);
    color: var(--text-white);
    overflow-x: hidden;
}

/* Header */
header {
    height: 70px;
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    transition: background 0.3s ease;
}

header.scrolled {
    background: var(--brand-black);
}

.logo {
    color: var(--brand-primary);
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -1px;
}

.header-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

nav a {
    color: var(--text-white);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--brand-primary);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 85vh;
    width: 100%;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 4%;
}

.hero-slide.active {
    opacity: 1;
    z-index: 10;
}

.hero-slider-nav {
    position: absolute;
    bottom: 120px;
    /* Raised to be above the overlapping content */
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    /* Higher z-index */
    display: flex;
    gap: 15px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.slider-dot.active {
    background: var(--brand-primary);
    transform: scale(1.3);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    font-size: 3rem;
    padding: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(to top, var(--brand-black) 0%, rgba(0, 0, 0, 0) 20%);
}

.hero-content {
    position: relative;
    max-width: 600px;
    z-index: 10;
    background-color: #1a7530e5;
    padding: 10px 20px;
    border-radius: 10px;
}



.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-grey);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.2s;
}

.btn-primary {
    background-color: var(--text-white);
    color: black;
}

.btn-secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
    margin-left: 10px;
}

.btn:hover {
    opacity: 0.8;
}

/* Main Content */
main {
    margin-top: -100px;
    position: relative;
    z-index: 20;
    padding-bottom: 100px;
}

/* Row Controls */
.category-row {
    margin-bottom: 3rem;
    position: relative;
    padding: 0 4%;
}

.category-row h2 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    padding-left: 0;
}

.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.video-slider {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none;
    /* Firefox */
}

.video-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.row-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    border: none;
}

.category-row:hover .row-arrow {
    opacity: 1;
}

.row-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    font-size: 2.5rem;
}

.arrow-left {
    left: -4%;
    border-radius: 0 4px 4px 0;
}

.arrow-right {
    right: -4%;
    border-radius: 4px 0 0 4px;
}

.video-item {
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-card {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
    background: #222;
}

.video-card:hover {
    transform: scale(1.05);
    z-index: 30;
}

.video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

/* Play Icon Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.video-card:hover img {
    opacity: 0.5;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.video-title {
    font-size: 0.9rem;
    color: var(--text-white);
    margin-top: 5px;
    transition: opacity 0.3s;
    font-weight: 500;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-item:hover .video-title {
    opacity: 0;
    /* Hide title on hover as requested */
}

/* Confirmation Modal */
.confirm-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-confirm-delete {
    background: var(--brand-primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-cancel {
    background: #444;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Modal for Video */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    /* Higher z-index to be above header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    /* JS will change this to flex */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: #181818;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    margin: auto;
    /* Fallback centering */
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Centering the video container specifically */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Login Page Stylings */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&q=80&w=1470');
    background-size: cover;
}

.login-form {
    background: rgba(0, 0, 0, 0.75);
    padding: 60px;
    border-radius: 4px;
    width: 100%;
    max-width: 450px;
}

.login-form h1 {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background: #333;
    border: none;
    border-radius: 4px;
    color: white;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: var(--brand-primary);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
}

/* Footer Styles */
.main-footer {
    background: #000;
    padding: 60px 5%;
    border-top: 1px solid #333;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
    opacity: 0.8;
}

.main-footer p {
    color: var(--text-grey);
    font-size: 0.9rem;
    margin: 5px 0;
}

.main-footer .credits {
    margin-top: 15px;
    color: #666;
    font-size: 0.8rem;
}

.admin-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 5%;
    /* Better lateral padding */
}

.admin-section {
    background: #181818;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

h3 {
    margin-bottom: 20px;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #333;
    text-align: left;
}

.admin-table tbody tr:hover {
    background: #252525;
    /* Highlighting the row on hover */
    transition: background 0.2s ease;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

input,
select {
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #222;
    color: white;
    flex: 1;
    min-width: 200px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-grey);
    cursor: pointer;
}

.checkbox-group input {
    min-width: auto;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.btn-add {
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.btn-delete {
    background: #444;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
}

.btn-edit {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
}

.btn-save-order {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 10px;
}

.drag-handle {
    cursor: grab;
    padding: 10px;
    color: #666;
    font-size: 1.2rem;
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.4;
    background: #333;
}

/* Info Modal Specific Styles */
.info-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.info-thumb {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.info-cat {
    color: var(--brand-primary);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    display: block;
}

#infoTitle {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.info-desc {
    color: var(--text-grey);
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Edit Modal */
#editModal .modal-content {
    max-width: 600px;
    padding: 40px;
    border-radius: 8px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #252525;
    padding: 10px 15px;
    border-radius: 4px 4px 0 0;
}