﻿/* =============================================================================
   GLOBAL STYLES - These apply to the entire website
   ============================================================================= */

/* Main body styling - sets the overall look of the page */
body {
    /* Easy to read font */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Ubuntu, sans-serif;         
    margin: 0;                               /* Remove default browser margins */
    padding: 0;                              /* No body padding - handled by navbar/container */
    background-color: rgb(0, 58, 112);      /* WNCC blue background */
    color: #ffffff;                          /* White text for contrast */
}

p{
    line-height: 150%;
}

/* General link styling throughout the site */
a {
    color: white;                           /* White links by default */
    text-decoration: underline;               /* Underlined to show they're clickable */
}

a:hover {
    color: #ff6b35;                          /* Orange when hovering over links */
}

/* Container to center content and limit width on large screens */
.container {
    max-width: 1200px;                       /* Don't get too wide on big monitors */
    margin: 0 auto;                          /* Center the container */
}


/* =============================================================================
   NAVIGATION BAR STYLES - Top menu with links
   ============================================================================= */

/* Main navbar background - keeps WNCC blue theme */
.navbar,
.navbar-expand-lg {
    background-color: rgb(0, 58, 112) !important;  /* Force WNCC blue */
    background: rgb(0, 58, 112) !important;         /* Backup blue */
    border: none !important;                        /* Remove default borders */
    padding: 20px 20px 0 20px;                     /* Top/side padding for navbar */
}

/* The container inside the navbar - adds subtle styling */
.navbar .container {
    background: rgba(255, 255, 255, 0.05);  /* Very light transparent white overlay */
    border: 1px solid #ff6b35;              /* Orange border for WNCC branding */
    border-radius: 0.375rem;                /* Rounded corners */
    margin-top: 0;                          /* No extra top margin */
    margin-bottom: 1rem;                    /* Space below navbar */
    padding: 0.75rem 1rem;                  /* Internal spacing */
}

/* Main content container padding */
body > .container,
main .container,
#content .container {
    padding-left: 20px;
    padding-right: 20px;
}

/* Individual navigation links styling */
.navbar-nav .nav-link {
    color: #ffffff !important;               /* White text */
    font-weight: 500;                       /* Medium bold text */
    padding: 0.75rem 1rem !important;      /* Space around each link */
    border-radius: 5px;                     /* Rounded corners */
    margin: 0 0.25rem;                      /* Space between links */
    transition: all 0.3s ease;             /* Smooth animation for hover effects */
}

/* Navigation link hover effects - what happens when you point at a link */
.navbar-nav .nav-link:hover {
    background-color: #0d6efd;              /* Blue background on hover */
    color: #ffffff !important;              /* Keep text white */
    transform: translateY(-1px);            /* Slight upward movement */
}

/* Active/focused navigation link styling */
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    background-color: #0056b3;              /* Darker blue for active page */
    color: #ffffff !important;              /* White text */
}

/* Site title/brand styling */
.navbar-brand {
    color: #ffffff !important;              /* White brand text */
}

.navbar-brand:hover {
    color: #ff6b35 !important;              /* Orange when hovering over brand */
}


/* =============================================================================
   CARD COMPONENTS - Boxes that contain content sections
   ============================================================================= */

/* Main card container styling */
.card {
    background: rgba(255, 255, 255, 0.05);  /* Very light transparent background */
    border: 1px solid #ff6b35;              /* Orange border for WNCC theme */
    margin-bottom: 2rem;                     /* Space between cards */
}

/* Card header (title area) styling */
.card-header {
    background-color: #ff6b35;              /* Orange background for headers */
    color: white;                           /* White text */
    font-weight: bold;                      /* Bold text for emphasis */
}

/* Card body (main content area) styling */
.card-body {
    background-color: rgba(255, 255, 255, 0.05);  /* Light transparent background */
    color: white;                                   /* White text */
}
.btn-primary {
    background-color: #e94560;
    border-color: #e94560;
}

.btn-primary:hover {
    background-color: #d63447;
    border-color: #d63447;
}

/* Off-white color for muted text */
.text-muted,
.post-meta {
    color: #b0b0b0 !important;
}

/* =============================================================================
   VIDEO STREAMING STYLES - For the camera feed display
   ============================================================================= */

