/* CSS Custom Properties - Modern & Clean Green Accent Theme Palette */
:root {
    /* Primary Colors - Modern & Clean Green Accent Palette */
    --primary-color: #37474f;           /* Dark Gray-Blue - Text & Key Elements */
    --secondary-color: #4caf50;         /* Green - Buttons & Accents */
    --background-color: #eceff1;        /* Light Gray (almost white) - Background */
    --accent-color: #cfd8dc;            /* Light Gray-Blue - Highlights & Active States */
    --error-color: #d32f2f;             /* Dark Red - Error/Warning */

    /* Button Color Variations - Green Accent Theme */
    --button-hover: #43a047;            /* Darker Green */
    --button-active: #388e3c;           /* Even Darker Green */

    /* Text Colors */
    --text-primary: #37474f;            /* Dark Gray-Blue */
    --text-secondary: #546e7a;          /* Steel Blue (complements the palette) */
    --text-muted: #78909c;              /* Muted text */

    /* Typography */
    --font-heading: 'Roboto Slab', serif;
    --font-body: 'Open Sans', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;

    /* Font Sizes */
    --font-size-h1: 2.5rem;
    --font-size-h2: 2rem;
    --font-size-h3: 1.5rem;
    --font-size-body: 1rem;
    --font-size-button: 0.9rem;
    --font-size-small: 0.8rem;

    /* Line Heights */
    --line-height-body: 1.6;
    --line-height-heading: 1.2;
    --line-height-tight: 1.4;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;

    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 10px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 0 20px rgba(0,0,0,0.15);

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.5s ease;
    --transition-slow: 1s ease;
}

