html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Dark Mode Theme */
body {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Header Banner Styles */
.header-banner {
    width: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
}

.header-image {
    width: 50%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .header-image {
        width: 100%;
    }
}

.navbar {
    background-color: #2d2d2d !important;
    border-bottom: 1px solid #404040 !important;
}

.navbar-brand,
.nav-link {
    color: #e0e0e0 !important;
}

.nav-link:hover {
    color: #4a9eff !important;
}

.footer {
    background-color: #2d2d2d;
    border-top: 1px solid #404040 !important;
}

/* Ham Radio Website Custom Styles */
.card {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    color: #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

.card-title {
    color: #4a9eff;
}

.btn-primary {
    background-color: #4a9eff;
    border-color: #4a9eff;
    color: #1a1a1a;
}

.btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
}

.btn-outline-primary {
    color: #4a9eff;
    border-color: #4a9eff;
}

.btn-outline-primary:hover {
    background-color: #4a9eff;
    border-color: #4a9eff;
    color: #1a1a1a;
}

.badge {
    background-color: #404040 !important;
    color: #e0e0e0;
}

.text-muted {
    color: #999 !important;
}

.blog-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #e0e0e0;
}

.blog-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #4a9eff;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content ul {
    margin-bottom: 1.5rem;
}

.blog-content a {
    color: #4a9eff;
}

.blog-content a:hover {
    color: #6bb3ff;
}

.list-group-item {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

.list-group-item:hover {
    background-color: #353535;
}

.list-group-item-action:hover {
    background-color: #353535;
    color: #4a9eff;
}

.alert-info {
    background-color: #2d4d5d;
    border-color: #4a9eff;
    color: #e0e0e0;
}

.alert-warning {
    background-color: #5d4d2d;
    border-color: #ffa94a;
    color: #e0e0e0;
}

a {
    color: #4a9eff;
}

a:hover {
    color: #6bb3ff;
}

.text-dark {
    color: #e0e0e0 !important;
}

hr {
    border-color: #404040;
    opacity: 1;
}

/* Skywarn Badge Styling */
.skywarn-badge {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    font-weight: 600;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.skywarn-console-badge {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    font-weight: 600;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(74, 85, 104, 0.4);
}

.callsign {
    color: #4a9eff;
    font-weight: 700;
    font-size: 1.1em;
    letter-spacing: 1px;
}

/* Hero Section with Banner */
.hero-section {
    padding: 0;
    position: relative;
}

.banner-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(74, 158, 255, 0.3);
}

.hero-banner {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .hero-banner {
        border-radius: 8px;
    }

    .banner-container {
        border-radius: 8px;
    }
}

/* Modal Fixes - Prevent fluttering and scrollbar issues */
.modal {
    overflow-y: auto !important;
}

.modal-backdrop {
    position: fixed !important;
}

body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

/* Disable modal transitions to prevent fluttering */
.modal.fade .modal-dialog {
    transition: none !important;
    -webkit-transition: none !important;
}

.modal.fade {
    transition: none !important;
    -webkit-transition: none !important;
}

.modal-backdrop.fade {
    transition: none !important;
    -webkit-transition: none !important;
}

/* Prevent double scrollbars */
.modal-dialog {
    margin: 1.75rem auto;
    pointer-events: auto;
}

/* Dark mode modal styling */
.modal-content {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    color: #e0e0e0;
}

.modal-header {
    border-bottom-color: #404040;
}

.modal-footer {
    border-top-color: #404040;
}

.btn-close {
    filter: invert(1);
}

.form-control {
    background-color: #1a1a1a;
    border-color: #404040;
    color: #e0e0e0;
}

.form-control:focus {
    background-color: #1a1a1a;
    border-color: #4a9eff;
    color: #e0e0e0;
}

.form-check-input {
    background-color: #1a1a1a;
    border-color: #404040;
}

.form-check-input:checked {
    background-color: #4a9eff;
    border-color: #4a9eff;
}

.table {
    color: #e0e0e0;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    color: #e0e0e0;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Keep old ham graphics styles for potential future use */
.ham-graphics {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.ham-icon {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
    opacity: 0.8;
    filter: drop-shadow(0 0 10px rgba(74, 158, 255, 0.5));
}

.ham-icon:nth-child(1) {
    animation-delay: 0s;
}

.ham-icon:nth-child(2) {
    animation-delay: 0.5s;
}

.ham-icon:nth-child(3) {
    animation-delay: 1s;
}

.ham-icon:nth-child(4) {
    animation-delay: 1.5s;
}

.ham-icon:nth-child(5) {
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .ham-icon {
        font-size: 2rem;
        gap: 1rem;
    }

    .ham-graphics {
        gap: 1rem;
    }
}

/* Custom Modal - No Bootstrap JS, No Fluttering */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.custom-modal-dialog {
    position: relative;
    width: 90%;
    max-width: 500px;
    z-index: 1055;
    margin: 20px;
}

.custom-modal-dialog .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    background-clip: padding-box;
    outline: 0;
}

/* Prevent layout shift when modal opens */
body {
    overflow-y: scroll !important;
}

html {
    overflow-y: scroll !important;
}

@media (min-width: 576px) {
    .custom-modal-dialog {
        max-width: 500px;
    }
}
