/* 
 * Ecolify University - Custom Design Enhancements
 * Modern responsive design with animations and device detection
 * Redesigned with modern blue/purple gradient theme
 */

/* ============================================
   CSS Variables for Easy Theming
   ============================================ */
:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --accent-light: #fbc2eb;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    --text-dark: #2d3748;
    --text-light: #fff;
    --text-muted: #718096;
    --bg-light: #f7fafc;
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.15);
    --shadow-md: 0 4px 20px rgba(102, 126, 234, 0.2);
    --shadow-lg: 0 10px 40px rgba(102, 126, 234, 0.3);
    --shadow-colored: 0 10px 40px rgba(240, 147, 251, 0.4);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
}

/* ============================================
   Fix for White Space Issues
   ============================================ */
* {
    box-sizing: border-box;
}

section {
    overflow: hidden;
}

.container,
.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

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

body {
    overflow-x: hidden;
}

/* ============================================
   Enhanced Header with Backdrop Blur
   ============================================ */
.main-header {
    backdrop-filter: blur(15px) saturate(180%);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%) !important;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header.scrolled {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%) !important;
    box-shadow: var(--shadow-lg);
}

.logo a {
    transition: all var(--transition-fast);
    display: inline-block;
    background: linear-gradient(135deg, #ffffff 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.logo a::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 40px;
    background: var(--gradient-secondary);
    border-radius: 3px;
    opacity: 0;
    transition: all var(--transition-normal);
}

.logo a:hover {
    transform: scale(1.08) translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(240, 147, 251, 0.6));
}

.logo a:hover::before {
    opacity: 1;
    left: -15px;
}

/* ============================================
   Navigation Improvements
   ============================================ */
.main-nav ul li a {
    position: relative;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.main-nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(240, 147, 251, 0.2), transparent);
    transition: left 0.5s;
}

.main-nav ul li a:hover::before {
    left: 100%;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 2px;
    transition: all var(--transition-normal);
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.6);
}

.main-nav ul li a:hover::after,
.main-nav ul li.active a::after {
    width: 85%;
}

.main-nav ul li a:hover {
    color: var(--accent-light) !important;
    transform: translateY(-2px);
}

/* ============================================
   Animated Hero Section
   ============================================ */
.main-banner .caption {
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-banner h6 {
    animation: fadeInScale 1.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600 !important;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.main-banner h2 {
    animation: fadeInUp 1.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 4px 30px rgba(102, 126, 234, 0.5),
                 0 8px 60px rgba(118, 75, 162, 0.3);
    position: relative;
}

.main-banner h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
    animation: expandWidth 1s 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

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

.main-banner .main-button a {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(240, 147, 251, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(240, 147, 251, 0);
    }
}

/* ============================================
   Enhanced Feature Cards
   ============================================ */
.features-post {
    transition: all var(--transition-normal);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
}

.features-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 0;
}

.features-post:hover::before {
    opacity: 1;
}

.features-post:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-colored);
}

.features-content {
    position: relative;
    z-index: 1;
}

.content-show {
    position: relative;
}

.content-show::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-secondary);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.features-post:hover .content-show::before {
    width: 60px;
}

.content-show h4 {
    transition: all var(--transition-fast);
}

.features-post:hover .content-show h4 {
    transform: scale(1.08) translateX(5px);
    color: #fff !important;
}

.features-post:hover .content-show h4 i {
    animation: bounce 0.6s;
}

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

/* ============================================
   Animated Section Headings
   ============================================ */
.section-heading h2 {
    animation: slideInFromTop 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    background: var(--gradient-primary);
    border: 2px solid rgba(240, 147, 251, 0.3) !important;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-md);
}

.section-heading h2::before {
    background: var(--gradient-secondary) !important;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.6);
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   Enhanced Tabs with Better UX
   ============================================ */
#tabs ul li {
    transition: all var(--transition-fast);
}

#tabs ul li:hover {
    transform: translateY(-5px) scale(1.02);
}

#tabs ul li a {
    position: relative;
    overflow: hidden;
    padding: 15px 25px !important;
    border-radius: var(--border-radius-sm);
    background: var(--gradient-subtle);
    margin: 0 5px;
}

#tabs ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(240, 147, 251, 0.3), transparent);
    transition: left 0.6s;
}

#tabs ul li:hover a::before {
    left: 100%;
}

