/* Custom styles for SynerLogix Collective */

/* Global: prevent horizontal scroll on all screens (esp. mobile) */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Ensure media never forces overflow */
img, video, iframe {
    max-width: 100% !important;
    height: auto;
}

/* Performance: generic lazy image helpers */
.lazy-img {
    /* Avoid rendering offscreen content until needed */
    content-visibility: auto;
    /* Reserve space to prevent layout shifts (approx for 16:9 cards) */
    contain-intrinsic-size: 160px 285px;
    aspect-ratio: 16 / 9;
}

/* Disable costly background-attachment on services background.
   The element itself is fixed, so attachment fixed is redundant and janky on mobile */
#services-background {
    background-attachment: scroll !important;
}

/* Respect reduced motion: avoid hover scale transforms on images */
@media (prefers-reduced-motion: reduce) {
    .group:hover img {
        transform: none !important;
    }
}

/* Apply lazy rendering defaults for all images within services content */
#services-content img {
    content-visibility: auto;
    contain-intrinsic-size: 160px 285px;
}

/* Slightly reduce hover scale to minimise repaint cost */
.group:hover img {
    transform: scale(1.02);
}

/* Ensure Industry Expertise tiles are 3:2 */
.industry-square {
    aspect-ratio: 3 / 2;
}
.industry-square img {
    object-fit: cover;
}

/* Override inline logo sizing on small screens to avoid overflow */
@media (max-width: 640px) {
    .logo {
        max-width: 100% !important;
        width: 180px !important;
        height: auto !important;
    }
}

/* Logo styling */
.logo {
    max-height: 40px;
    height: auto;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

/* Enhanced Form Validation Styles */
.form-field-container {
    position: relative;
}

.form-field-container.error input,
.form-field-container.error textarea {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(205, 127, 50, 0.05));
    animation: fieldShake 0.6s ease-in-out;
}

.form-field-container.success input,
.form-field-container.success textarea {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.field-error-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.95), rgba(160, 82, 45, 0.95));
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.2);
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px);
    animation: errorSlideIn 0.4s ease-out forwards;
    backdrop-filter: blur(8px);
}

.field-error-message::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 16px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.95), rgba(160, 82, 45, 0.95));
    transform: rotate(45deg);
    border-left: 1px solid rgba(184, 134, 11, 0.2);
    border-top: 1px solid rgba(184, 134, 11, 0.2);
}

.field-error-message .error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-right: 8px;
    font-size: 10px;
}

.field-success-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.2);
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px);
    animation: successSlideIn 0.4s ease-out forwards;
    backdrop-filter: blur(8px);
}

.field-success-message::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 16px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
    transform: rotate(45deg);
    border-left: 1px solid rgba(16, 185, 129, 0.2);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.field-success-message .success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-right: 8px;
    font-size: 10px;
}

/* Form field focus states */
.form-field-container input:focus,
.form-field-container textarea:focus {
    border-color: #d4af37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

/* Enhanced form field styling */
.form-field-container input,
.form-field-container textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.form-field-container input:hover,
.form-field-container textarea:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.form-field-container.success input,
.form-field-container.success textarea {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
}

.form-field-container.error input,
.form-field-container.error textarea {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(220, 38, 38, 0.05));
    animation: fieldShake 0.6s ease-in-out;
}

/* Submit button enhancements */
#contact-form button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#contact-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

#contact-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#contact-form button[type="submit"]:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Animations */
@keyframes fieldShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

@keyframes errorSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form validation feedback */
.form-validation-feedback {
    position: fixed;
    top: 120px;
    right: 20px;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.95), rgba(160, 82, 45, 0.95));
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(184, 134, 11, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    animation: validationSlideIn 0.5s ease-out forwards;
    backdrop-filter: blur(12px);
    max-width: 300px;
}

.form-validation-feedback.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-validation-feedback .feedback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-right: 12px;
    font-size: 12px;
}

@keyframes validationSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced About Dropdown Styles */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.02));
    transform: translateX(4px);
}

.dropdown-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 12px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.dropdown-item:hover .dropdown-icon-wrapper {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.1);
}

.dropdown-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dropdown-title {
    font-weight: 600;
    font-size: 14px;
    color: white;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.dropdown-subtitle {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
    transition: color 0.3s ease;
}

.dropdown-item:hover .dropdown-title {
    color: #d4af37;
}

.dropdown-item:hover .dropdown-subtitle {
    color: #d1d5db;
}

.dropdown-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.dropdown-item:hover .dropdown-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Dropdown animation enhancements */
#about-dropdown-menu {
    transform-origin: top center;
}

