/* ===========================
   STANDALONE SEARCH PAGE
   =========================== 
   
   This file contains styles for the standalone company search page.
   Built on top of General_Main.css design patterns and variables.
*/

/* Import design variables from main system */
:root {
    /* Colors from General_Main.css */
    --primary: #5fc73e;
    --primary-dark: #4ab02f;
    --accent: #e87c20;
    --accent-dark: #d96a0a;
    --primary-gradient: linear-gradient(135deg, #5fc73e 0%, #4ab02f 100%);
    --accent-gradient: linear-gradient(135deg, #e87c20 0%, #d96a0a 100%);
    
    /* Background and glass effects */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 60px rgba(0, 0, 0, 0.2);
    
    /* Text colors */
    --text-primary: #464646;
    --text-secondary: #6b7280;
    --text-light: #64748b;
    
    /* Dashboard colors for clean sections */
    --dashboard-bg: #f8fafc;
    --dashboard-white: #ffffff;
    --dashboard-border: #e2e8f0;
    --dashboard-text: #334155;
    --dashboard-text-light: #64748b;
    --dashboard-hover: #f1f5f9;
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* PUSHED FOOTER LAYOUT - Footer always at bottom of page content */
html {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    /* Ensure background covers dynamic content */
    background-attachment: local; /* Makes background scroll with content */
}

/* Large morphing background figure - FIXED: No longer affects scroll height */
body::before {
    content: '';
    position: fixed; /* FIXED: Use fixed to prevent affecting document height */
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200vh; /* Large enough to cover viewport during animations */
    background: 
        radial-gradient(ellipse 400px 300px at 30% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 350px 450px at 70% 30%, rgba(168, 85, 247, 0.12) 0%, transparent 65%),
        radial-gradient(ellipse 300px 400px at 50% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 60%);
    animation: morphShape 60s ease-in-out infinite;
    z-index: -1;
    filter: blur(40px);
    /* CRITICAL: Prevent this element from affecting document flow */
    pointer-events: none;
}

@keyframes morphShape {
    0% { 
        transform: translate(0, 0) rotate(0deg) scaleX(1) scaleY(1);
    }
    16% { 
        transform: translate(-100px, 50px) rotate(15deg) scaleX(1.3) scaleY(0.8);
    }
    33% { 
        transform: translate(80px, -80px) rotate(-10deg) scaleX(0.7) scaleY(1.4);
    }
    50% { 
        transform: translate(-50px, 100px) rotate(25deg) scaleX(1.5) scaleY(0.6);
    }
    66% { 
        transform: translate(120px, -60px) rotate(-20deg) scaleX(0.8) scaleY(1.3);
    }
    83% { 
        transform: translate(-80px, -40px) rotate(12deg) scaleX(1.2) scaleY(0.9);
    }
    100% { 
        transform: translate(0, 0) rotate(0deg) scaleX(1) scaleY(1);
    }
}

/* ===========================
   MAIN CONTENT LAYOUT
   =========================== */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center;
    justify-content: flex-start;
    padding: 4rem 1rem 2rem; /* Add bottom padding for spacing */
    width: 100%;
}

.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 2rem 1.5rem;
    text-align: center;
    width: 100%;
    max-width: 700px;
    position: relative;
    z-index: 2; /* Higher than search-results-container (1) so dropdowns inside can appear above */
    transform: translateY(0);
    transition: var(--transition);
}

.search-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Light glow effect */
.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}

/* ===========================
   LOGO SECTION
   =========================== */

.logo-container {
    margin-bottom: 2rem;
    text-align: center;
}

.logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.staging-indicator {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin: 0.5rem auto;
    border: 1px solid #dee2e6;
    text-align: center;
    position: relative;
    max-width: 200px;
    font-size: 0.8rem;
}

.staging-indicator .fas {
    font-size: 0.8rem;
    margin-right: 0.3rem;
    color: #6c757d;
    display: inline-block;
}

.staging-text {
    display: inline;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: capitalize;
}

.staging-subtitle {
    font-size: 0.7rem;
    font-weight: 400;
    margin-left: 0.2rem;
    opacity: 0.9;
    letter-spacing: 0.01em;
    text-transform: none;
    display: inline;
    color: #dc3545;
}

/* Removed flashy animations for cleaner design */

/* Search toggle styles moved to standalone_forms.css */

/* ===========================
   SEARCH SECTIONS
   =========================== */

.search-section {
    transform-origin: center top;
}

.search-section.hidden {
    display: none;
}

