/* Global layout tweaks */
body {
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-bottom: 0 !important; /* Overriding bootstrap default if needed */
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Color scheme */
:root {
  --accent-color: #ff6b00;
  --dark-text: #333;
  --light-bg: #f8f9fa;
}

/* Base styles (Mobile First) */
html {
  font-size: 14px;
}

body {
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Hero section */
.hero-section {
    min-height: 350px;
    padding: 3rem 0;
}

.hero-logo {
    position: relative;
    width: 140px;
    height: auto;
    margin: 0 auto 1.5rem auto;
    z-index: 10;
}

.hero-content {
  max-width: 760px;
  padding: 1rem;
}

.hero-section h1 {
  font-size: 1.75rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  padding: 0.5rem 1rem;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent-color) !important;
  letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    padding: 0.75rem 0;
    font-weight: 500;
}

/* Cards */
.card {
  border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card .card-img-top {
  height: 200px;
  object-fit: cover;
}

/* Tablets and larger (min-width: 768px) */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .hero-section {
        min-height: 450px;
        padding: 0;
        flex-direction: row !important;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .hero-logo {
        position: absolute;
        top: 20px;
        left: 20px;
        width: 160px;
        margin: 0;
    }

    .card .card-img-top {
        height: 250px;
    }
}

/* Desktop and larger (min-width: 992px) */
@media (min-width: 992px) {
    .navbar {
        padding: 0.8rem 1rem;
    }

    .navbar-brand {
        font-size: 1.4rem;
    }

    .navbar-nav .nav-link {
        margin: 0 8px;
        padding: 0.5rem 0;
        position: relative;
    }

    /* Hover underline effect only on desktop */
    .navbar-nav .nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 0%;
        height: 2px;
        background: var(--accent-color);
        transition: 0.3s;
    }

    .navbar-nav .nav-link:hover::after {
        width: 100%;
    }

    .hero-section {
        min-height: 500px;
    }
}

/* Admin Sidebar */
.admin-sidebar {
    width: 100%;
    min-height: auto;
    transition: all 0.3s;
}

.admin-sidebar h5 span {
    letter-spacing: 1px;
}

.admin-sidebar .nav-link {
    border-radius: 8px;
    margin-bottom: 5px;
    padding: 10px 15px;
    transition: background 0.2s;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 992px) {
    .admin-sidebar {
        width: 280px;
        min-height: 100vh;
        position: sticky;
        top: 0;
    }
}

/* Mobile Admin Fixes */
@media (max-width: 991px) {
    main.p-4 {
        padding: 1.5rem !important;
    }
    
    .table-responsive {
        border-radius: 12px;
        overflow: hidden;
    }
    
    .card-body {
        padding: 1.25rem !important;
    }
}

.bg-warning-light {
    background-color: #fffaf0;
}

/* Utils */
.btn-warning {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  font-weight: 500;
}

.btn-warning:hover {
  background-color: #e55a00;
  border-color: #e55a00;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}