/* ==========================================
   Digital Speed - Custom Styles
   Modern & Professional Design
   ========================================== */

/* ==========================================
   Root Variables & Typography
   ========================================== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2d3561 0%, #1f2344 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    --transition-all: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Force light mode always */
    color-scheme: light only;
}

* {
    transition: var(--transition-all);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
    /* Mobile optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* Touch-friendly spacing */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ==========================================
   Navigation Bar
   ========================================== */
.navbar {
    background: var(--dark-gradient) !important;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    transition: var(--transition-all);
}

.navbar-brand:hover {
    transform: translateY(-2px);
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.navbar-brand i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.nav-link {
    position: relative;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-all);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition-all);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* ==========================================
   Dropdown Menu Styling
   ========================================== */
.dropdown-menu {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 250px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: var(--transition-all);
    color: #2d3561;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--primary-gradient);
    color: white;
    transform: translateX(5px);
}

.dropdown-item:active {
    background: var(--primary-gradient);
    color: white;
}

/* Dropdown divider */
.dropdown-divider {
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    margin: 0.5rem 0;
}

/* Logout button styling */
.dropdown-item[type="submit"] {
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: var(--transition-all);
}

.dropdown-item[type="submit"]:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateX(5px);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
    background: var(--primary-gradient);
    border-radius: 20px;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    /* Pulsing animation removed */
}

.hero-section h1 {
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 300;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-all);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.btn-light {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-light:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
}

/* ==========================================
   Cards
   ========================================== */
.card {
    border: none;
    border-radius: 16px;
    transition: var(--transition-all);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.card-body {
    padding: 2rem;
}

.card .fa-3x {
    font-size: 3.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
}

/* Feature Cards */
.feature-card {
    position: relative;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition-all);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

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

/* Package Cards */
.package-card {
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-all);
    box-shadow: var(--shadow-md);
}

.package-card:hover {
    transform: translateY(-15px) rotate(1deg);
    box-shadow: var(--shadow-xl);
}

.package-card .card-header {
    background: var(--primary-gradient) !important;
    padding: 1.5rem;
    border: none;
}

.package-card .card-header h4 {
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.package-card .card-body {
    padding: 2rem;
}

.package-card .card-body h3 {
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.package-card .list-unstyled li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition-all);
}

.package-card .list-unstyled li:last-child {
    border-bottom: none;
}

.package-card .list-unstyled li:hover {
    padding-left: 1rem;
    background: linear-gradient(to right, rgba(102, 126, 234, 0.05), transparent);
}

.package-card .card-footer {
    background: transparent;
    border-top: 1px solid #f0f0f0;
    padding: 1.5rem;
}

/* ==========================================
   Services Section
   ========================================== */
.services-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-all);
    border-left: 4px solid transparent;
    box-shadow: var(--shadow-sm);
}

