/* === BASE STYLES === */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    color: #212529;
}

/* === HERO LANDING PAGE STYLES === */
.hero-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/images/pexels-esratorun46-8357842-banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(218, 165, 32, 0.3) 0%,
        rgba(184, 134, 11, 0.4) 50%,
        rgba(139, 69, 19, 0.5) 100%
    );
    backdrop-filter: blur(1px);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 60px 40px;
    color: white;
}

.logo-placeholder {
    margin-bottom: 40px;
}

.logo-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.logo-circle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.logo-text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
}

.hero-text {
    margin-bottom: 50px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 30px 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
}

.hero-tagline {
    font-size: 1.1rem;
    font-weight: 300;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    margin: 0;
    line-height: 1.5;
}

.hero-button {
    display: inline-block;
    padding: 18px 40px;
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.hero-button:hover {
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(218, 165, 32, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.3);
}

.photo-credit {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.photo-credit a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.photo-credit a:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: underline;
}

/* Responsive Hero Styles */
@media (max-width: 768px) {
    .hero-content {
        padding: 40px 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .logo-circle {
        width: 100px;
        height: 100px;
    }
    
    .hero-button {
        padding: 16px 32px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-tagline {
        font-size: 0.95rem;
    }
}

/* === ADMIN PAGE STYLES === */
.admin-container {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    font-family: 'Inter', sans-serif;
}

.admin-header {
    position: relative;
    height: 200px;
    background-image: url('/images/banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.admin-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(218, 165, 32, 0.4) 0%,
        rgba(184, 134, 11, 0.5) 50%,
        rgba(139, 69, 19, 0.6) 100%
    );
}

.admin-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.admin-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.admin-header p {
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.admin-main {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
}

.admin-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(218, 165, 32, 0.1);
    border: 1px solid rgba(218, 165, 32, 0.1);
}

.admin-card h2 {
    color: #8B4513;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-align: center;
}

.admin-description {
    color: #6c757d;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.5;
}

.admin-form {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #8B4513;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.admin-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(218, 165, 32, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    transition: all 0.3s ease;
}

.admin-select:focus {
    outline: none;
    border-color: #DAA520;
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
}

.admin-file-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px dashed rgba(218, 165, 32, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: rgba(218, 165, 32, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
}

.admin-file-input:hover {
    border-color: #DAA520;
    background: rgba(218, 165, 32, 0.05);
}

.admin-button {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.admin-button:hover {
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(218, 165, 32, 0.4);
}

.admin-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.3);
}

.admin-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(218, 165, 32, 0.1);
}

.admin-link-button {
    background: none;
    border: 2px solid #B8860B;
    color: #B8860B;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.admin-link-button:hover {
    background: #B8860B;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}

.admin-password-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(218, 165, 32, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    transition: all 0.3s ease;
}

.admin-password-input:focus {
    outline: none;
    border-color: #DAA520;
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: center;
}

/* Responsive Admin Styles */
@media (max-width: 768px) {
    .admin-header h1 {
        font-size: 2rem;
    }
    
    .admin-header p {
        font-size: 1rem;
    }
    
    .admin-main {
        padding: 40px 15px;
    }
    
    .admin-card {
        padding: 30px 20px;
    }
    
    .admin-navigation {
        flex-direction: column;
        gap: 15px;
    }
}

* {
    box-sizing: border-box;
}

/* === LAYOUT: CSS GRID === */
.page-container {
    display: grid;
    height: 100vh;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 80px 1fr 60px;
    grid-template-areas:
        "header header"
        "sidebar main"
        "sidebar nav";
}

.main-header { grid-area: header; }
.sidebar { grid-area: sidebar; }
.main-content { grid-area: main; }
.bottom-nav { grid-area: nav; }

/* === HEADER === */
.main-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-image: url('/images/banner.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    border-bottom: 1px solid #dee2e6;
}

.header-left {
    display: flex;
    align-items: center;
}

.main-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.header-logo {
    margin-right: 1rem;
}

.header-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.pdf-download-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdf-download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    margin-right: 15px;
}

/* === SIDEBAR === */
.sidebar {
    background: linear-gradient(180deg, #fefefe 0%, #f8f9fa 100%);
    border-right: 1px solid rgba(218, 165, 32, 0.2);
    padding: 20px;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
}

.sidebar h3 {
    font-size: 1.1rem;
    color: #8B4513;
    margin-top: 0;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li a {
    text-decoration: none;
    color: #495057;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.sidebar li a:hover { 
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.1) 0%, rgba(184, 134, 11, 0.1) 100%);
    color: #8B4513;
}
.sidebar li.active a { 
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.3);
}

.sidebar .subheader {
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 8px;
    padding: 8px 12px;
    color: #8B4513;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(218, 165, 32, 0.08);
    border-radius: 4px;
    border-left: 3px solid #DAA520;
}

/* === SIDEBAR DISCLOSURE WIDGETS === */
.sidebar details {
    margin-bottom: 30px; /* Add spacing between parts */
}

.sidebar details > summary {
    list-style: none; /* Remove default marker */
    cursor: pointer;
    padding: 10px 0; /* Add vertical padding to summary */
}

.sidebar details > summary::-webkit-details-marker {
    display: none; /* Chrome */
}

.sidebar details > summary h3 {
    display: inline-block;
    margin: 0;
}

.sidebar details > summary h3::before {
    content: '▶'; /* Collapsed state */
    font-size: 0.7em;
    margin-right: 8px;
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}

.sidebar details[open] > summary h3::before {
    transform: rotate(90deg); /* Expanded state */
}

.sidebar details ul {
    padding-left: 20px; /* Indent chapter links */
    margin-top: 15px; /* Add space after summary */
}

/* === MAIN CONTENT === */
.main-content {
    overflow-y: auto;
    padding: 30px 40px;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.breadcrumbs {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.markdown-body h1 {
    font-size: 2.2rem;
    margin-top: 0;
    color: #8B4513;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.markdown-body h2 {
    color: #B8860B;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.markdown-body h3 {
    color: #DAA520;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* === BOTTOM NAVIGATION === */
.bottom-nav {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 40px;
}

.bottom-nav a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 25px;
    background: linear-gradient(135deg, #DAA520 0%, #B8860B 100%);
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.bottom-nav a:hover {
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.4);
}

/* === RESPONSIVE STYLES (Mobile First) === */
@media (max-width: 768px) {
    .page-container {
        grid-template-columns: 1fr;
        grid-template-rows: 60px 1fr auto; /* Adjust nav row for stacked buttons */
        grid-template-areas:
            "header"
            "main"
            "nav";
    }

    .main-header h1 { font-size: 1.2rem; }
    .main-header { justify-content: flex-start; }
    .mobile-menu-btn { display: block; }
    
    .pdf-download-btn {
        font-size: 12px;
        padding: 6px 12px;
        gap: 4px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* Hidden by default */
        width: 280px;
        height: 100%;
        z-index: 30;
        transition: left 0.3s ease-in-out;
        grid-area: unset; /* Remove from grid layout */
    }

    .sidebar.open {
        left: 0; /* Show sidebar */
    }

    .main-content { padding: 20px; }

    /* Stacked Bottom Nav on Mobile */
    .bottom-nav {
        padding: 5px 0;
    }
    .nav-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 0 15px;
    }
    .bottom-nav a {
        text-align: center;
        padding: 12px;
    }
    .bottom-nav a.prev-link {
        margin-bottom: 5px;
    }
}

/* === TABBED CARD STYLES === */
.tabbed-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 30px auto;
    max-width: 800px;
}

.card-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card-tab {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    border-right: 1px solid #e9ecef;
    position: relative;
}

.card-tab:last-child {
    border-right: none;
}

.card-tab:hover {
    color: #DAA520;
    background-color: rgba(218, 165, 32, 0.05);
}

.card-tab.active {
    color: #DAA520;
    background-color: white;
    border-bottom: 2px solid #DAA520;
}

.card-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-body {
    padding: 30px;
}

/* === IMAGE GALLERY STYLES === */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-thumbnail {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.image-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-info {
    padding: 12px;
}

.image-name {
    display: block;
    font-weight: 500;
    color: #212529;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-size {
    font-size: 12px;
    color: #6c757d;
}

.loading, .no-images {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* === MODAL STYLES === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

#modalImage {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    background: #f8f9fa;
}

.modal-info {
    padding: 20px;
}

.modal-info h3 {
    margin: 0 0 15px 0;
    color: #212529;
    font-size: 18px;
}

.url-copy-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.url-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    background-color: #f8f9fa;
}

.delete-btn {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.delete-btn:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

/* === TOAST NOTIFICATION STYLES === */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

.toast.info {
    background-color: #17a2b8;
}

/* 404 Error Page Styles */
.error-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.hero-button-secondary {
    display: inline-block;
    padding: 15px 30px;
    background-color: transparent;
    color: #D4AF37;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 2px solid #D4AF37;
    text-align: center;
    min-width: 160px;
}

.hero-button-secondary:hover {
    background-color: #D4AF37;
    color: #2C3E50;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

@media (max-width: 768px) {
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-button,
    .hero-button-secondary {
        width: 100%;
        max-width: 280px;
    }
}

/* === IMAGE ALIGNMENT STYLES === */
.img-align-left {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 50%;
    height: auto;
    clear: left;
}

.img-align-center {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 100%;
    height: auto;
    clear: both;
}

.img-align-right {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 50%;
    height: auto;
    clear: right;
}

/* Image alignment responsive behavior */
@media (max-width: 768px) {
    .img-align-left,
    .img-align-right {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
        max-width: 100%;
        clear: both;
    }
    
    .img-align-center {
        max-width: 100%;
    }
}

/* Ensure images don't break out of containers */
.img-align-left,
.img-align-center,
.img-align-right {
    box-sizing: border-box;
}

/* Clear floats after aligned images */
.img-align-left + p,
.img-align-right + p {
    overflow: hidden;
}

/* Wrapper for better text flow around images */
.img-wrapper {
    overflow: hidden;
    margin-bottom: 20px;
}

/* === ALERT BOXES === */
.alert {
    padding: 16px 20px;
    margin: 20px 0;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}


/* Note Alert (Primary) */
.alert-note {
    background-color: #f8f9fa;
    border-color: #6c757d;
    color: #495057;
}

.alert-note::before {
    background-color: #6c757d;
}


/* Emphasize Alert (Secondary) */
.alert-emphasize {
    background-color: #faf9f7;
    border-color: #D4AF37;
    color: #2C3E50;
}

.alert-emphasize::before {
    background-color: #D4AF37;
}


/* Tip Alert (Success) */
.alert-tip {
    background-color: #f8fff8;
    border-color: #28a745;
    color: #155724;
}

.alert-tip::before {
    background-color: #28a745;
}


/* Warning Alert */
.alert-warning {
    background-color: #fff8f0;
    border-color: #ffc107;
    color: #856404;
}

.alert-warning::before {
    background-color: #ffc107;
}


/* Caution Alert (Danger) */
.alert-caution {
    background-color: #fff5f5;
    border-color: #dc3545;
    color: #721c24;
}

.alert-caution::before {
    background-color: #dc3545;
}


/* Responsive alert boxes */
@media (max-width: 768px) {
    .alert {
        padding: 12px 16px;
        margin: 16px 0;
    }
    
}

/* === FORM HELP TEXT === */
.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* === UPLOAD STATUS === */
.upload-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.uploading {
    color: #DAA520;
    font-weight: 500;
}

/* === RESPONSIVE STYLES FOR ADMIN === */
@media (max-width: 768px) {
    .admin-tabs {
        flex-direction: column;
    }
    
    .admin-tab {
        text-align: center;
        border-bottom: 1px solid #e9ecef;
        border-right: none;
    }
    
    .admin-tab.active {
        border-bottom-color: #DAA520;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .modal-content {
        margin: 10% auto;
        max-width: 95%;
    }
    
    .url-copy-section {
        flex-direction: column;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        transform: translateY(100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}
