@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* =========================================
   1. BASE & TYPOGRAPHY
   ========================================= */
body {
    color: #000;
    font-family: "Montserrat", sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: white; }

/* Global Box Sizing for structural elements */
footer, input, textarea, select, .btn-block, .btn-outline-full, 
.blog-main, .catalog-main, .home-main, .content-container, 
.blog-header, main.catalog {
    box-sizing: border-box;
}

/* =========================================
   2. UTILITIES & HELPERS
   ========================================= */
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.mb-1 { margin-bottom: 1rem; }
.mb-1-5 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-0-5 { margin-top: 0.5rem; }
.mt-1-5 { margin-top: 1.5rem; }
.mt-4 { margin-top: 4rem; }
.pt-0 { padding-top: 0; }
.d-none { display: none !important; }
.text-center { text-align: center; }
.help-text { color: #666; font-weight: normal; font-size: 0.9rem; }
.danger-text { color: #b00020; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.form-section-mb { margin-bottom: 1.5rem; }
.link-muted { color: #666; font-size: 0.9rem; text-decoration: none; }
.link-muted:hover { text-decoration: underline; color: black; }

/* =========================================
   3. LAYOUTS & CONTAINERS
   ========================================= */
main {
    display: flex;
    flex: 1;
    margin-top: 4rem;
}

.blog-main, .catalog-main, .home-main, main.catalog {
    flex-direction: column;
    align-items: center;
    width: 100%;
}

main.catalog { padding: 0 2rem 2rem 2rem; }
main.catalog h1 { margin-top: 2rem; margin-bottom: 0.5rem; }

.content-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem 2rem;
    max-width: 1200px;
    width: 100%;
    padding: 4rem 2rem;
}

/* Headers & Footers */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #181818;
    height: 3rem;
    padding: 0.5rem 2rem;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
}

footer {
    background-color: #181818;
    padding: 1.5rem 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

nav { display: flex; gap: 1rem; }
.nav-link { color: white; }
.nav-logout { color: #ff4d4d; margin-left: 1rem; font-weight: bold; }

.blog-header {
    width: 100%;
    background-color: #111111;
    background-image: radial-gradient(circle at center top, #1f1f1f 0%, #111111 100%);
    color: white;
    text-align: center;
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 35vh;
    justify-content: center;
}
.blog-header h1 { font-size: 2.8rem; margin: 0 0 1rem 0; font-weight: 700; }
.blog-header p { color: #a0a0a0; font-size: 1.1rem; max-width: 600px; line-height: 1.5; margin: 0 0 2.5rem 0; }

/* Empty States */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: #f0f0f0;
    border-radius: 0.7rem;
    color: #666;
    font-size: 1.2rem;
}
.empty-state-large { max-width: 600px; width: 100%; }
.error-title { margin-top: 0; color: #b00020; }
.alert-error { background-color: #ffebee; border: 1px solid #c62828; color: #c62828; padding: 1rem; border-radius: 0.5rem; text-align: center; }
.alert-error-sm { background: #ffebee; color: #c62828; padding: 0.8rem; border-radius: 0.4rem; margin-bottom: 1.5rem; text-align: center; font-size: 0.9rem; }

/* =========================================
   4. FORMS, INPUTS & BUTTONS
   ========================================= */
input, textarea, select {
    padding: 0.4rem;
    border-radius: 0.3rem;
    border: 1px solid #ccc;
}
.hidden-textarea { display: none; }
.inline-form { margin: 0; display: inline; }
.checkbox-auto { width: auto; margin: 0; }

/* Base Button Style */
.card-btn, .contact-btn, .btn-hero-primary, .btn-hero-secondary, .btn-outline-dark, .btn-outline-full {
    display: inline-block;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.card-btn { padding: 0.75rem; color: white; background-color: #363636; }
.card-btn:hover { background: #111; }
.contact-btn { padding: 0.75rem; background: #181818; color: white; }
.contact-btn:hover { background: black; }

.btn-inline { padding: 0.6rem 1.5rem; }
.btn-inline-large { padding: 0.6rem 1.5rem; width: auto; margin-top: 1.5rem; }
.btn-inline-block { display: inline-block; margin-top: 0; }
.btn-block { display: block; width: 100%; }
.btn-full-mt { width: 100%; margin-top: 1rem; }
.btn-full-large { width: 100%; margin-top: 1.5rem; padding: 0.8rem; }

.btn-outline-full { width: 100%; padding: 0.6rem; border: 1px solid #000; background: white; color: #000; margin-top: auto; }
.btn-outline-dark { padding: 0.8rem 2rem; border: 1px solid #111; color: #111; font-weight: 600; }
.btn-outline-dark:hover { background-color: #111; color: white; }

.btn-hero-primary { background-color: white; color: #111; padding: 0.8rem 1.5rem; font-weight: 600; }
.btn-hero-primary:hover { background-color: #e0e0e0; color: #000; }
.btn-hero-secondary { background-color: transparent; color: white; padding: 0.8rem 1.5rem; font-weight: 600; border: 1px solid rgba(255, 255, 255, 0.3); }
.btn-hero-secondary:hover { background-color: rgba(255, 255, 255, 0.1); border-color: white; }

/* =========================================
   5. UNIFIED CARDS (Blog, Product, Admin)
   ========================================= */
.blog-card, .product-card, .card, .login-card {
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
}

/* Specifics for Blog/Product (Hover effects & Borders) */
.blog-card, .product-card {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}
.blog-card:hover, .product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); }

/* Specifics for Admin/Login Cards */
.card, .login-card {
    background: #f5f5f5;
    border-radius: 0.7rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.card { height: 100%; }
.card-body { padding: 1rem; display: flex; flex-direction: column; flex-grow: 1; }
.card-body h3 { margin: 0.5rem 0 1.5rem 0; }
.card-body p { font-size: 0.9rem; color: #555; }

/* Card Images */
.blog-card-image, .product-card-image { display: block; width: 100%; overflow: hidden; background: #f5f5f5; }
.blog-card-image { aspect-ratio: 16 / 9; }
.product-card-image { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.blog-card-image img, .product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.blog-card:hover .blog-card-image img, .product-card:hover .product-card-image img { transform: scale(1.03); }

/* Card Content */
.blog-card-content, .product-card-content { display: flex; flex-direction: column; flex-grow: 1; padding: 1.5rem; }
.blog-card-content h2, .product-card-content h2 { font-weight: 700; line-height: 1.4; }
.blog-card-content h2 { font-size: 1.2rem; margin: 0 0 0.8rem 0; }
.product-card-content h2 { font-size: 1.25rem; margin: 0 0 1.5rem 0; }
.blog-card-content h2 a, .product-card-content h2 a { color: #181818; text-decoration: none; transition: color 0.2s ease; }
.blog-card-content h2 a:hover, .product-card-content h2 a:hover { color: #555; }

/* Make Entire Card Clickable */
.blog-card-content h2 a::after, .product-card-content h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.blog-excerpt { color: #666; font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.2rem; flex-grow: 1; }
.blog-read-more, .product-read-more { display: inline-flex; align-items: center; font-weight: 600; color: #181818; font-size: 0.9rem; margin-top: auto; transition: color 0.2s; }
.blog-card:hover .blog-read-more, .product-card:hover .product-read-more { color: #555; }

/* Meta Info */
.blog-meta, .product-meta { display: flex; align-items: center; margin-bottom: 0.8rem; }
.blog-meta { font-size: 0.85rem; color: #888; gap: 0.4rem; }
.blog-author { color: #555; font-weight: 500; }
.badge-band { background: #555; color: white; padding: 0.3rem 0.6rem; border-radius: 0.3rem; font-size: 0.7rem; display: inline-block; align-self: flex-start; }

/* =========================================
   6. SEARCH BARS & FILTERS
   ========================================= */
.blog-search-bar { display: flex; gap: 0.5rem; width: 100%; max-width: 500px; }
.search-input-wrapper { flex: 1; position: relative; display: flex; align-items: center; }
.search-input-wrapper svg { position: absolute; left: 1rem; color: #888; }
.search-input-wrapper input { width: 100%; background: #1e1e1e; border: 1px solid #333; color: white; padding: 0.8rem 1rem 0.8rem 2.8rem; border-radius: 0.5rem; margin: 0; font-family: inherit; transition: border-color 0.2s; }
.search-input-wrapper input:focus, select.custom-select:focus { outline: none; border-color: #555; }
.search-input-wrapper input::placeholder { color: #888; }

.tags-btn { background: #1e1e1e; border: 1px solid #333; color: white; padding: 0 1rem; border-radius: 0.5rem; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 0.5rem; transition: background 0.2s; }
.tags-btn:hover { background: #2a2a2a; }
select.custom-select option { background: #1e1e1e; color: white; }

/* =========================================
   7. DETAIL PAGES (Antenna & Blog Post)
   ========================================= */
.antenna-detail, .post-page { display: flex; justify-content: center; padding: 2rem; color: black; }
.antenna-detail-column { flex-direction: column; align-items: center; }
.detail-container, .description-container { max-width: 1100px; width: 100%; }
.detail-container { display: flex; gap: 3rem; }

.detail-image, .detail-info { width: 50%; }
.detail-image img { width: 100%; height: 100%; background: #f5f5f5; border-radius: 0.7rem; }
.detail-no-image { height: 300px; display: flex; align-items: center; justify-content: center; background: #eee; border-radius: 0.7rem; color: #888; font-size: 1.2rem; }
.detail-info { display: flex; flex-direction: column; }

.detail-content-row { display: flex; flex-wrap: wrap; gap: 3rem; max-width: 1100px; width: 100%; margin-top: 3rem; align-items: flex-start; }
.detail-content-row .description-container, .detail-content-row .detail-carousel { flex: 1; min-width: 300px; margin-top: 0; width: 100%; }

.description { margin: 1rem 0; color: #555; line-height: 1.5; }
.description img { max-width: 100%; height: auto; border-radius: 0.7rem; margin: 1rem 0; }

.contact-box { margin: 1.5rem 0; padding: 1.5rem; background: #f0f0f0; border-radius: 0.7rem; text-align: center; }
.contact-box p { margin-bottom: 1rem; color: #555; }

.post-container { max-width: 800px; width: 100%; }
.post-meta { color: #777; margin-bottom: 1rem; font-size: 0.9rem; }
.post-image { height: 40vh; background: #eee; border-radius: 0.7rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; overflow: hidden; }
.post-image img { width: 100%; height: 100%; object-fit: cover; }
.post-content { line-height: 1.6; color: #333; margin-bottom: 2rem; }

/* =========================================
   8. HOMEPAGE COMPONENTS
   ========================================= */
.hero-carousel-section { width: 100%; height: 70vh; min-height: 500px; background-color: #111111; }
.hero-carousel { width: 100%; height: 100%; border-radius: 0; margin: 0; position: relative; overflow: hidden; }
.hero-gradient { position: absolute; inset: 0; background: linear-gradient(to top, rgba(17,17,17,0.95) 0%, rgba(17,17,17,0.4) 50%, rgba(17,17,17,0.1) 100%); z-index: 1; }
.hero-content { position: absolute; bottom: 15%; left: 5%; z-index: 2; color: white; max-width: 600px; }
.hero-content h2 { font-size: 3rem; font-weight: 700; margin: 0 0 1rem 0; line-height: 1.2; }
.hero-content p { font-size: 1.2rem; color: #ccc; margin: 0 0 2rem 0; }
.hero-actions { display: flex; align-items: center; gap: 1rem; }

.home-blog-section { width: 100%; display: flex; flex-direction: column; align-items: center; padding: 5rem 0; background-color: #fff; }
.home-section-header { text-align: center; margin-bottom: 1rem; padding: 0 2rem; }
.home-section-header h2 { font-size: 2.5rem; font-weight: 700; margin: 0 0 0.5rem 0; color: #111; }
.home-section-header p { color: #666; font-size: 1.1rem; margin: 0; }
.home-section-footer { margin-top: 1rem; text-align: center; }

/* =========================================
   9. CAROUSEL & LIGHTBOX
   ========================================= */
.antenna-carousel, .blog-carousel { text-align: center; color: black; width: 50%; }
.carousel-box-small { 
    position: relative; 
    width: 100%; 
    aspect-ratio: 4 / 3;
    border-radius: 1rem;
    margin: 0 auto; 
    overflow: hidden; 
    background: #eee; 
}
.carousel-item { position: absolute; width: 100%; height: 100%; top: 0; left: 0; opacity: 0; transition: opacity 0.4s ease; }
.carousel-item.active { opacity: 1; z-index: 1; }
.carousel-item img { width: 100%; height: 100%; object-fit: cover; background: #f5f5f5; }
.carousel-overlay { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); background: rgba(50, 50, 50, 0.85); padding: 1rem 2rem; border-radius: 0.5rem; color: white; width: 30%; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.6); border: none; color: white; font-size: 2rem; padding: 0.5rem 1rem; cursor: pointer; z-index: 2; border-radius: 0.5rem; }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-btn:hover { background: black; }

/* =========================================
   10. ADMIN & DASHBOARD
   ========================================= */
.admin-container { width: 100%; max-width: 800px; }
.admin-container-sm { width: 100%; max-width: 600px; }
.dashboard-subtitle { color: #666; margin-top: 0.5rem; }

/* Admin Dashboard Grid */
.dashboard-cards { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; margin-top: 3rem; width: 100%; max-width: 1000px; }
.dashboard-card { width: 300px; text-align: center; }
.dashboard-card-body { padding: 2.5rem 1.5rem; }
.dashboard-card-text { font-size: 1.1rem; margin: 1.5rem 0; }

/* List Items */
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1rem; background: #f5f5f5; border-radius: 0.6rem; margin-bottom: 0.7rem; }
.list-info { display: flex; flex-direction: column; gap: 0.2rem; }
.list-actions { display: flex; gap: 0.5rem; }
.list-actions button, .list-actions a { padding: 0.4rem 0.8rem; border-radius: 0.4rem; border: none; cursor: pointer; background: #181818; color: white; }
.list-actions .danger { background: #b00020; }

/* Admin Galleries */
.gallery-row { display: flex; gap: 10px; margin-bottom: 0.5rem; align-items: center; }
.gallery-row input { margin-bottom: 0; }
.remove-row-btn { background: transparent; color: #b00020; border: 1px solid #b00020; border-radius: 0.3rem; cursor: pointer; font-weight: bold; padding: 0.4rem 0.8rem; height: 100%; }
.remove-row-btn:hover { background: #b00020; color: white; }
.existing-photo-row { display: flex; gap: 15px; margin-bottom: 0.8rem; align-items: center; background: #f9f9f9; padding: 0.8rem; border-radius: 0.5rem; border: 1px solid #eee; }
.existing-photo-row img { height: 50px; width: 70px; object-fit: contain; border-radius: 0.3rem; background: white; border: 1px solid #ddd; }
.existing-photo-row input[type="text"] { margin-bottom: 0; }
input[type="file"] { border: none; padding: 0; }

/* Editor (Quill) */
#editor { height: 400px; background: white; border-bottom-left-radius: 0.3rem; border-bottom-right-radius: 0.3rem; font-family: "Montserrat", sans-serif; }
.ql-toolbar { background: #f5f5f5; border-top-left-radius: 0.3rem; border-top-right-radius: 0.3rem; }

/* =========================================
   11. LOGIN & MODALS
   ========================================= */
.login-body { display: flex; justify-content: center; align-items: center; height: 100vh; background: #f5f5f5; margin: 0; }
.login-card-pad { padding: 2rem; width: 100%; max-width: 400px; }
.login-form { display: flex; flex-direction: column; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: white; padding: 1.5rem; border-radius: 0.7rem; width: 300px; }
.modal-content-large { width: 900px; max-width: 95%; }
.modal-content-scrollable { width: 700px; max-width: 95%; max-height: 85vh; overflow-y: auto; }
.modal-divider { margin: 1.5rem 0; border: 0; border-top: 1px solid #ddd; }
.modal-actions { display: flex; gap: 1rem; margin-top: 2rem; }
.modal-actions button { flex: 1; margin: 0; cursor: pointer; }

/* Admin Modal Form Layout Fixes */
.modal form label { display: block; margin-top: 1rem; margin-bottom: 0.3rem; }
.modal form input[type="text"], .modal form select, .modal form textarea { width: 100%; margin-bottom: 0.5rem; }
.modal form input[type="checkbox"] { width: auto; margin-right: 0.5rem; }

/* Lightbox specific */
#lightboxModal { flex-direction: column; }
.lightbox-content { display: flex; flex-direction: column; align-items: center; max-width: 90%; }
#lightboxImg { max-width: 100%; max-height: 70vh; border-radius: 0.7rem; object-fit: contain; }
#lightboxDesc { color: white; margin-top: 1rem; font-size: 1.2rem; text-align: center; }