/* Custom styles with early 1960s British Railways color scheme */

/* Early 1960s BR Color Variables */
:root {
    --br-green: #355E3B;             /* Traditional BR Locomotive Green */
    --br-dark-green: #2d4a2d;       /* Darker shade for depth */
    --br-light-green: #4a7c59;      /* Lighter green for accents */
    --br-cream: #f5f2e8;            /* BR Cream/Off-white lining */
    --br-maroon: #4A1D2A;           /* BR Maroon */
    --br-ivory: #fffff0;            /* Ivory for backgrounds */
    --br-yellow: #ffd700;           /* Warning Yellow */
    --br-red: #c41e3a;              /* Buffer Beam Red */
    --br-chocolate: #7b3f00;        /* Chocolate brown for coaches */
    --br-light-grey: #e8e6e1;       /* Light grey for backgrounds */
    --br-dark-grey: #4a4a4a;        /* Dark grey for text */
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom hero section styling */
.hero {
    background: linear-gradient(135deg, var(--br-green) 0%, var(--br-light-green) 100%);
    min-height: 100vh;
    padding-top: 120px; /* Account for fixed navbar */
}

/* Navbar custom styling */
.navbar {
    background-color: var(--br-maroon) !important;
    transition: background-color 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--br-cream) !important;
    font-weight: bold;
}

.nav-link {
    color: var(--br-cream) !important;
}

.nav-link:hover {
    color: var(--br-yellow) !important;
}

/* Gallery card hover effects */
.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--br-light-grey) !important;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(53,94,59,0.15) !important;
    border-color: var(--br-light-green) !important;
}

/* Technical cards with BR Green colors */
.border-primary {
    border-color: var(--br-light-green) !important;
}

.text-primary {
    color: var(--br-green) !important;
}

/* Section headings */
h2 {
    color: var(--br-green) !important;
}

/* BR-themed buttons */
.btn-danger {
    background-color: var(--br-red) !important;
    border-color: var(--br-red) !important;
}

.btn-danger:hover {
    background-color: #a01729 !important;
    border-color: #a01729 !important;
}

/* Card styling with early 1960s BR colors */
.card {
    border-color: var(--br-light-grey) !important;
    background-color: var(--br-ivory) !important;
}

.bg-light {
    background-color: var(--br-cream) !important;
}

/* Section spacing */
section {
    scroll-margin-top: 80px; /* Account for fixed navbar */
}

/* Smooth hover effects for buttons */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Custom focus styles for accessibility with early 1960s BR colors */
a:focus,
button:focus,
.btn:focus {
    outline: 3px solid var(--br-yellow);
    outline-offset: 2px;
}

/* Links with BR Green colors */
a {
    color: var(--br-green);
}

a:hover {
    color: var(--br-dark-green);
}

/* Footer with BR Green styling */
.bg-dark {
    background-color: var(--br-green) !important;
}

/* Text colors */
.text-muted {
    color: var(--br-dark-grey) !important;
}

/* Contact section links */
.text-decoration-none {
    color: var(--br-green) !important;
}

.text-decoration-none:hover {
    color: var(--br-dark-green) !important;
}

/* Image modal styles with early 1960s BR colors */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(53,94,59,0.9); /* BR Green with transparency */
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background-color: var(--br-cream);
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    border: 2px solid var(--br-green);
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: var(--br-dark-grey);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.close:hover,
.close:focus {
    color: var(--br-green);
}

.modal-caption {
    margin-top: 15px;
    font-weight: 600;
    color: var(--br-green);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
    }
    
    .modal-content {
        padding: 10px;
        margin: 20px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support with early 1960s BR colors */
@media (prefers-contrast: high) {
    .hero {
        background: var(--br-green);
        color: var(--br-cream);
    }
    
    .navbar {
        background-color: var(--br-green) !important;
        border-bottom: 2px solid var(--br-cream);
    }
    
    .card {
        border: 2px solid var(--br-green) !important;
    }
}