#tabs ul .ui-tabs-active a {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.tabs-content article {
    animation: fadeInSlideRotate 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--gradient-subtle);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

@keyframes fadeInSlideRotate {
    from {
        opacity: 0;
        transform: translateX(-30px) rotateY(-10deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotateY(0);
    }
}

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

.tabs-content img {
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.tabs-content img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Course Cards with Hover Effects
   ============================================ */
.owl-carousel .item {
    transition: all var(--transition-normal);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
}

.owl-carousel .item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
    pointer-events: none;
}

.owl-carousel .item:hover::before {
    opacity: 0.15;
}

.owl-carousel .item:hover {
    transform: scale(1.08) translateY(-10px) rotate(2deg);
    box-shadow: var(--shadow-colored);
}

.owl-carousel .item img {
    transition: all var(--transition-slow);
    position: relative;
}

.owl-carousel .item:hover img {
    transform: scale(1.15) rotate(-2deg);
    filter: brightness(1.2) contrast(1.1);
}

.down-content {
    transition: all var(--transition-normal);
    position: relative;
    z-index: 2;
}

.owl-carousel .item:hover .down-content {
    background: var(--gradient-primary) !important;
    transform: translateY(-5px);
}

.down-content h4 {
    transition: all var(--transition-fast);
    position: relative;
}

.down-content h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-secondary);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.owl-carousel .item:hover .down-content h4 {
    transform: scale(1.08) translateX(5px);
    color: #fff !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

.owl-carousel .item:hover .down-content h4::after {
    width: 50px;
}

/* Add shimmer effect */
.owl-carousel .item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.8s;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}

.owl-carousel .item:hover::after {
    left: 100%;
    opacity: 1;
}

/* ============================================
   Video Section Enhancements
   ============================================ */
.section.video {
    background-color: #1e1e1e !important;
    padding: 80px 0;
}

.video-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    background-color: transparent;
}

.video-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.video-item figure {
    margin: 0;
    padding: 0;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    border-radius: 12px;
}

.video-caption {
    background: transparent;
    padding: 15px 0;
}

/* ============================================
   Enhanced Contact Form
   ============================================ */
.contact-info {
    animation: fadeInLeft 1s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    padding: 35px;
    border-radius: var(--border-radius-lg);
    border: 2px solid rgba(240, 147, 251, 0.3);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.contact-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.12) 0%, transparent 70%);
    animation: rotateBackground 20s linear infinite;
    will-change: transform;
}

.contact-info::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px 2px 0 0;
}

@keyframes rotateBackground {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

.contact-info h4 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    position: relative;
    z-index: 1;
    font-size: 28px !important;
    margin-bottom: 25px !important;
    letter-spacing: 1px;
}

.contact-info p {
    transition: all var(--transition-fast);
    padding: 12px 15px;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    font-size: 15px !important;
    line-height: 1.8 !important;
    color: #ffffff !important;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 8px;
    margin-bottom: 12px !important;
    border-left: 3px solid transparent;
}

.contact-info p:hover {
    transform: translateX(8px);
    background: rgba(102, 126, 234, 0.15) !important;
    border-left-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.2);
}

.contact-info p strong {
    color: #fbc2eb !important;
    font-weight: 700;
    display: inline-block;
    min-width: 140px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-info p a {
    color: #ffffff !important;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.contact-info p a:hover {
    color: var(--accent-light) !important;
    text-decoration: underline;
}

#contact .form-control {
    transition: all var(--transition-normal);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.05);
}

#contact .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3), 0 0 40px rgba(240, 147, 251, 0.2);
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.1);
}

#contact .button {
    transition: all var(--transition-normal);
    border-radius: var(--border-radius-md);
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary) !important;
    border: none;
    box-shadow: var(--shadow-md);
}

#contact .button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#contact .button:hover::before {
    width: 350px;
    height: 350px;
}

#contact .button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-colored);
    background: var(--gradient-secondary) !important;
}

#contact .button:active {
    transform: translateY(-2px) scale(1.02);
}

/* ============================================
   Map Container Enhancement
   ============================================ */
#map {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 3px solid rgba(102, 126, 234, 0.3);
    position: relative;
}

#map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 3px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

#map:hover::before {
    opacity: 1;
}

#map:hover {
    box-shadow: var(--shadow-colored);
    transform: scale(1.03) translateY(-5px);
}

/* ============================================
   Scroll-triggered Animations
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Loading Animation
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Additional Modern Enhancements
   ============================================ */

