/* ============================================
   SECUR GUARD 24 - Custom Styles
   ============================================ */

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

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

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

::-webkit-scrollbar-thumb {
    background: #DC143C;
    border-radius: 5px;
}

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

/* Fade-in animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply to sections on load */
section {
    animation: fadeIn 0.6s ease-out;
}

/* Button ripple effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Hover glow effect for primary buttons */
.btn-primary:hover {
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.5);
}

/* Image placeholder styling */
.img-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Form focus effects */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #DC143C;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

/* Card hover lift effect */
.card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #DC143C 0%, #FF6B6B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading spinner (for future use) */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #DC143C;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Success message animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    animation: slideInUp 0.5s ease-out;
}

/* Security badge pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.security-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* Mobile menu slide animation */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    nav,
    .no-print {
        display: none;
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    /* Ensure text is readable on mobile */
    body {
        font-size: 16px;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
}

/* Custom focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #DC143C;
    outline-offset: 2px;
}

/* Disabled state */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   HERO SECTION BACKGROUND - PRODUCTION SAFE
   ============================================ */

/* Hero section with explicit z-index control */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: #1a1a1a; /* Fallback color */
}

/* Background image layer - z-index 0 */
.hero-bg-image {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1557683316-973673baf926?w=1920');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Dark overlay layer - z-index 1 (above image) */
.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Content layer - z-index 10 (above everything) */
.hero-content {
    position: relative;
    z-index: 10;
}

/* ============================================
   LANGUAGE SWITCHING - SMOOTH TRANSITIONS
   ============================================ */

/* Fade transition for text changes */
[x-text] {
    transition: opacity 0.2s ease-in-out;
}

/* Prevent flash of untranslated content */
[x-cloak] {
    display: none !important;
}

/* Subtle dots pattern for services section */
.pattern-bg {
    background-color: #ffffff;
    background-image: radial-gradient(
        circle,
        rgba(220, 20, 60, 0.08) 1.3px,
        transparent 1.3px
    );
    background-size: 20px 20px;
}

/* ==========================================
   FLIP CARD EFFECT
   ========================================== */

/* Flip Card Container */
.flip-card {
    perspective: 1000px;
    height: 320px;
    cursor: pointer;
}

/* Inner wrapper - handles rotation */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Flip on click */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* Front and Back faces - shared styles */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
}

/* Front Face */
.flip-card-front {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Back Face */
.flip-card-back {
    background: linear-gradient(135deg, #DC143C 0%, #B31030 100%);
    transform: rotateY(180deg);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Hover effect on front */
.flip-card:not(.flipped) .flip-card-front {
    transition: all 0.3s ease;
}

.flip-card:not(.flipped):hover .flip-card-front {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .flip-card {
        height: 280px;
    }
    
    .flip-card-front,
    .flip-card-back {
        padding: 1.25rem;
    }
}