/* =========================================
   1. CORE SETTINGS & FONTS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: #0a0e27;
    color: #ffffff;
    overflow-x: hidden;
}

.orbitron {
    font-family: 'Orbitron', sans-serif;
}

/* Performance Optimization */
.render-optimize {
    content-visibility: auto;
    contain-intrinsic-size: 800px;
}

/* =========================================
   2. CUSTOM SCROLLBAR
   ========================================= */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #0a0e27;
    border-left: 1px solid rgba(0, 240, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00f0ff 0%, #ff00ff 50%, #00f0ff 100%);
    border-radius: 10px;
    border: 2px solid #0a0e27;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00f0ff 0%, #ff00ff 100%);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #ff00ff 0%, #00f0ff 100%);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #00f0ff #0a0e27;
}

/* =========================================
   3. BACKGROUNDS & PARTICLES
   ========================================= */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

.cyber-grid {
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

/* =========================================
   4. UTILITY CLASSES (Glass, Neon, Text)
   ========================================= */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-dark {
    background: rgba(10, 14, 39, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(100, 200, 255, 0.2);
}

/* Neon Effects */
.neon-text {
    text-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff, 0 0 30px #00f0ff, 0 0 40px #00f0ff;
    animation: neonPulse 2s ease-in-out infinite;
}

.neon-border {
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5), inset 0 0 15px rgba(0, 240, 255, 0.2);
    border: 2px solid rgba(0, 240, 255, 0.5);
    transition: all 0.3s ease;
}

.neon-border:hover {
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.8), inset 0 0 25px rgba(0, 240, 255, 0.3);
    border-color: rgba(0, 240, 255, 0.8);
    transform: translateY(-5px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #00f0ff 0%, #ff00ff 50%, #00f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
    filter: brightness(1.2);
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.spin-3d {
    animation: spin3D 3s linear infinite;
}

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 0, 240, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
    z-index: -1;
}

.card-3d:hover::before {
    opacity: 1;
}

/* Keyframes */
@keyframes neonPulse {
    0%, 100% { text-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff, 0 0 30px #00f0ff; }
    50% { text-shadow: 0 0 20px #00f0ff, 0 0 30px #00f0ff, 0 0 40px #00f0ff, 0 0 50px #00f0ff; }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes spin3D {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* =========================================
   5. COMPONENTS (Buttons, Forms, Nav)
   ========================================= */
/* Buttons */
.btn-cyber {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #00f0ff;
    background: transparent;
}

.btn-cyber::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.btn-cyber:hover::before {
    left: 100%;
}

.btn-cyber:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
    transform: scale(1.05);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: 2px solid #25D366;
    position: relative;
    overflow: hidden;
}

.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-whatsapp:hover::before {
    left: 100%;
}

.btn-whatsapp:hover {
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.8);
    transform: translateY(-3px) scale(1.05);
    border-color: #25D366;
}

/* Navbar */
.navbar-scroll {
    transition: all 0.3s ease;
}

.navbar-scroll.scrolled, 
body:not(.home-page) .navbar-scroll { 
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.3);
}

/* Form Inputs */
.form-input {
    background-color: #0a0e27 !important;
    background: #0a0e27 !important;
    border: 2px solid rgba(0, 240, 255, 0.3);
    transition: all 0.3s ease;
    color: #ffffff !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 40px !important;
}

select.form-input {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300f0ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 20px !important;
    color-scheme: dark;
}

.form-input:focus {
    outline: none;
    border-color: #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    background-color: #0a0e27 !important;
}

.form-input option {
    background-color: #0a0e27 !important;
    padding: 10px;
}

.form-input option:hover, .form-input option:checked {
    background-color: rgba(0, 240, 255, 0.2) !important;
    color: #00f0ff !important;
}

/* =========================================
   6. WIDGETS (Social, ScrollToTop)
   ========================================= */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00f0ff, #ff00ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    border: 2px solid rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

#scrollToTop.show {
    opacity: 1;
    visibility: visible;
}

#scrollToTop:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
}

#scrollToTop i {
    color: white;
    font-size: 24px;
}

.social-widget {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 240, 255, 0.3);
    color: #00f0ff;
    font-size: 22px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateX(-10px) scale(1.1);
    border-color: #00f0ff;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
}