#about-dropdown-menu.show {
    animation: dropdownSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes dropdownSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced button hover effects */
#about-dropdown-btn:hover {
    transform: translateY(-1px);
}

#about-dropdown-btn:active {
    transform: translateY(0);
}

/* Responsive dropdown adjustments */
@media (max-width: 768px) {
    .dropdown-item {
        padding: 10px 14px;
    }
    
    .dropdown-icon-wrapper {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }
    
    .dropdown-title {
        font-size: 13px;
    }
    
    .dropdown-subtitle {
        font-size: 10px;
    }
}

/* Footer link styling - only for actual links */
footer a[href] {
    cursor: pointer !important;
    transition: color 0.3s ease !important;
    position: relative;
}

footer a[href]:hover {
    color: #d4af37 !important; /* Gold color */
    text-decoration: none !important;
}

/* Specific styling for footer navigation links */
footer ul li a[href] {
    display: inline !important;
    width: auto !important;
    padding: 2px 0 !important;
    cursor: pointer !important;
}

footer ul li a[href]:hover {
    transform: translateX(5px) !important;
    transition: all 0.3s ease !important;
    color: #d4af37 !important;
}

/* Override any conflicting Tailwind classes - only for links */
footer a[href].text-gray-400:hover {
    color: #d4af37 !important;
}

footer a[href].hover\:text-gold:hover {
    color: #d4af37 !important;
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .logo {
        max-height: 32px;
        max-width: 140px;
        width: auto;
        height: auto;
    }
}

/* Mobile navigation layout fixes */
@media (max-width: 768px) {
    #navbar {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    #navbar .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    #navbar .flex.items-center.justify-between {
        gap: 0.5rem;
        min-width: 0;
    }
    
    #mobile-menu-btn {
        flex-shrink: 0;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 50;
        position: relative;
    }
    
    /* Ensure logo doesn't overflow */
    #navbar .flex.items-center.flex-shrink-0 {
        min-width: 0;
        overflow: hidden;
    }
    
    #navbar .flex.items-center.flex-shrink-0 a {
        display: flex;
        align-items: center;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }
    
    .logo {
        max-height: 28px;
        max-width: 120px;
    }
    
    #navbar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    #mobile-menu-btn {
        min-width: 40px;
        min-height: 40px;
    }
}

/* Enhanced Horizontal Timeline Styles */
.timeline-item {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover {
    transform: translateY(-8px);
}

/* Timeline dot animations */
.timeline-item .w-6 {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover .w-6 {
    transform: scale(1.3);
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.4),
        0 0 40px rgba(212, 175, 55, 0.2);
}

/* Content card animations */
.timeline-item .bg-black\/80 {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center bottom;
}

.timeline-item:hover .bg-black\/80 {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(212, 175, 55, 0.2);
}

/* Timeline line animation */
.timeline-item:hover ~ .timeline-item .w-6,
.timeline-item:hover ~ .timeline-item .bg-black\/80 {
    opacity: 0.6;
    transform: scale(0.9);
}

/* Pulse animation for timeline dots */
@keyframes timelinePulse {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.75;
    }
}

.timeline-item .animate-pulse {
    animation: timelinePulse 2s ease-in-out infinite;
}

/* Enhanced hover effects for timeline content */
.timeline-item:hover .bg-black\/80 {
    border-color: rgba(212, 175, 55, 0.6);
    backdrop-filter: blur(20px);
}

/* Timeline line gradient animation */
@keyframes timelineFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Mobile timeline enhancements */
@media (max-width: 768px) {
    .timeline-item {
        transition: all 0.3s ease;
    }
    
    .timeline-item:hover {
        transform: translateX(8px);
    }
    
    .timeline-item .w-4 {
        transition: all 0.3s ease;
    }
    
    .timeline-item:hover .w-4 {
        transform: scale(1.2);
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    }
}

/* About page tab styles */
.about-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.about-section.active {
    opacity: 1;
    transform: translateY(0);
}

.about-tab-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.about-tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.6s ease;
}

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

.about-tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.6) !important;
}

