/* CSS Reset and Variables */
:root {
    --primary: #00b4d8;
    --primary-dark: #0077b6;
    --secondary: #90e0ef;
    --dark: #03045e;
    --light: #caf0f8;
    --white: #ffffff;
    --gray: #f8f9fa;
    --text: #2b2d42;
    --text-light: #5c677d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.nav-logo {
    height: 40px;
    margin-right: 10px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.lang-switch {
    background-color: var(--primary-dark);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.lang-switch:hover {
    background-color: var(--primary) !important;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0, 7, 30, 0.4), rgba(0, 119, 182, 0.4)), url('images/hero.png') center/cover;
    position: relative;
    padding: 0 2rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero h1 span {
    color: var(--secondary);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--white);
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}

.cta-btn.outline {
    background: transparent;
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
    margin-top: 1rem;
}

.cta-btn.outline:hover {
    background: var(--primary-dark);
    color: var(--white);
}

/* Sections General */
section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Features */
.features-section {
    background-color: var(--gray);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.feature-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.4s ease;
    text-align: center;
    padding-bottom: 2rem;
}

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

.feature-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 0 1rem;
}

/* Location */
.location-section {
    background: var(--white);
}

.location-content {
    display: flex;
    justify-content: center;
}

.address-card {
    background: var(--light);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 180, 216, 0.15);
}

.pin-icon {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.address-card h3 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.address-card p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1.5rem;
}

/* Promotions & Galleries */
.promotions-section {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 5rem 0;
}

.promotions-section .section-title {
    color: var(--white);
}

.promotions-section .section-title::after {
    background: var(--secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: var(--white);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card:hover {
    transform: scale(1.05);
    z-index: 10;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.promo-img {
    object-fit: contain; /* flyers look better contained than cropped */
    max-height: 400px;
    background: #fff; /* white background for flyers */
}

/* Footer */
footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 2rem 0;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in.delay-1 { animation-delay: 0.2s; }
.fade-in.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 8px;
    object-fit: contain;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform:scale(0.8); opacity: 0;} 
    to {transform:scale(1); opacity: 1;}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--primary);
}

/* --- Admin Specific Modern Styles --- */

.admin-body {
    background-color: #f0f2f5;
    padding-top: 100px;
}

.admin-nav {
    background: rgba(3, 4, 94, 0.95);
    color: white;
    padding: 0.75rem 1.5rem; /* Tighter padding for admin nav */
}

.admin-nav .nav-links {
    gap: 1.2rem; /* Tighter gap so all links fit */
    flex-wrap: nowrap;
    white-space: nowrap;
}

.admin-nav .nav-links a {
    font-size: 0.9rem;
}

.admin-nav .logo, .admin-nav .nav-links a {
    color: white;
}
.admin-nav .logo img {
    filter: brightness(0) invert(1);
}

/* Glassmorphism Login */
.login-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--dark) 0%, #0077b6 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    text-align: center;
}

.login-logo-container {
    background: var(--white);
    display: inline-block;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.login-logo-container img {
    height: 50px;
}

.login-card h2 {
    color: var(--dark);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.input-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e4e8;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-card .cta-btn {
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
    border: none;
}

/* Admin Navbar Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 10px 0;
    z-index: 2000;
    margin-top: 0; /* No gap to prevent closures */
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    color: var(--text) !important;
    padding: 12px 20px;
    display: block;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--light);
}

.nav-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* Modals */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 9000;
}

.admin-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9001;
    width: 90%;
    max-width: 600px;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 900px;
    width: 90%;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
}

/* User Management Styling in Modals */
.permissions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.permissions-container {
    background: #f1f4f8;
    padding: 15px;
    border-radius: 12px;
}

/* Hero Preview */
.hero-preview-container {
    margin-top: 20px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    min-height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero-preview-img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.hero-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-preview-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
}

/* General Layout Fixes for Admin */
.admin-container section {
    padding: 2rem 0;
    scroll-margin-top: 100px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #eee;
}

#audit-logs-table {
    font-size: 0.85rem;
}

#audit-logs-table th {
    background: var(--light);
    color: var(--dark);
    padding: 10px;
}

#audit-logs-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.log-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.filter-group select, .filter-group input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Admin Gallery Specifics */
.admin-container .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.admin-gallery-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.admin-gallery-img {
    height: 140px;
    width: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.delete-btn {
    width: 100%;
    padding: 10px;
    border: none;
    background: #ff4d4f;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: auto;
}

.delete-btn:hover {
    background: #cf1322;
}

/* Video thumbnail card */
.video-thumb-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: 140px;
}

.video-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    pointer-events: none;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    color: white;
    font-size: 2.5rem;
    transition: background 0.2s;
    pointer-events: none;
}

.video-thumb-wrapper:hover .play-overlay {
    background: rgba(0,119,182,0.55);
}

/* Empty state for gallery sections */
.empty-state-msg {
    color: var(--text-light);
    font-style: italic;
    padding: 1.5rem;
    background: #f0f4f8;
    border-radius: 12px;
    border: 2px dashed #cbd5e0;
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
}


#logout-btn {
    border-color: rgba(255,255,255,0.4);
    color: white;
}
#logout-btn:hover {
    background: #e63946;
    border-color: #e63946;
}

@media (max-width: 768px) {
    .admin-nav .nav-links a:not(.nav-admin) {
        display: none;
    }
}

/* --- Upload Hub Premium Styles --- */
.upload-hub-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.upload-info p {
    color: var(--text-light);
    margin-top: 5px;
}

.upload-status {
    min-height: 20px;
    margin-top: 10px;
    font-weight: 700;
    color: #2ecc71;
}

.upload-grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 2rem;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group select {
    padding: 12px 15px;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8fafc;
    transition: border-color 0.3s;
}

.form-group select:focus {
    border-color: var(--primary);
    outline: none;
}

.custom-file-upload {
    position: relative;
    height: 50px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.custom-file-upload:hover {
    border-color: var(--primary);
    background: var(--light);
}

.custom-file-upload input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

.file-custom-label {
    font-size: 0.9rem;
    color: var(--text-light);
    pointer-events: none;
}

.primary-btn {
    background: var(--primary-dark);
    color: white;
    height: 50px;
    padding: 0 30px;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
}

.primary-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* IP Column Table Styling */
#audit-logs-table td:nth-child(3) {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-light);
}

/* Hero thumbnail badge */
.hero-thumb-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary-dark);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    pointer-events: none;
}

.hero-thumb-inactive {
    background: #aaa;
}

/* Active hero card has a colored border glow */
.hero-active-card {
    box-shadow: 0 0 0 3px var(--primary), 0 4px 20px rgba(0,180,216,0.3);
}

/* Set as Default button */
.set-default-btn {
    width: 100%;
    padding: 8px;
    border: none;
    background: var(--primary-dark);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
}

.set-default-btn:hover {
    background: var(--primary);
}

/* Hero gallery grid - same compact size as other grids */
.hero-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}



@media (max-width: 992px) {
    .upload-grid-form {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