/* Smooth gradient text for headings */
.section h2,
.section h4,
.down-content h4 {
    position: relative;
}

/* Floating animation for icons */
.features-content i {
    animation: float 3s ease-in-out infinite;
}

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

/* Modern scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* Selection styling */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Backdrop filter for sections */
.section {
    position: relative;
}

/* Modern card shadows on mobile */
@media (hover: none) {
    .features-post,
    .owl-carousel .item {
        box-shadow: var(--shadow-md);
    }
}

/* ============================================
   Responsive Design - Tablet (768px - 1024px)
   ============================================ */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .section-heading h2 {
        font-size: 24px;
        padding: 12px 18px;
    }
    
    .features-post {
        margin-bottom: 30px;
        min-height: 220px;
    }
    
    .contact-info {
        margin-bottom: 20px;
    }
    
    .col-md-6 {
        margin-bottom: 20px;
    }
    
    .features-content h4 {
        font-size: 15px;
        min-height: 55px;
    }
}

/* ============================================
   Responsive Design - Mobile (max 767px)
   ============================================ */
@media screen and (max-width: 767px) {
    .main-banner h2 {
        font-size: 28px;
    }
    
    .main-banner h6 {
        font-size: 14px;
    }
    
    .section-heading h2 {
        font-size: 20px;
        padding: 10px 15px;
        margin-top: 50px;
    }
    
    .section-heading h2:before {
        height: 50px;
        top: -52px;
    }
    
    .features-post {
        margin-bottom: 20px;
        min-height: 200px;
    }
    
    .features-content h4 {
        font-size: 14px;
        min-height: 50px;
    }
    
    #tabs ul li {
        display: block;
        margin-bottom: 10px;
    }
    
    section.why-us #tabs ul li a {
        padding: 12px 20px;
        font-size: 12px;
    }
    
    .contact-info {
        margin-bottom: 25px;
        padding: 20px;
    }
    
    .contact-info p {
        font-size: 13px;
    }
    
    #map iframe {
        height: 300px;
    }
    
    .video-item figure {
        padding-bottom: 56.25%; /* Maintain 16:9 aspect ratio */
    }
    
    .section.video {
        padding: 40px 0;
    }
    
    .video-item {
        margin-top: 20px;
    }
    
    /* Fix courses section on mobile */
    section.courses .owl-carousel .item {
        margin-bottom: 20px;
    }
    
    section.courses .item .down-content {
        padding: 20px;
        min-height: 100px;
    }
    
    section.courses .item .down-content h4 {
        font-size: 14px;
        min-height: 50px;
    }
    
    section.courses .item img {
        height: 200px;
    }
    
    /* Better spacing for features on mobile */
    section.features {
        padding: 30px 0;
    }
    
    section.courses.section {
        padding: 0px 15px 80px 15px;
    }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .main-nav ul li a {
        padding: 15px 20px;
    }
    
    .main-button a {
        padding: 15px 25px;
        font-size: 14px;
    }
    
    #contact .button {
        padding: 15px 30px;
        font-size: 14px;
    }
    
    /* Disable hover effects on touch devices */
    .features-post:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .owl-carousel .item:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .owl-carousel .item:hover img {
        transform: none;
        filter: none;
    }
    
    section.courses .owl-carousel .item:hover .down-content {
        background: #fff;
        transform: none;
    }
    
    section.courses .owl-carousel .item:hover .down-content h4 {
        transform: none;
        color: #1e1e1e;
        text-shadow: none;
    }
    
    /* Add tap highlight */
    * {
        -webkit-tap-highlight-color: rgba(151, 188, 98, 0.3);
    }
}

/* ============================================
   High-Resolution Display Support
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .main-banner,
    .features-post,
    .owl-carousel .item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .main-header,
    .main-button,
    #contact form,
    video {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section-heading h2 {
        color: black;
        border-color: black;
    }
}

/* ============================================
   Accessibility Improvements
   ============================================ */
/* Focus indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable continuous animations for better performance */
    .contact-info::before,
    .features-content i,
    .main-banner .main-button a {
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #fff;
        --accent-color: #ff0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #fff;
        --text-light: #000;
    }
}

/* ============================================
   Performance Optimizations
   ============================================ */
/* GPU acceleration for animations */
.features-post,
.owl-carousel .item,
.video-item,
#map,
.main-button a,
#contact .button {
    will-change: transform;
}

/* Optimize font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