.underline{
    height: 4px;
    width: 120px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 2px;
}
.header{
    background-image: linear-gradient(rgba(4, 9, 30, 0.7), rgba(0, 0, 0, 0.5), rgba(4, 9, 30, 0.7)), url(../images/michael.png);
    width: 100%;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    position: relative;
}
.hero-btn{
    display: inline-block;
    text-decoration: none;
    color: var(--background-color);
    border: 1px solid var(--background-color);
    padding: 12px 34px;
    font-size: var(--font-size-button);
    background-color: var(--secondary-color);
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.hero-btn:hover{
    border: 1px solid var(--button-hover);
    background: var(--button-hover);
    color: var(--background-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero-btn:active{
    background: var(--button-active);
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}
.text-box{
    width: 90%;
    color: #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.text-box h1{
    font-size: var(--font-size-h1);
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
    line-height: var(--line-height-heading);
}
.text-box p{
    margin: 10px 0 40px;
    font-size: var(--font-size-body);
    color: #ffffff;
    font-family: var(--font-body);
    font-weight: 400;
    line-height: var(--line-height-body);
}
.course{
    width: 80%;
    margin: auto;
    text-align: center;
    padding-top: 100px;


}
h1{
    font-size: var(--font-size-h2);
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: var(--line-height-heading);
    margin-bottom: var(--spacing-md);
}

h2{
    font-size: var(--font-size-h2);
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: var(--line-height-heading);
    margin-bottom: var(--spacing-md);
}

h3{
    font-size: var(--font-size-h3);
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: var(--line-height-heading);
    margin-bottom: var(--spacing-sm);
}

p{
    color: var(--text-secondary);
    font-size: var(--font-size-body);
    font-weight: 400;
    line-height: var(--line-height-body);
    padding: 10px;
    font-family: var(--font-body);
    margin-bottom: var(--spacing-md);
}

.course-row{
    margin-top: 5%;
    display: flex;
    justify-content: space-between;

}

.column{
    margin-top: 5%;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.course-col{
    flex-basis: 31%;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 100%);
    border-radius: var(--border-radius-lg);
    margin-bottom: 5%;
    padding: 20px 12px;
    box-sizing: border-box;
    transition: var(--transition-normal);
    border: 1px solid rgba(76, 175, 80, 0.15);
    box-shadow: var(--shadow-sm);
}
h3{
    text-align: center;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: var(--font-size-h3);
    color: var(--text-primary);
    margin: 10px 0;
    line-height: var(--line-height-heading);
}
.course-col:hover{
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    background: linear-gradient(135deg, #ffffff 0%, #e8f6e8 100%);
}


@media(max-width: 700px){
    #rowx{
        flex-direction: column;
    }
}


/* Services Hover Effect */
.card{
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: 0.5s;
}

#ok img{
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
}

#ok:hover img{
    transform: scale(1.05);
}

.card .layer{
    background: transparent;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: 0.5s;
    z-index: 2;
}

.card:hover .layer{
    background: rgba(33, 37, 41, 0.8);
}

.card .layer h5{
    width: 100%;
    font-weight: 600;
    color: #ffffff;
    font-size: 18px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    opacity: 0;
    transition: 0.5s;
    padding: 0 15px;
}

.card:hover .layer h5{
    bottom: 60%;
    opacity: 1;
}

.card .layer p{
    width: 100%;
    font-weight: 400;
    color: #ffffff;
    font-size: 14px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    opacity: 0;
    transition: 0.5s;
    padding: 0 20px;
    line-height: 1.4;
}

.card:hover .layer p{
    bottom: 30%;
    opacity: 1;
}

.card .layer .text-primary{
    width: auto;
    font-weight: 500;
    color: #ffffff;
    font-size: 12px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    opacity: 0;
    transition: 0.5s;
    text-decoration: none;
    background: transparent;
    border: 1px solid #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
}

.card:hover .layer .text-primary{
    bottom: 10%;
    opacity: 1;
}

.card .layer .text-primary:hover{
    background: var(--background-color);
    color: var(--primary-color) !important;
    border-color: var(--background-color);
}

/* Fix sticky form and navbar overlap */
.navbar-wrapper{
    z-index: 1030;
}

.sticky-form-container {
    position: sticky !important;
    top: 140px !important;
    z-index: 1020;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

/* Ensure navbar stays on top */
.sticky-top {
    z-index: 1030;
}

/* Add margin to body content to account for sticky navbar */
body {
    padding-top: 0;
    background: linear-gradient(135deg, var(--background-color) 0%, #e3f2fd 100%) !important;
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: var(--line-height-body);
    min-height: 100vh;
}

/* General Button Styles */
.btn {
display: inline-block;
padding: 12px 24px;
font-size: var(--font-size-button);
font-family: var(--font-body);
font-weight: 600;
text-transform: uppercase;
text-decoration: none;
border: none;
border-radius: var(--border-radius-sm);
cursor: pointer;
transition: var(--transition-fast);
box-shadow: var(--shadow-sm);
line-height: 1;
}

.btn-primary {
background-color: var(--secondary-color);
color: var(--background-color);
}

.btn-primary:hover {
background-color: var(--button-hover);
color: var(--background-color);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}

.btn-primary:active {
background-color: var(--button-active);
transform: translateY(0);
box-shadow: var(--shadow-sm);
}

.btn-secondary {
background-color: var(--background-color);
color: var(--secondary-color);
border: 1px solid var(--secondary-color);
}

.btn-secondary:hover {
background-color: var(--secondary-color);
color: var(--background-color);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}

/* Accessibility Improvements */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}

/* Focus styles for better accessibility */
*:focus {
outline: 2px solid var(--accent-color);
outline-offset: 2px;
}

.btn:focus,
.hero-btn:focus {
outline: 2px solid var(--accent-color);
outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
:root {
    --primary-color: #000000;
    --secondary-color: #000080;
    --background-color: #ffffff;
    --accent-color: #000080;
    --text-primary: #000000;
    --text-secondary: #333333;
}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
* {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}
}

/* Login/Register Modal Styles */
.modal-header {
    border-bottom: none;
}

.modal-footer {
    border-top: none;
}

.modal-content {
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

#loginForm, #registerForm {
    padding: 10px;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--accent-color);
    padding: 10px 12px;
    font-size: var(--font-size-body);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(130, 111, 111, 0.25);
}

/* Fourth Section Styles - Modern & Clean Theme */
.fourth-section {
    background: linear-gradient(135deg, var(--background-color) 0%, var(--accent-color) 100%) !important;
    border-top: 1px solid rgba(76, 175, 80, 0.1) !important;
}

.fourth-section h2 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
}

.fourth-section p {
    color: var(--text-secondary);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
}

/* User Icon and Dropdown Styles */
.navbar-nav .dropdown-menu {
    min-width: 200px;
}

.navbar-nav .dropdown-item {
    padding: 10px 20px;
    font-size: var(--font-size-body);
}

.navbar-nav .dropdown-item:hover {
    background-color: var(--accent-color);
    color: var(--background-color);
}

/* Navbar spacing and alignment fixes */
.navbar-nav .nav-item {
    margin-left: 0.75rem;
}

.navbar-nav .nav-link {
    white-space: nowrap;
    padding: 0.5rem 1rem;
}

.navbar-nav .dropdown-toggle {
    padding: 0.5rem 0.75rem;
    margin-left: 0.25rem;
}

.navbar-nav .dropdown-toggle i {
    display: block;
    margin: 0 auto;
}

/* Ensure proper spacing on mobile devices */
@media (max-width: 991.98px) {
    .navbar-nav .nav-item {
        margin-left: 0;
        margin-bottom: 0.25rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1.25rem;
        text-align: center;
    }

    .navbar-nav .dropdown-toggle {
        justify-content: center;
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
    }

    /* Stack items vertically on very small screens */
    .navbar-nav {
        text-align: center;
    }
}

