/**
 * Main Layout Styles
 * Global styles for the main site layout including navbar, footer, and common elements
 */

/* Import BEAMY Brand Variables */
@import url('./beamy-variables.css');

/* BEAMY Search Bar Style Brand */
.beamy-search-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--beamy-white);
    border: 1px solid var(--gray-300);
    border-radius: 2rem;
    padding: 0.75rem 1.5rem;
    margin: 0 auto;
    max-width: 300px;
    box-shadow: var(--shadow-sm);
    transition: var(--beamy-transition-holographic);
    position: relative;
    overflow: hidden;
}

.beamy-search-brand:hover {
    border-color: var(--beamy-primary);
    box-shadow: var(--beamy-shadow-holographic);
    transform: translateY(-2px);
}

.beamy-search-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--beamy-black) !important;
    font-family: var(--beamy-font-family);
    font-weight: var(--beamy-font-weight-bold);
    font-size: 1.25rem;
    transition: var(--beamy-transition);
}

.beamy-search-brand-link:hover {
    color: var(--beamy-primary) !important;
    text-shadow: 0 0 10px rgba(0, 48, 255, 0.3);
}

.beamy-search-logo {
    height: 28px;
    width: auto;
    transition: var(--beamy-transition);
    /* Logo guidelines - never alter */
    min-width: var(--beamy-logo-min-digital);
    min-height: var(--beamy-logo-min-digital);
    padding: var(--beamy-logo-exclusion);
    transform: rotate(var(--beamy-logo-no-rotate));
    filter: var(--beamy-logo-no-effects);
    object-fit: var(--beamy-logo-no-changes);
}

.beamy-search-brand:hover .beamy-search-logo {
    filter: sepia(1) saturate(5) hue-rotate(200deg);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 48, 255, 0.4);
}

/* Search bar glow effect */
.beamy-search-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 48, 255, 0.1), transparent);
    transition: left 0.5s;
}

.beamy-search-brand:hover::before {
    left: 100%;
}

/* ===== CSS VARIABLES - BEAMY Brand Colors ===== */
:root {
    --primary-color: #0030FF; /* BEAMY International Klein Blue */
    --primary-dark: #0026CC;
    --secondary-color: #B6D9ED; /* BEAMY Light Blue */
    --accent-color: #4B8BC7; /* BEAMY Medium Blue */
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #4B8BC7;
    --dark-color: #000000; /* BEAMY Black */
    --light-color: #F5F5F5; /* BEAMY Light Gray */
    --gray-100: #FDF9F0; /* BEAMY Cream */
    --gray-200: #E9EBED; /* BEAMY Light Gray */
    --gray-300: #D6D3CC; /* BEAMY Warm Gray */
    --gray-400: #7B8FA4; /* BEAMY Blue Gray */
    --gray-500: #4B8BC7; /* BEAMY Medium Blue */
    --gray-600: #0030FF; /* BEAMY Primary Blue */
    --gray-700: #0026CC; /* BEAMY Dark Blue */
    --gray-800: #000000; /* BEAMY Black */
    --gray-900: #000000; /* BEAMY Black */
    
    --shadow-sm: 0 1px 3px rgba(0, 48, 255, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 48, 255, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 48, 255, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 48, 255, 0.1);
    
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --transition: all 0.2s ease;
    --transition-fast: all 0.15s ease;
}

/* ===== GLOBAL RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--beamy-font-family);
    line-height: 1.6;
    color: var(--gray-800);
    background: #ffffff;
    min-height: 100vh;
    /* Enable hardware acceleration */
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== MOBILE-FRIENDLY BASE STYLES ===== */
.tablet-screen {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--beamy-font-family);
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem;
}

/* Mobile-friendly responsive design */
@media (max-width: 768px) {
    .tablet-screen {
        padding: 0.5rem;
        min-height: 100vh;
    }
}

/* Touch-friendly base styles */
.touch-button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    min-height: 44px; /* iOS recommended touch target size */
    min-width: 44px;
}

/* Safe area support for devices with notches */
@supports (padding: max(0px)) {
    .tablet-screen {
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    padding: 1rem 0;
    /* Hardware acceleration */
    transform: translateZ(0);
    will-change: transform;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: var(--beamy-font-family);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.navbar-brand:hover {
    color: var(--primary-dark) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link {
    color: var(--gray-700) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(99, 102, 241, 0.1);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--beamy-font-family);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    transition: var(--transition);
    transform: translateZ(0);
    will-change: transform;
}

.cta-button.primary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.cta-button.primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-3px) translateZ(0);
    box-shadow: var(--shadow-lg);
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-3px) translateZ(0);
}

/* ===== FOOTER STYLES ===== */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 1rem;
    text-align: center;
    color: var(--gray-400);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* ===== ANIMATION CLASSES ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.stat-card,
.step-card,
.category-card,
.clothing-card,
.hero-cta,
.cta-button {
    transform: translateZ(0);
    will-change: transform;
}

/* ===== 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;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
