/* Global Styles & Variables */

:root {
    --brand-blue: #0052a5;
    --brand-yellow: #ffd700;
    --brand-white: #ffffff;
    --text-dark: #333333;
    --text-light: #f8f9fa;
    --bg-light: #f8f9fa;
    --bg-dark: #343a40;
    --border-color: #dee2e6;
    --shadow-light: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 8px 16px rgba(0, 0, 0, 0.2);
    --font-primary: 'Inter', sans-serif;
    --modal-backdrop: rgba(0, 0, 0, 0.75);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base font size */
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--brand-white);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
    /* Adjusted padding */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    /* Adjusted font size */
    margin-bottom: 40px;
    /* Adjusted margin */
    font-weight: 700;
    color: var(--brand-blue);
}

.section-title .text-yellow {
    color: var(--brand-yellow);
}

.section-title .text-blue {
    color: var(--brand-blue);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    /* Adjusted font size */
    color: #555;
    margin-bottom: 30px;
    /* Adjusted margin */
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.bg-light {
    background-color: var(--bg-light);
}

.hidden {
    display: none !important;
}


/* Image Modal Styles */

.image-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 85%;
    border-radius: 8px;
    animation: zoomIn 0.3s ease-out;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--brand-white);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: var(--brand-yellow);
    text-decoration: none;
}

#imageModalCaption,
#projectGalleryModalCaption {
    margin: 15px auto 0;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--border-color);
    padding: 10px 0;
    font-size: 1.1rem;
}


/* Project Gallery Modal Specifics */

.project-gallery-modal-content {
    position: relative;
    background-color: var(--brand-white);
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.project-gallery-modal-main-image {
    max-width: 100%;
    max-height: 65vh;
    /* Adjust as needed */
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 6px;
    cursor: zoom-in;
    /* Indicate zoomable */
}

.project-gallery-modal-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    max-width: 100%;
}

.project-gallery-modal-thumbnails img-replace {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.project-gallery-modal-thumbnails img-replace.active,
.project-gallery-modal-thumbnails img-replace:hover {
    border-color: var(--brand-blue);
}

.project-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 82, 165, 0.7);
    color: var(--brand-white);
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    z-index: 1001;
    /* Ensure above main image */
}

.project-gallery-nav.prev {
    left: 5px;
}

.project-gallery-nav.next {
    right: 5px;
}

.project-gallery-nav:hover {
    background-color: var(--brand-blue);
}


/* Animations */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    /* Adjusted transform */
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    /* Adjusted transform */
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    /* Adjusted scale */
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Accessibility */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


/* Required Asterisk */

.required-asterisk {
    color: red;
    margin-left: 2px;
}


/* Form Hint */

.form-hint {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}


/* Success Message */

.form-success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
}


/* Smooth scrolling */

html {
    scroll-behavior: smooth;
}


/* Loading states */

.btn-loading {
    display: none;
}

.form-submit-btn.loading .btn-text {
    display: none;
}

.form-submit-btn.loading .btn-loading {
    display: inline;
}