/* ========================================
   AFRILINK TELECOMS - CUSTOM STYLES
   Built on top of the Design System
   ======================================== */

/* CSS Reset - minimal since design system handles most */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(11, 20, 38, 0.98) 0%, rgba(30, 61, 89, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(11, 20, 38, 0.3);
}

.header.scrolled {
    background: linear-gradient(135deg, rgba(11, 20, 38, 0.98) 0%, rgba(52, 152, 219, 0.95) 100%);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-secondary-400) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-links a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: var(--font-medium);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    position: relative;
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--color-white);
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.nav-links a.active {
    color: var(--color-white);
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.client-area {
    background: linear-gradient(135deg, var(--color-secondary-500), var(--color-warning-500));
    color: var(--color-white) !important;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: var(--font-semibold);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.client-area:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--color-secondary-600), var(--color-warning-600));
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: var(--space-3);
    z-index: calc(var(--z-fixed) + 1);
    transition: all var(--transition-fast);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-white);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--color-secondary-500);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: var(--color-secondary-500);
}

/* ========================================
   HERO SECTIONS
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-primary-800) 0%, var(--color-primary-600) 50%, var(--color-accent-teal) 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: -80px;
    padding-top: 100px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 168, 204, 0.1) 0%, transparent 50%);
    animation: heroAnimation 20s ease-in-out infinite;
}

@keyframes heroAnimation {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 20, 38, 0.1);
    z-index: 1;
}

.hero-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInLeft 1s ease-out;
}

.server-animation,
.domain-illustration {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.animated-servers,
.animated-domains {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.1));
    transition: all var(--transition-base);
}

.animated-servers:hover,
.animated-domains:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 15px 40px rgba(255, 255, 255, 0.2));
}

/* ========================================
   PRICING CARDS ENHANCEMENTS
   ======================================== */

.bg-primary-800 {
    background-color: var(--color-primary-800);
}

/* Space utilities that might be missing */
.space-y-2 > * + * {
    margin-top: var(--space-2);
}

.space-y-3 > * + * {
    margin-top: var(--space-3);
}

.space-y-6 > * + * {
    margin-top: var(--space-6);
}

/* Width utilities */
.w-full {
    width: 100%;
}

.w-12 {
    width: var(--space-12);
}

.h-12 {
    height: var(--space-12);
}

/* Opacity utilities */
.opacity-80 {
    opacity: 0.8;
}

/* Transform utilities */
.transform {
    transform: translate(var(--tw-translate-x, 0), var(--tw-translate-y, 0)) rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1));
}

.scale-105 {
    --tw-scale-x: 1.05;
    --tw-scale-y: 1.05;
}

.-translate-x-1\/2 {
    --tw-translate-x: -50%;
}

.-translate-y-1\/2 {
    --tw-translate-y: -50%;
}

.left-1\/2 {
    left: 50%;
}

.-top-3 {
    top: -0.75rem;
}

/* Additional Design System Enhancements */
.max-w-2xl {
    max-width: 42rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Enhanced Section Styling */
.section {
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 107, 53, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.section.bg-gray-50::before {
    background: radial-gradient(circle at 50% 100%, rgba(11, 20, 38, 0.02) 0%, transparent 50%);
}

/* Tab and Section Enhancements */
.nav-item.dropdown:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}

/* Custom animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--color-primary-800);
        flex-direction: column;
        padding: var(--space-6);
        gap: var(--space-4);
        transform: translateY(-100%);
        transition: transform var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero {
        margin-top: 0;
        padding-top: 120px;
        min-height: auto;
        padding-bottom: var(--space-16);
    }
    
    .hero-illustration {
        order: 2;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .nav-container {
        padding: var(--space-3) var(--space-4);
    }
    
    .logo h1 {
        font-size: var(--text-xl);
    }
}

/* ========================================
   FOCUS STATES FOR ACCESSIBILITY
   ======================================== */

.btn:focus,
.nav-links a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-secondary-500);
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .header,
    .mobile-menu-toggle,
    .hero-illustration {
        display: none;
    }
    
    .hero {
        margin-top: 0;
        padding-top: 0;
        background: var(--color-white);
        color: var(--color-gray-900);
    }
    
    .btn {
        border: 2px solid var(--color-gray-900);
        background: transparent;
        color: var(--color-gray-900);
    }
}

/* ========================================
   HIGH CONTRAST MODE SUPPORT
   ======================================== */

@media (prefers-contrast: high) {
    .hero {
        background: var(--color-gray-900);
    }
    
    .hero::before {
        display: none;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* ========================================
   REDUCED MOTION SUPPORT
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero::before {
        animation: none;
    }
    
    .animated-servers,
    .animated-domains {
        filter: none;
    }
}

/* ========================================
   HERO FEATURES STYLING
   ======================================== */

.hero-features {
    margin: 1.5rem 0;
}

.feature-item {
    opacity: 1;
}

.feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.3) !important;
}

.pricing-highlight {
    opacity: 1;
}

.hero-cta {
    opacity: 1;
}

.hosting-visual {
    max-width: 400px;
    margin: 0 auto;
}

.hero-content {
    padding: 2rem 0;
}