.about-tab-btn.active {
    background: linear-gradient(135deg, #D4AF37 0%, #CD7F32 50%, #B8860B 100%);
    color: #000;
    font-weight: 700;
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    box-shadow: 
        0 8px 25px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.about-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #D4AF37, #CD7F32);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.about-tab-btn:not(.active):hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(205, 127, 50, 0.1) 100%);
    color: #D4AF37;
    border-color: rgba(212, 175, 55, 0.5) !important;
}

/* Enhanced focus states for accessibility */
.about-tab-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

.about-tab-btn.active:focus {
    box-shadow: 
        0 8px 25px rgba(212, 175, 55, 0.3),
        0 0 0 3px rgba(212, 175, 55, 0.5);
}

/* Override any Tailwind border classes for active tab buttons */
.about-tab-btn.active,
.about-tab-btn.active[class*="border"],
button.about-tab-btn.active,
button.about-tab-btn.active[class*="border"] {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: 
        0 8px 25px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Force remove all borders from active tab buttons */
.about-tab-btn.active *,
.about-tab-btn.active::before,
.about-tab-btn.active::after {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

/* Responsive adjustments for tab buttons */
@media (max-width: 768px) {
    .about-tab-btn {
        min-width: 120px;
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .about-tab-btn {
        min-width: 100px;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        margin: 0.25rem;
    }
}

/* Services Tab Styles */
.services-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-in-out;
}

.services-section.active {
    opacity: 1;
    transform: translateY(0);
}

.services-tab-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.services-tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.6s ease;
}

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

.services-tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.6) !important;
}

.services-tab-btn.active {
    background: linear-gradient(135deg, #D4AF37 0%, #CD7F32 50%, #B8860B 100%);
    color: #000;
    font-weight: 700;
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    box-shadow: 
        0 8px 25px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.services-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #D4AF37, #CD7F32);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.services-tab-btn:not(.active):hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(205, 127, 50, 0.1) 100%);
    color: #D4AF37;
    border-color: rgba(212, 175, 55, 0.5) !important;
}

/* Enhanced focus states for accessibility */
.services-tab-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

.services-tab-btn.active:focus {
    box-shadow: 
        0 8px 25px rgba(212, 175, 55, 0.3),
        0 0 0 3px rgba(212, 175, 55, 0.5);
}

/* Override any Tailwind border classes for active tab buttons */
.services-tab-btn.active,
.services-tab-btn.active[class*="border"],
button.services-tab-btn.active,
button.services-tab-btn.active[class*="border"] {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: 
        0 8px 25px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Force remove all borders from active tab buttons */
.services-tab-btn.active *,
.services-tab-btn.active::before,
.services-tab-btn.active::after {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .services-tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        margin: 0.25rem;
    }
}

@media (max-width: 480px) {
    .services-tab-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        margin: 0.125rem;
    }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B8860B;
}

/* Navigation active state */
.nav-link.active {
    color: #D4AF37;
}

/* Timeline styles */
.timeline-item {
    position: relative;
    padding-left: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -8px;
    top: 2px;
    z-index: 10;
}

/* Service card hover effects */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    /* Hover effects disabled for cards/windows */
    transform: none;
    box-shadow: none;
    /* Prevent yellow border change on hover (override Tailwind hover:border-*) */
    border-color: rgba(212, 175, 55, 0.2) !important;
    outline: none;
    outline-offset: 0;
}

/* Button hover effects */
.btn-primary {
    background: linear-gradient(45deg, #D4AF37, #CD7F32);
    color: #000;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #CD7F32, #D4AF37);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Form styling */
input:focus, textarea:focus {
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Animation for fade-in elements */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline-item {
        padding-left: 1rem;
    }
    
    .timeline-dot {
        left: -6px;
    }
}





/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    max-height: 300px;
    opacity: 1;
}

#mobile-menu.hide {
    max-height: 0;
    opacity: 0;
}

/* Hero section background image */
#home {
    background-image: url('assets/Home/home-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    width: 100%;
}

/* Add a dark overlay to ensure text readability */
#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Ensure content is above the overlay */
#home .container {
    position: relative;
    z-index: 2;
}

/* About section background image */
#about {
    background-image: url('assets/About/Vision%20%26%20Mission%20background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    width: 100%;
}

/* Add a dark overlay to ensure text readability */
#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Ensure content is above the overlay */
#about .container {
    position: relative;
    z-index: 2;
}

