/* css/custom.css - Flying NZ Aviation Theme */
/* Matches ISP standards - clean, maintainable, aviation professional */

/* ====================== COLOUR PALETTE ====================== */
:root {
    --primary-blue:     #003087;   /* Deep NZ aviation blue (trust/safety) */
    --accent-blue:      #0066cc;
    --dark-grey:        #1f2a44;
    --light-grey:       #f8f9fa;
    --success-green:    #006400;   /* Safety / jobs green */
    --warning-red:      #c8102e;   /* Urgent job expiry */
}

/* ====================== GLOBAL ====================== */
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
    color: var(--dark-grey);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}
.btn-primary:hover {
    background-color: #002266;
    border-color: #002266;
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}
.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* Badges */
.badge {
    font-weight: 500;
}

/* ====================== HERO & CAROUSEL ====================== */
/* Smooth 2-second cross-fade - permanent home */
#heroCarousel.carousel-fade .carousel-inner {
    overflow: hidden;
}
#heroCarousel.carousel-fade .carousel-item {
    transition: opacity 2000ms linear !important;
    opacity: 0;
}
#heroCarousel.carousel-fade .carousel-item.active,
#heroCarousel.carousel-fade .carousel-item-next.carousel-item-start,
#heroCarousel.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}
#heroCarousel.carousel-fade .carousel-item img {
    transition: opacity 2000ms linear !important;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Hero improvements */
.hero {
    background: linear-gradient(rgba(0, 48, 135, 0.85), rgba(31, 42, 68, 0.85));
    min-height: 420px;
}

/* ====================== CARDS & CONTENT ====================== */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.card-header {
    font-weight: 600;
}

/* News & Article content */
.article-content {
    font-size: 1.05rem;
    line-height: 1.75;
}
.article-content p {
    margin-bottom: 1.25rem;
}

/* DataTables styling */
table.dataTable thead th {
    background-color: var(--primary-blue);
    color: white;
    border-top: none;
}
table.dataTable tbody tr:hover {
    background-color: #f0f4ff;
}

/* Job expiry warning */
.text-danger.fw-bold {
    color: var(--warning-red) !important;
}

/* ====================== SIDEBAR & MISC ====================== */
.list-group-item {
    border-left: 4px solid var(--accent-blue);
    transition: all 0.2s;
}
.list-group-item:hover {
    background-color: #f0f4ff;
    border-left-color: var(--primary-blue);
}

/* Footer */
footer {
    background-color: var(--dark-grey);
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 992px) {
    .hero {
        min-height: 380px;
    }
    #heroCarousel .carousel-item img {
        max-height: 320px;
    }
}

/* Optional subtle NZ koru-inspired accent (can be expanded with SVG later) */
.border-primary {
    border-color: var(--accent-blue) !important;
}



.video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto; /* Optional: Centers the video */
}

.video-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9; /* Maintains 16:9 ratio */
    height: auto; /* Ensures height scales with width */
}

/*
 style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:600px;margin:25px auto;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.15);"
*/
 
.youtube-embed-wrapper {
	
    width: 100%;
    max-width: 800px;
    margin: 15px auto; /* Optional: Centers the video */
	
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.youtube-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}



/* Contained excerpt for Featured Story - prevents long/bold text from breaking layout */
.excerpt-container {
    max-height: 150px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    word-break: break-word;
    line-height: 1.5;
}


img {
  max-width: 100%;
  height: auto;
  margin:5px;
}