/* Search form styles moved to standalone_forms.css */

/* Dropdown styling moved to standalone_forms.css */

/* Search button styles moved to standalone_forms.css */

/* ===========================
   SEGMENTATION PLACEHOLDER
   =========================== */

.segmentation-placeholder {
    padding: 3rem 2rem;
}

.placeholder-content {
    color: var(--dashboard-text-light);
}

.placeholder-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--dashboard-text-light);
}

.placeholder-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dashboard-text);
}

.placeholder-content p {
    font-size: 1rem;
    color: var(--dashboard-text-light);
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    background: var(--dashboard-white);
    border-top: 1px solid var(--dashboard-border);
    padding: 1.5rem 2rem 1rem;
    margin-top: 2rem; /* Add space above footer */
    flex-shrink: 0; /* Prevent footer from shrinking */
    width: 100%;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.4rem;
    display: inline-block;
}

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

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

.footer-link {
    color: var(--dashboard-text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-link::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    width: 8px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-fast);
    transform-origin: left;
}

.footer-link:hover::before {
    transform: translateY(-50%) scaleX(1);
}

/* External footer links (not handled by popup system) */
.footer-link-external {
    color: var(--dashboard-text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
}

.footer-link-external:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-link-external::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    width: 8px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-fast);
    transform-origin: left;
}

.footer-link-external:hover::before {
    transform: translateY(-50%) scaleX(1);
}

/* Footer Copyright */
.footer-copyright {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dashboard-border);
    text-align: center;
}

.footer-copyright p {
    color: var(--dashboard-text-light);
    font-size: 0.85rem;
    margin: 0;
    font-weight: 400;
}

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

@media (max-width: 992px) {
    .main-content {
        padding: 2rem 1rem 1.5rem;
        min-height: calc(100vh - 180px);
    }
    
    .search-container {
        padding: 2rem 1.25rem;
        max-width: 600px;
    }
    
    .logo {
        height: 55px;
    }
    
    /* Form responsive styles moved to standalone_forms.css */
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        text-align: center;
    }
    
    .footer-column h4 {
        margin-bottom: 0.6rem;
    }
    
    .footer-link::before {
        display: none;
    }
    
    .footer-link:hover {
        transform: none;
    }
    
    .footer-link-external::before {
        display: none;
    }
    
    .footer-link-external:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    .search-container {
        padding: 1.75rem 1rem;
        border-radius: 16px;
    }
    
    .logo {
        height: 50px;
    }
    
    .staging-indicator {
        padding: 0.4rem 0.8rem;
        margin: 0.4rem auto;
        max-width: 180px;
        font-size: 0.75rem;
    }
    
    .staging-text {
        font-size: 0.75rem;
    }
    
    .staging-subtitle {
        font-size: 0.65rem;
    }
    
    /* Form responsive styles moved to standalone_forms.css */
    
    .footer {
        padding: 2rem 1rem 1.5rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1.5rem 0.5rem 1rem;
    }
    
    .search-container {
        padding: 1.25rem 0.75rem;
        margin: 0 0.5rem;
    }
    
    .logo {
        height: 45px;
    }
    
    .staging-indicator {
        padding: 0.35rem 0.7rem;
        margin: 0.35rem auto;
        max-width: 160px;
        font-size: 0.7rem;
    }
    
    .staging-text {
        font-size: 0.7rem;
        letter-spacing: 0.01em;
    }
    
    .staging-subtitle {
        font-size: 0.6rem;
    }
    
    .staging-indicator .fas {
        font-size: 0.7rem;
    }
    
    /* Form responsive styles moved to standalone_forms.css */
    
    .placeholder-content i {
        font-size: 2rem;
    }
    
    .placeholder-content h3 {
        font-size: 1.25rem;
    }
    
    .placeholder-content p {
        font-size: 0.9rem;
    }
}

/* ===========================
   ACCESSIBILITY
   =========================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body::before {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    .search-container {
        border: 2px solid rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.9);
    }
    
    /* Form contrast styles moved to standalone_forms.css */
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .footer {
        background: #1f2937;
        border-top-color: #374151;
    }
    
    .footer-column h4 {
        color: #f9fafb;
    }
    
    .footer-link {
        color: #d1d5db;
    }
    
    .footer-link:hover {
        color: var(--primary);
    }
    
    .footer-link-external {
        color: #d1d5db;
    }
    
    .footer-link-external:hover {
        color: var(--primary);
    }
}

/* Branch smart dropdown styles moved to standalone_forms.css */