/* Extra small screens - ensure adequate spacing */
@media (max-width: 575.98px) {
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .navbar-nav .dropdown-toggle {
        padding: 0.75rem 0.875rem;
        font-size: 1rem;
    }

    /* Make the user icon slightly smaller on very small screens */
    .navbar-nav .dropdown-toggle i {
        font-size: 1.4rem;
    }
    
    /* Ensure dropdown arrow stays inline and prevent wrapping */
    .navbar-nav .dropdown-toggle {
        display: inline-flex !important;
        align-items: center;
        white-space: nowrap;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    .navbar-nav .dropdown-toggle::after {
        margin-left: 0.5em;
        flex-shrink: 0;
    }
    
    /* Stronger rule to prevent any wrapping */
    .navbar-nav .nav-item.dropdown {
        white-space: nowrap;
        display: inline-block;
    }
    
    /* Target the specific dropdown in navbar */
    .navbar-nav .nav-item.dropdown .dropdown-toggle {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: auto;
    }
    
    /* Ensure navbar has enough space and doesn't wrap */
    .navbar-nav.ms-auto {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    /* Override Bootstrap's navbar-nav on smaller screens if needed */
    @media (min-width: 992px) {
        .navbar-expand-lg .navbar-nav .dropdown-toggle {
            white-space: nowrap;
            overflow: visible;
        }
    
        .navbar-expand-lg .navbar-nav .nav-item.dropdown {
            flex-shrink: 0;
        }
    }
    
    /* Fix Bootstrap dropdown arrow wrapping issue */
    .dropdown-toggle::after {
        display: inline-block;
        margin-left: 0.255em;
        vertical-align: 0.255em;
        content: "";
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-bottom: 0;
        border-left: 0.3em solid transparent;
    }
    
    /* Ensure no wrapping in navbar dropdown specifically */
    .navbar .navbar-nav .dropdown-toggle::after {
        flex-shrink: 0;
        margin-left: 0.5em;
    }
    
    /* Ultimate fix for dropdown wrapping - treat as single unbreakable unit */
    .navbar-nav .nav-item.dropdown {
        position: relative;
        white-space: nowrap;
    }
    
    .navbar-nav .nav-item.dropdown .dropdown-toggle {
        display: inline-flex !important;
        align-items: center;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    /* Ensure the icon and arrow never separate */
    .navbar-nav .nav-item.dropdown .dropdown-toggle i {
        flex-shrink: 0;
    }
    
    .navbar-nav .nav-item.dropdown .dropdown-toggle::after {
        flex-shrink: 0;
        margin-left: 0.5em !important;
    }
}

/* Make Alert Messages Wider - HIGHER SPECIFICITY TO OVERRIDE BOOTSTRAP */
.container .alert,
.container-fluid .alert,
.row .alert,
.main .alert,
.main-content .alert,
body .alert {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Extra specificity for admin pages */
.container .alert.alert-success {
    width: calc(100% + 2rem) !important;
    max-width: calc(100% + 2rem) !important;
    margin-left: -1rem !important;
    margin-right: -1rem !important;
}

/* User icon styling */
.nav-link .bi-person-circle {
    transition: var(--transition-fast);
}

.nav-link .bi-person-circle:hover {
    color: var(--secondary-color) !important;
    transform: scale(1.1);
}

/* Service Login Modal Styles */
#serviceLoginModal .modal-content {
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

#serviceLoginModal .modal-body {
    padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
 .sticky-form-container {
     position: static !important;
     top: auto !important;
     margin-top: 20px;
 }

 /* Responsive typography */
 :root {
     --font-size-h1: 2rem;
     --font-size-h2: 1.75rem;
     --font-size-h3: 1.25rem;
 }

 /* Modal responsive adjustments */
 .modal-dialog {
     margin: 10px;
 }

 #loginForm, #registerForm {
     padding: 5px;
 }

}

/* Services Container - Simplified */

/* Image Overlay System */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-overlay {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   z-index: 2;
   pointer-events: none;
}

.overlay-section {
    position: absolute;
    width: 100%;
    height: 33.333%;
    transition: opacity 0.3s ease;
}

.overlay-top {
    top: 0;
    left: 0;
    right: 0;
    height: 33.333%;
    background: rgba(0, 123, 255, 0.7);
}

.overlay-middle {
    top: 33.333%;
    left: 0;
    right: 0;
    height: 33.334%;
    background: rgba(220, 53, 69, 0.7);
}

.overlay-bottom {
    top: 66.667%;
    left: 0;
    right: 0;
    height: 33.333%;
    background: rgba(40, 167, 69, 0.7);
}

/* Hover effects for overlay sections */
.image-container:hover .overlay-top {
   opacity: 0.9;
}

.image-container:hover .overlay-middle {
   opacity: 0.9;
}

.image-container:hover .overlay-bottom {
   opacity: 0.9;
}