/* Container that holds the video stream */
.stream-container {
    position: relative;                      /* Allows positioning of child elements */
    min-height: 300px;                      /* Minimum height even if no video */
    display: flex;                          /* Flexible layout */
    align-items: center;                    /* Center content vertically */
    justify-content: center;                /* Center content horizontally */
    background-color: #2d2d2d;             /* Dark background */
    border-radius: 10px;                   /* Rounded corners */
    padding: 20px;                         /* Internal spacing */
    margin: 20px 0;                        /* Space above and below */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);  /* Drop shadow for depth */
}

/* The actual video element styling */
.stream-video {
    max-width: 100%;                        /* Never wider than container */
    height: auto;                           /* Maintain aspect ratio */
    border: 2px solid #ff6b35;             /* Orange border */
    border-radius: 5px;                    /* Rounded corners */
    background-color: #000;                /* Black background while loading */
}

/* Text shown while video is loading */
.stream-loading {
    text-align: center;                     /* Center the loading text */
    color: white;                           /* White text */
}

/* Text shown when video fails to load */
.stream-error {
    text-align: center;                     /* Center the error text */
    color: #ff6b35;                         /* Orange text to indicate error */
}

/* Loading spinner animation */
.spinner {
    border: 4px solid rgba(255, 107, 53, 0.3);  /* Light orange border */
    border-top: 4px solid #ff6b35;              /* Solid orange top */
    border-radius: 50%;                          /* Make it circular */
    width: 40px;                                 /* Spinner size */
    height: 40px;                                /* Spinner size */
    animation: spin 2s linear infinite;          /* Continuous spinning */
    margin: 0 auto 15px;                        /* Center with space below */
}

/* Animation for the spinner rotation */
@keyframes spin {
    0% { transform: rotate(0deg); }         /* Start position */
    100% { transform: rotate(360deg); }     /* End position (full rotation) */
}


/* =============================================================================
   CHART/GRAPH STYLES - For sensor data displays
   ============================================================================= */

/* Container that holds multiple charts */
.charts-container {
    display: flex;                          /* Flexible layout */
    flex-wrap: wrap;                        /* Allow wrapping to new lines */
    justify-content: center;                /* Center the charts */
    gap: 20px;                             /* Space between charts */
    margin: 20px 0;                        /* Space above and below */
}

/* Individual chart iframe styling */
.chart-iframe {
    border: 1px solid #ff6b35;             /* Orange border */
    border-radius: 5px;                    /* Rounded corners */
    width: 100%;                           /* Full width of container */
    height: 260px;                        /* Fixed height */
    flex: 1;                               /* Grow to fill available space */
    min-width: 280px;                      /* Don't get too narrow */
    max-width: 460px;                      /* Don't get too wide */
}

/* Responsive design - stack charts on smaller screens */
@media (max-width: 1024px) {
    .charts-container {
        flex-direction: column;             /* Stack vertically on small screens */
        align-items: center;                /* Center the stacked charts */
    }
}


/* =============================================================================
   PHOTO GALLERY STYLES - For the image gallery page
   ============================================================================= */

/* Individual gallery image styling */
.gallery-image {
    cursor: pointer;                        /* Show pointer cursor (indicates clickable) */
    transition: transform 0.2s ease;       /* Smooth scaling animation */
    max-width: 352px;                       /* 10% bigger than 320px */
    width: 100%;                            /* Fill container up to max */
    height: auto;                           /* Keep original aspect ratio */
    object-fit: contain;                    /* Show full image, no crop */
    display: block;                         /* Remove inline gap */
    margin: 0 16px 16px 0;                  /* Space between images */
}

/* Gallery flow: images left-to-right, text wraps */
.gallery-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    justify-content: flex-start;
}

.gallery-flow .gallery-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
    max-width: 352px;
}

/* Hover effect for gallery images - slight zoom */
.gallery-image:hover {
    transform: scale(1.02);                 /* Slightly enlarge image on hover */
}

/* Small badge/indicator that appears on images */
.gallery-indicator {
    position: absolute;                     /* Position relative to parent */
    top: 8px;                              /* 8px from top */
    right: 8px;                            /* 8px from right */
    opacity: 0.8;                          /* Slightly transparent */
    transition: opacity 0.2s ease;         /* Smooth fade animation */
}

/* Make indicator more visible when hovering over image container */
.position-relative:hover .gallery-indicator {
    opacity: 1;                            /* Fully visible on hover */
}

/* Gallery drag/edit handles: improve visibility on images */
.drag-handle,
.edit-handle {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(0, 0, 0, 0.35) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1;
}

.drag-handle:hover,
.drag-handle:focus,
.edit-handle:hover,
.edit-handle:focus {
    color: #000 !important;
    background-color: #fff !important;
    border-color: #fff !important;
}

