/* ===================================
   Modern UI Enhancement CSS
   Created for MMPI Falcon Training Academy
   ================================== */

/* CSS Custom Properties (Variables) */
:root {
    --primary-color: #0071ef;
    --primary-dark: #0056b3;
    --primary-light: #4da3ff;
    --secondary-color: #2c3e50;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #e8e8e8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.18);
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
}

/* ===================================
   Global Enhancements
   ================================== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ===================================
   Typography Enhancements
   ================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    line-height: 1.7;
    color: var(--text-dark);
}

/* ===================================
   Banner Section Modern Styling
   ================================== */
.banner-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 113, 239, 0.85) 0%, rgba(44, 62, 80, 0.75) 100%);
    z-index: 1;
}

.banner-section .container {
    position: relative;
    z-index: 2;
}

.banner-content h2 {
    background: rgba(0, 113, 239, 0.95) !important;
    padding: 15px 30px;
    border-radius: var(--border-radius-md);
    display: inline-block;
    box-shadow: var(--shadow-lg);
    transform: translateY(0);
    transition: transform var(--transition-base);
}

.banner-content h2:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.banner-content h1 {
    font-size: 3.5rem;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
}

@media (max-width: 768px) {
    .banner-content h1 {
        font-size: 2rem;
    }

    .banner-section {
        min-height: 450px;
    }
}

/* ===================================
   Button Enhancements
   ================================== */
.lab-btn {
    position: relative;
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-base);
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--shadow-md);
}

.lab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.lab-btn:hover::before {
    left: 100%;
}

.lab-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: var(--white);
}

.lab-btn:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.lab-btn span {
    position: relative;
    z-index: 2;
}

/* ===================================
   Card and Feature Item Styling
   ================================== */
.lab-item.feature-item {
    transition: all var(--transition-base);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    height: 100%;
}

.lab-item.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.lab-inner {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lab-thumb {
    margin-bottom: 20px;
    transition: transform var(--transition-base);
}

.lab-item:hover .lab-thumb {
    transform: scale(1.1) rotate(5deg);
}

.lab-content h4 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    transition: color var(--transition-base);
}

.lab-item:hover .lab-content h4 {
    color: var(--primary-color);
}

.lab-content p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ===================================
   Section Headers
   ================================== */
.section-header {
    position: relative;
    margin-bottom: 30px;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2 span {
    color: var(--primary-color);
    position: relative;
}

.section-header h2 span::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    animation: slideIn 0.8s ease forwards;
}

@keyframes slideIn {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* ===================================
   Counter Section
   ================================== */
.counter-item {
    transition: all var(--transition-base);
    padding: 20px;
    border-radius: var(--border-radius-lg);
}

.counter-item:hover {
    transform: translateY(-10px);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.counter-item-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.counter-thumb img {
    transition: all var(--transition-base);
    filter: brightness(1);
}

.counter-item:hover .counter-thumb img {
    transform: rotate(360deg) scale(1.1);
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(200deg) brightness(97%) contrast(97%);
}

.counter-content .number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter-item .counter-content .post-content {
    color: var(--text-dark) !important;
}

.counter-item:hover .counter-content .post-content {
    color: var(--secondary-color) !important;
}

/* ===================================
   Service Section
   ================================== */
.service-section.style-1 .section-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: stretch;
}

@media (min-width: 768px) {
    .service-section.style-1 .section-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .service-section.style-1 .section-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-section.style-1 .section-wrapper .service-item:nth-child(1),
    .service-section.style-1 .section-wrapper .service-item:nth-child(4) {
        grid-column: span 2;
    }
}

.service-item {
    margin-bottom: 0 !important;
    transition: all var(--transition-base);
    width: 100% !important;
    float: none !important;
}

.service-inner {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .service-section.style-1 .section-wrapper .service-item:nth-child(1) .service-inner {
        flex-direction: row;
    }

    .service-section.style-1 .section-wrapper .service-item:nth-child(4) .service-inner {
        flex-direction: row-reverse;
    }
}

.service-item:hover .service-inner {
    box-shadow: var(--shadow-xl);
    transform: translateY(-10px);
}

.service-thumb {
    overflow: hidden;
    position: relative;
    height: 250px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .service-section.style-1 .section-wrapper .service-item:nth-child(1) .service-thumb,
    .service-section.style-1 .section-wrapper .service-item:nth-child(4) .service-thumb {
        width: 50%;
        height: auto;
        min-height: 300px;
    }

    .service-section.style-1 .section-wrapper .service-item:nth-child(2) .service-thumb,
    .service-section.style-1 .section-wrapper .service-item:nth-child(3) .service-thumb {
        height: 250px;
    }
}

.service-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 113, 239, 0.3) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-item:hover .service-thumb::after {
    opacity: 1;
}

.service-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.service-item:hover .service-thumb img {
    transform: scale(1.15) rotate(2deg);
}

.service-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .service-section.style-1 .section-wrapper .service-item:nth-child(1) .service-content,
    .service-section.style-1 .section-wrapper .service-item:nth-child(4) .service-content {
        width: 50%;
    }
}