.social-icon.facebook:hover { background: linear-gradient(135deg, #1877f2, #0d5ac4); color: white; border-color: #1877f2; }
.social-icon.instagram:hover { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; border-color: #e6683c; }
.social-icon.tiktok:hover { background: linear-gradient(135deg, #000000, #ff0050); color: white; border-color: #ff0050; }
.social-icon.whatsapp:hover { background: linear-gradient(135deg, #25D366, #128C7E); color: white; border-color: #25D366; }

/* =========================================
   7. PAGE SPECIFIC STYLES
   ========================================= */

/* --- About Us --- */
.timeline-item { position: relative; padding-left: 60px; }
.timeline-item::before {
    content: ''; position: absolute; left: 20px; top: 30px; bottom: -30px; width: 2px;
    background: linear-gradient(180deg, #00f0ff, #ff00ff);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
    position: absolute; left: 10px; top: 10px; width: 24px; height: 24px;
    border-radius: 50%; background: linear-gradient(135deg, #00f0ff, #ff00ff);
    border: 3px solid #0a0e27; box-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
    animation: timelinePulse 2s ease-in-out infinite;
}
@keyframes timelinePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.8); }
    50% { box-shadow: 0 0 30px rgba(0, 240, 255, 1); }
}

/* --- Projects / Offers --- */
.filter-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
    opacity: 0;
}
.filter-section.open { max-height: 850px; opacity: 1; padding-top: 1.5rem; }
.filter-toggle-btn.active i { transform: rotate(180deg); }

.horizontal-card {
    display: flex; flex-direction: row; transition: all 0.3s ease; position: relative; overflow: visible; height: 320px;
}
.horizontal-card:hover { transform: translateY(-8px); }
.horizontal-card .card-image { width: 450px; min-width: 450px; height: 320px; position: relative; overflow: hidden; }
.horizontal-card .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.horizontal-card:hover .card-image img { transform: scale(1.1); }
.horizontal-card .card-content { flex: 1; padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; line-height: 1.5em; max-height: 4.5em; }

.offer-badge {
    position: absolute; top: 15px; right: 15px; z-index: 10;
    background: linear-gradient(135deg, #ff6b00, #ff0000);
    padding: 8px 16px; border-radius: 20px; font-size: 11px; font-weight: bold;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.6);
    animation: offerPulse 2s ease-in-out infinite; border: 2px solid #fff;
}
@keyframes offerPulse {
    0%, 100% { transform: scale(1) rotate(0deg); box-shadow: 0 0 20px rgba(255, 107, 0, 0.8); }
    50% { transform: scale(1.1) rotate(-5deg); box-shadow: 0 0 30px rgba(255, 107, 0, 1); }
}

.stat-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    animation: statShine 3s linear infinite;
}
@keyframes statShine { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Countdown Timer --- */
.countdown-timer { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.countdown-box {
    background: rgba(0, 240, 255, 0.1); border: 2px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px; padding: 8px 12px; min-width: 60px; text-align: center;
}
.countdown-number { font-size: 24px; font-weight: bold; color: #00f0ff; display: block; }
.countdown-label { font-size: 10px; color: #8dd4ff; text-transform: uppercase; }
.countdown-box.urgent { animation: urgentPulse 1s ease-in-out infinite; }
@keyframes urgentPulse {
    0%, 100% { border-color: rgba(255, 0, 0, 0.8); background: rgba(255, 0, 0, 0.2); }
    50% { border-color: rgba(255, 0, 0, 1); background: rgba(255, 0, 0, 0.3); }
}

/* --- Project Details & Lightbox --- */
.price-tag { position: relative; display: inline-block; }
.price-tag::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, #00f0ff, #ff00ff); animation: priceGlow 2s ease-in-out infinite;
}
@keyframes priceGlow { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.gallery-img { cursor: pointer; transition: all 0.3s ease; }
.gallery-img:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(0, 240, 255, 0.6); }

.lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); z-index: 9999; justify-content: center; align-items: center;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 90%; box-shadow: 0 0 50px rgba(0, 240, 255, 0.5); }
.lightbox-close {
    position: absolute; top: 30px; right: 30px; font-size: 40px; color: white; cursor: pointer; transition: all 0.3s ease;
}
.lightbox-close:hover { color: #00f0ff; transform: rotate(90deg); }

/* --- Contact / Terms --- */
.policy-list li, .terms-list li { margin-bottom: 0.75rem; position: relative; padding-left: 1.5rem; }
.policy-list li::before { content: '\f054'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: 4px; color: #00f0ff; font-size: 0.8rem; }
.terms-list li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: 4px; color: #00f0ff; font-size: 0.8rem; }

.success-alert {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    border: 2px solid #10b981; animation: slideDown 0.5s ease;
}
.error-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    border: 2px solid #ef4444; animation: slideDown 0.5s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* --- Contact Page Specifics (Updated - No Moving Animation) --- */
.contact-info-card {
    position: relative;
    overflow: hidden;
}

/* Removed cardShine animation to fix moving square issue */

.info-box {
    position: relative;
    overflow: hidden;
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.info-box:hover::before {
    left: 100%;
}

.map-container {
    position: relative;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
}

/* --- Login --- */
.login-box { animation: floatIn 1s ease-out; }
@keyframes floatIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.icon-float { animation: iconFloat 3s ease-in-out infinite; }
@keyframes iconFloat { 0%, 100% { transform: translateY(0px) rotate(0deg); } 50% { transform: translateY(-10px) rotate(5deg); } }

/* =========================================
   8. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 1024px) {
    .social-widget { right: 15px; gap: 10px; }
    .social-icon { width: 45px; height: 45px; font-size: 20px; }
    #scrollToTop { width: 45px; height: 45px; bottom: 25px; right: 15px; }
}

@media (max-width: 768px) {
    .neon-text { font-size: 2rem !important; animation: none !important; }
    .spin-3d, .icon-float, .fire-icon, .card-3d:hover, .timeline-dot, .float-animation, .cyber-grid { animation: none !important; transform: none !important; }
    
    .social-widget {
        bottom: auto; top: 50%; right: 15px; transform: translateY(-50%);
        flex-direction: column; gap: 10px;
    }
    .social-icon { width: 40px; height: 40px; font-size: 18px; }
    .social-icon:hover { transform: translateX(-5px) scale(1.1); }
    
    #scrollToTop { bottom: 20px; right: 15px; width: 40px; height: 40px; }
    #scrollToTop i { font-size: 20px; }
    
    /* Project Cards Mobile */
    .horizontal-card { flex-direction: column; height: auto; }
    .horizontal-card .card-image { width: 100%; min-width: 100%; height: 220px; }
    .horizontal-card .card-content { padding: 1.5rem; }
    
    /* Timeline */
    .timeline-item { padding-left: 40px; }
    .timeline-item::before { left: 10px; }
    .timeline-dot { left: 0; width: 20px; height: 20px; }
    
    /* Contact Map */
    .map-container { height: 300px; }
    
    /* Offers */
    .countdown-box { min-width: 50px; padding: 6px 8px; }
    .countdown-number { font-size: 18px; }
}