.services-card:hover {
    border-left-color: #667eea;
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.services-card h5 i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   Call to Action
   ========================================== */
.cta-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.cta-section h3,
.cta-section p {
    position: relative;
    z-index: 1;
}

.cta-section h3 {
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   Footer
   ========================================== */
footer {
    background: var(--dark-gradient) !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

footer h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

footer a {
    text-decoration: none;
    transition: var(--transition-all);
    color: rgba(255,255,255,0.8);
}

footer a:hover {
    color: white;
    padding-left: 10px;
}

/* ==========================================
   Utility Classes
   ========================================== */
.section-title {
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation for cards */
.row > div:nth-child(1) { animation-delay: 0.1s; }
.row > div:nth-child(2) { animation-delay: 0.2s; }
.row > div:nth-child(3) { animation-delay: 0.3s; }
.row > div:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    /* Hero Section - Mobile */
    .hero-section {
        padding: 2.5rem 1rem;
        border-radius: 12px;
        margin-bottom: 2rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section i.fa-shield-alt {
        font-size: 2rem;
    }
    
    /* Buttons - Mobile */
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Cards - Mobile */
    .card-body {
        padding: 1.25rem;
    }
    
    .feature-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .feature-card i.fa-3x {
        font-size: 2.5rem;
    }
    
    .feature-card h4 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    /* Services - Mobile */
    .services-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .services-card h5 {
        font-size: 1.1rem;
    }
    
    /* Package Cards - Mobile */
    .package-card {
        margin-bottom: 1.5rem;
    }
    
    .package-card .card-header {
        padding: 1rem;
    }
    
    .package-card .card-header h4 {
        font-size: 1.25rem;
    }
    
    .package-card .card-body {
        padding: 1.5rem;
    }
    
    .package-card .card-body h3 {
        font-size: 2rem;
    }
    
    .package-card .list-unstyled li {
        padding: 0.5rem 0;
        font-size: 0.95rem;
    }
    
    /* Section Titles - Mobile */
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
        bottom: -8px;
    }
    
    /* CTA Section - Mobile */
    .cta-section {
        padding: 2rem 1rem;
        border-radius: 12px;
    }
    
    .cta-section h3 {
        font-size: 1.5rem;
    }
    
    .cta-section .lead {
        font-size: 1rem;
    }
    
    /* Navbar - Mobile */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Make nav items full width and easily tappable */
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 1rem 1.5rem !important;
        font-size: 1rem;
        font-weight: 600;
        width: 100%;
        display: block;
        border-radius: 8px;
        margin: 0.25rem 0;
    }
    
    .nav-link:hover,
    .nav-link:focus,
    .nav-link:active {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
    
    /* Dropdown toggle styling */
    .dropdown-toggle {
        width: 100%;
        text-align: left;
    }
    
    .dropdown-toggle::after {
        float: right;
        margin-top: 0.5rem;
    }
    
    /* Dropdown Menu - Mobile (all dropdowns) */
    .dropdown-menu,
    .dropdown-menu-end {
        border: none;
        background: rgba(255, 255, 255, 0.08);
        box-shadow: none;
        margin-top: 0.5rem;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
        min-width: auto;
        width: 100%;
        border-radius: 8px;
        padding: 0.25rem 0;
        right: auto !important;
        left: auto !important;
    }
    
    .dropdown-item {
        padding: 1rem 2rem;
        font-size: 1rem;
        font-weight: 500;
        white-space: normal;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
        display: block;
        text-align: left;
        color: rgba(255, 255, 255, 0.8);
        border-radius: 6px;
        margin: 0.25rem 0.5rem;
        width: calc(100% - 1rem);
    }
    
    .dropdown-item:last-child {
        border-bottom: none;
    }
    
    .dropdown-item:hover,
    .dropdown-item:focus,
    .dropdown-item:active,
    .dropdown-item[type="submit"]:hover,
    .dropdown-item[type="submit"]:focus {
        transform: none;
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }
    
    /* Logout button matches other dropdown items on mobile */
    .dropdown-item[type="submit"] {
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
    }
    
    /* Navbar collapsed menu styling */
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        margin-top: 1rem;
        padding: 0.75rem 0.5rem;
    }
    
    /* Better touch targets for mobile */
    .navbar-nav .nav-item,
    .dropdown-item {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    /* Footer - Mobile */
    footer {
        padding: 2rem 0 !important;
    }
    
    footer h5 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    footer p,
    footer li {
        font-size: 0.9rem;
    }
    
    /* Spacing - Mobile */
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Container - Mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Remove hover animations on mobile for performance */
    .card:hover,
    .feature-card:hover,
    .services-card:hover,
    .package-card:hover {
        transform: none;
    }
    
    /* Disable parallax and heavy animations on mobile */
    .fade-in-up {
        animation: none;
        opacity: 1;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .d-flex.gap-3 {
        gap: 0.75rem !important;
    }
    
    /* Stack buttons on very small screens */
    .hero-section .d-flex,
    .cta-section .d-flex {
        flex-direction: column;
    }
    
    .hero-section .btn,
    .cta-section .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .package-card .card-body h3 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Landscape mode on phones */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 1.5rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

/* ==========================================
   Loading Animation
   ========================================== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Scrollbar Styling
   ========================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

/* ==========================================
   Mobile Performance Optimizations
   ========================================== */
@media (max-width: 768px) {
    /* Reduce shadows on mobile for performance */
    .card,
    .feature-card,
    .package-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    /* Simpler gradients on mobile */
    .btn::before {
        display: none;
    }
    
    /* Faster transitions on mobile */
    * {
        transition: all 0.2s ease !important;
    }
    
    /* Optimize images for mobile */
    img {
        max-width: 100%;
        height: auto;
        image-rendering: -webkit-optimize-contrast;
    }
    
    /* Prevent text inflation on iOS */
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Better scrolling on iOS */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Remove focus outline replacement on mobile */
    button:focus,
    a:focus,
    input:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }
}