.service-content h4 {
    font-size: 1.75rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    transition: color var(--transition-base);
}

.service-item:hover .service-content h4 {
    color: var(--primary-color);
}

.service-content p {
    flex: 1;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Special styling for 2nd and 3rd service items */
.service-section.style-1 .section-wrapper .service-item:nth-child(2) .service-content {
    background: #3156a3;
}

.service-section.style-1 .section-wrapper .service-item:nth-child(2) .service-content h4,
.service-section.style-1 .section-wrapper .service-item:nth-child(2) .service-content p {
    color: var(--white) !important;
}

.service-section.style-1 .section-wrapper .service-item:nth-child(2):hover .service-content h4 {
    color: var(--white) !important;
}

.service-section.style-1 .section-wrapper .service-item:nth-child(3) .service-content {
    background: #379ff4;
}

.service-section.style-1 .section-wrapper .service-item:nth-child(3) .service-content h4,
.service-section.style-1 .section-wrapper .service-item:nth-child(3) .service-content p {
    color: var(--white) !important;
}

.service-section.style-1 .section-wrapper .service-item:nth-child(3):hover .service-content h4 {
    color: var(--white) !important;
}

/* ===================================
   Location Page Styling
   ================================== */
.location-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.map-container {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.map-container:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.map-container iframe {
    border-radius: var(--border-radius-lg);
    transition: transform var(--transition-base);
}

.contact-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    height: 100%;
}

.contact-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.75rem;
    position: relative;
    padding-bottom: 15px;
}

.contact-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

.contact-item {
    margin-bottom: 5px;
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-base);
}

.contact-item:hover {
    background: var(--light-bg);
    transform: translateX(10px);
}

.contact-item i {
    font-size: 28px;
    color: var(--primary-color);
    margin-right: 20px;
    transition: transform var(--transition-base);
}

.contact-item:hover i {
    transform: scale(1.2) rotate(10deg);
}

.contact-item h5 {
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-item p,
.contact-item a {
    color: var(--text-muted);
    margin: 0;
    transition: color var(--transition-base);
}

.contact-item a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.hours-list {
    margin-top: 20px;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 10px 15px;
    background: var(--light-bg);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-base);
}

.hours-item:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateX(5px);
}

.hours-item strong {
    font-weight: 600;
}

.info-box {
    padding: 40px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    height: 100%;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.info-box:hover {
    background: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.info-box:hover * {
    color: var(--white) !important;
}

.info-box i {
    font-size: 56px;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: all var(--transition-base);
}

.info-box:hover i {
    transform: scale(1.2) rotate(360deg);
}

.info-box h5 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-weight: 600;
}

.info-box p {
    color: var(--text-muted);
    line-height: 1.7;
}

.directions-info {
    background: linear-gradient(135deg, #e8f4fd 0%, #d0e9ff 100%);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.directions-info:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.directions-info h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.directions-info h4 i {
    margin-right: 10px;
}

.directions-info p {
    margin-bottom: 15px;
    color: var(--text-dark);
    line-height: 1.8;
}

.directions-info p:last-child {
    margin-bottom: 0;
}

/* ===================================
   Apply Page (Form) Styling
   ================================== */
.apply-section {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 60px 0;
    position: relative;
}

.apply-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 113, 239, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.apply-section .container {
    position: relative;
    z-index: 2;
}

.form-container {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s ease;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.form-iframe-wrapper {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.form-iframe-wrapper:hover {
    box-shadow: var(--shadow-xl);
}

/* ===================================
   Background Patterns
   ================================== */
.bg-color {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    position: relative;
}

.bg-color::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 113, 239, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* ===================================
   Animations
   ================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Apply entrance animations */
.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* ===================================
   Responsive Utilities
   ================================== */
@media (max-width: 1200px) {
    .section-header h2 {
        font-size: 2.2rem;
    }

    .counter-content .number {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .service-thumb {
        height: 220px;
    }

    .contact-card {
        padding: 30px;
        margin-bottom: 30px;
    }

    .info-box {
        padding: 30px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.8rem;
    }

    .lab-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .service-thumb {
        height: 200px;
    }

    .service-content {
        padding: 20px;
    }

    .service-section.style-1 .section-wrapper {
        gap: 20px;
    }

    .contact-card,
    .info-box,
    .directions-info {
        padding: 25px;
    }

    .form-container {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .banner-content h1 {
        font-size: 1.75rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .counter-content .number {
        font-size: 2rem;
    }

    .service-content h4 {
        font-size: 1.4rem;
    }

    .contact-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-item i {
        margin-bottom: 10px;
    }
}

/* ===================================
   Smooth Scrollbar
   ================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===================================
   Loading State
   ================================== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===================================
   Focus States for Accessibility
   ================================== */
a:focus,
button:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* ===================================
   Print Styles
   ================================== */
@media print {
    .banner-section,
    .preloader,
    .mobile-menu,
    .header-section {
        display: none;
    }
}