/* Contact section background image */
#contact {
    background-image: url('assets/Contact/contact-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    width: 100%;
}

/* Add a dark overlay to ensure text readability */
#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Ensure content is above the overlay */
#contact .container {
    position: relative;
    z-index: 2;
}

/* Mobile responsive background */
@media (max-width: 768px) {
    #home {
      background-attachment: scroll;
    }
    #contact {
      background-attachment: scroll;
    }
    #about {
      background-attachment: scroll;
    }
}



/* Ensure the window has proper spacing on mobile */
@media (max-width: 768px) {
    #home .p-12 {
        padding: 2rem;
    }
    
    #home .text-5xl {
        font-size: 2.5rem;
    }
    
    #home .text-7xl {
        font-size: 3rem;
    }
}





/* Email fallback modal styles */
#email-fallback {
    animation: fadeIn 0.4s ease;
    cursor: pointer;
    pointer-events: auto;
}

#email-fallback > div {
    cursor: default;
    pointer-events: auto;
}

#email-fallback .bg-gradient-to-br {
    animation: slideInScale 0.4s ease;
}

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

/* Button hover effects for email modal */
#email-fallback button,
#email-fallback a {
    position: relative;
    overflow: hidden;
}

#email-fallback button::before,
#email-fallback a::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;
}

#email-fallback button:hover::before,
#email-fallback a:hover::before {
    left: 100%;
}

/* Modal backdrop blur effect */
#email-fallback {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Gold accent glow */
#email-fallback .border-gold\/30 {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}

/* Team Modal Positioning Transitions */
#team-modal .relative.flex.items-center.justify-center {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure modal content has smooth transitions */
#team-modal .bg-gradient-to-br {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal scrollable styles */
.modal-scrollable {
    scrollbar-width: thin;
    scrollbar-color: #D4AF37 #1a1a1a;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-scrollable::-webkit-scrollbar {
    width: 8px;
}

.modal-scrollable::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.modal-scrollable::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 4px;
}

.modal-scrollable::-webkit-scrollbar-thumb:hover {
    background: #B8860B;
}

/* Biography content scrolling */
#modal-bio {
    scrollbar-width: thin;
    scrollbar-color: #D4AF37 #1a1a1a;
}

#modal-bio::-webkit-scrollbar {
    width: 6px;
}

#modal-bio::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

#modal-bio::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 3px;
}

#modal-bio::-webkit-scrollbar-thumb:hover {
    background: #B8860B;
}

/* Responsive modal positioning adjustments */
@media (max-width: 1024px) {
    #team-modal .relative.flex.items-center.justify-center {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }
}

/* Additional responsive adjustments for smaller screens */
@media (max-width: 768px) {
    #team-modal .bg-gradient-to-br {
        max-width: 95vw !important;
        margin: 0 auto !important;
        max-height: 75vh !important;
    }
    
    #team-modal .relative.flex.items-center.justify-center {
        align-items: flex-start !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
}

@media (max-width: 480px) {
    #team-modal .relative.flex.items-center.justify-center {
        padding: 10px !important;
        align-items: flex-start !important;
    }
    
    #team-modal .bg-gradient-to-br {
        max-width: 98vw !important;
        max-height: 70vh !important;
    }
    
    /* Adjust modal content layout for mobile */
    #team-modal .flex.flex-col.lg\:flex-row {
        flex-direction: column !important;
    }
    
    #team-modal .lg\:w-1\/3 {
        width: 100% !important;
        margin-bottom: 20px !important;
    }
    
    #team-modal .lg\:w-2\/3 {
        width: 100% !important;
    }
    
    /* Make image smaller on mobile */
    #team-modal .w-64.h-64 {
        width: 200px !important;
        height: 200px !important;
    }
}

/* Hero dynamic word animation */
.hero-dynamic-word {
    display: inline-block;
    transition: opacity 600ms ease, filter 600ms ease, transform 600ms ease;
    will-change: opacity, filter, transform;
}

.hero-dynamic-word.is-fading {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-dynamic-word {
        transition: none !important;
    }
}

/* Prevent clipping of glyph descenders (e.g., g, y) in hero lines */
.hero-line {
    display: block;
    line-height: 1.15; /* slightly looser to accommodate descenders */
    padding-top: 0.12em;
    padding-bottom: 0.12em;
    overflow: visible; /* ensure visual overflow is shown within line box */
}
