/* Custom styles for Phase 1 website */
/* Using Pico CSS as base + Tailwind utilities */

/* Private Demo Banner - Bright unique color */
.private-demo-banner {
    background: #FF6B35;
    color: #fff;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    width: 100%;
}

.logo {
    height: 40px;
    width: auto;
    filter: invert(1);
}

.private-demo-banner.visible {
    transform: translateY(0);
}

/* Header should be below banner when visible */
header {
    position: relative;
    z-index: 100;
}

/* Ensure header text has sufficient contrast on dark backgrounds */
header.container-fluid {
    background-color: #1e293b !important;
}

header a,
header strong,
header li,
header nav a {
    color: #ffffff !important;
}

header a:hover,
header nav a:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure navigation links are visible */
header nav a {
    text-decoration: none;
}

/* Ensure headings in dark sections have good contrast - HIGHEST PRIORITY */
/* These rules MUST override the default dark color with !important */
header h1,
header h2,
header h3,
header h4,
footer h1,
footer h2,
footer h3,
footer h4,
.bg-gray-900 h1,
.bg-gray-900 h2,
.bg-gray-900 h3,
.bg-gray-900 h4,
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
section.bg-dark h1,
section.bg-dark h2,
section.bg-dark h3,
section.bg-dark h4,
/* Also target sections that might have dark backgrounds from Pico CSS or other sources */
section[data-theme="dark"] h1,
section[data-theme="dark"] h2,
section[data-theme="dark"] h3,
section[data-theme="dark"] h4 {
    color: #ffffff !important; /* White for dark backgrounds - MUST override default */
}

/* Utility class for dark sections - add class="bg-dark" to sections with dark backgrounds */
.bg-dark {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.bg-dark p,
.bg-dark .text-gray-700,
.bg-dark .text-gray-600 {
    color: rgba(255, 255, 255, 0.95) !important; /* Light text for dark backgrounds */
}

/* If a section has dark background via inline style, make headings light */
section[style*="background"][style*="#1e"] h1,
section[style*="background"][style*="#1e"] h2,
section[style*="background"][style*="#1e"] h3,
section[style*="background"][style*="#1e"] h4,
section[style*="background"][style*="#1f"] h1,
section[style*="background"][style*="#1f"] h2,
section[style*="background"][style*="#1f"] h3,
section[style*="background"][style*="#1f"] h4 {
    color: #ffffff !important;
}

/* Ensure headings on light gray backgrounds have sufficient contrast */
.bg-gray-50 h1,
.bg-gray-50 h2,
.bg-gray-50 h3,
.bg-gray-50 h4,
section.bg-gray-50 h1,
section.bg-gray-50 h2,
section.bg-gray-50 h3,
section.bg-gray-50 h4 {
    color: #111827 !important; /* Very dark gray for maximum contrast on light gray */
}

/* Ensure headings on gradient/light colored backgrounds have dark text */
section[style*="gradient"] h1,
section[style*="gradient"] h2,
section[style*="gradient"] h3,
section[style*="gradient"] h4 {
    color: #111827 !important; /* Very dark gray for maximum contrast on light gradients */
}

/* Ensure headings inside white cards on light backgrounds remain dark */
.bg-white h1,
.bg-white h2,
.bg-white h3,
.bg-white h4 {
    color: #1f2937 !important; /* Dark gray for good contrast on white */
}

/* Typography Hierarchy - Override Pico CSS with higher specificity */
body {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
    padding-top: 0;
    transition: padding-top 0.3s ease;
}

body.banner-visible {
    padding-top: 0;
}

/* Override Pico CSS heading styles with proper hierarchy */
/* Default: let headings inherit color, then explicitly set for light/dark sections */
main h1,
section h1,
.container h1,
h1 {
    font-size: 3rem !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    margin-bottom: 1.5rem !important;
    letter-spacing: -0.02em !important;
    /* No default color - will be set explicitly for light/dark sections */
}

main h2,
section h2,
.container h2,
h2 {
    font-size: 2rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 1.25rem !important;
    letter-spacing: -0.01em !important;
    /* No default color - will be set explicitly for light/dark sections */
}

main h3,
section h3,
.container h3,
.service-card h3,
h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
    /* No default color - will be set explicitly for light/dark sections */
}

main h4,
section h4,
.container h4,
h4 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
    /* No default color - will be set explicitly for light/dark sections */
}

/* Default: dark headings for light backgrounds (most common case) */
main h1,
main h2,
main h3,
main h4,
section h1,
section h2,
section h3,
section h4,
.container h1,
.container h2,
.container h3,
.container h4 {
    color: #1f2937; /* Dark gray for good contrast on light backgrounds */
}

main p,
section p,
.container p,
p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
}

@media (max-width: 768px) {
    main h1,
    section h1,
    .container h1,
    h1 {
        font-size: 2.25rem !important;
    }
    
    main h2,
    section h2,
    .container h2,
    h2 {
        font-size: 1.875rem !important;
    }
    
    main h3,
    section h3,
    .container h3,
    h3 {
        font-size: 1.375rem !important;
    }
    
    main p,
    section p,
    .container p,
    p {
        font-size: 1rem !important;
    }
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero Section with Background Image */
.hero-section {
    position: relative;
    background-image: url('/img/584673200_764782179951871_9165753082363164418_n.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 6rem 1rem;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    margin: 1rem auto;
    max-width: 100%;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 95, 143, 0.85) 0%, rgba(44, 168, 120, 0.75) 100%);
    z-index: 1;
    border-radius: 0.5rem; /* Match the section border-radius */
}

.hero-section > div {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: white !important; /* Ensure white text on dark hero background */
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    line-height: 1.1;
}

.hero-section p {
    font-size: 1.5rem;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
    font-weight: 400;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 1rem;
        min-height: 400px;
    }
    
    .hero-section h1 {
        font-size: 2.25rem;
    }
    
    .hero-section p {
        font-size: 1.125rem;
    }
}

/* Service Cards */
.service-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transform: translateY(-4px);
    border-color: var(--color-primary);
}

.service-card h3 {
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.service-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #374151;
}

/* Brand Colors */
:root {
    --color-primary: #005F8F;
    --color-secondary: #F4A300;
    --color-accent: #2CA878;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background-color: #004a6f;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background-color: #d89300;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Section Spacing */
section {
    margin-bottom: 0;
    /* Ensure sections have light background by default unless explicitly dark */
    background-color: #ffffff;
}

section.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Override: sections with dark backgrounds should have light text */
section:not(.bg-gray-50):not(.bg-white):not([class*="bg-"]) {
    /* If a section doesn't have an explicit light background class, 
       check if it needs dark background - but default to light */
}

/* Make headings light in sections that might have dark backgrounds from Pico CSS or other sources */
section:not(.bg-gray-50):not(.bg-white):not([class*="bg-gray-50"]):not([class*="bg-white"]) h1,
section:not(.bg-gray-50):not(.bg-white):not([class*="bg-gray-50"]):not([class*="bg-white"]) h2,
section:not(.bg-gray-50):not(.bg-white):not([class*="bg-gray-50"]):not([class*="bg-white"]) h3,
section:not(.bg-gray-50):not(.bg-white):not([class*="bg-gray-50"]):not([class*="bg-white"]) h4 {
    /* Only apply if parent actually has dark background - but we can't detect that easily */
    /* So we'll rely on explicit classes instead */
}

/* Footer Typography - Smaller sizes */
footer h3 {
    color: white !important;
    margin-bottom: 0.75rem !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
}

footer h4 {
    color: white !important;
    margin-bottom: 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
}

footer p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.5rem !important;
}

/* Improve contrast for footer labels and text */
footer label {
    color: rgba(255, 255, 255, 0.9) !important;
}

footer .text-gray-400 {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure all text in dark sections has sufficient contrast */
.bg-gray-900 p,
.bg-gray-900 label,
.bg-gray-900 span {
    color: rgba(255, 255, 255, 0.95) !important;
}

.bg-gray-900 .text-gray-400,
.bg-gray-900 .text-gray-500 {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Improve contrast for gray text on light backgrounds */
.text-gray-600 {
    color: #4b5563 !important;
}

.text-gray-700 {
    color: #374151 !important;
}

.text-gray-500 {
    color: #6b7280 !important;
}

footer ul {
    font-size: 0.875rem !important;
}

footer li {
    font-size: 0.875rem !important;
    margin-bottom: 0.25rem !important;
}

footer a {
    color: #bfdbfe !important;
    font-size: 0.875rem !important;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #93c5fd !important;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    #mobile-menu {
        width: 100%;
    }
    
    #mobile-menu ul {
        flex-direction: column;
    }
}

/* Ensure mobile menu toggle is hidden on desktop */
@media (min-width: 768px) {
    .mobile-nav {
        display: none !important;
    }
    
    .desktop-nav {
        display: flex !important;
    }
}

/* Ensure desktop nav is hidden on mobile */
@media (max-width: 767px) {
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-nav {
        display: flex !important;
    }
}

/* Language Switcher - Standard Design */
.language-switcher {
    margin-left: 1rem;
}

.language-select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 0.375rem;
    color: white !important;
    padding: 0.5rem 2rem 0.5rem 0.75rem !important;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    min-width: 120px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

.language-select::-ms-expand {
    display: none;
}

.language-select:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.language-select:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.language-select option {
    background-color: #1f2937;
    color: white;
}

/* Footer Language Switcher */
.language-select-footer {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    padding: 0.5rem 2rem 0.5rem 0.75rem !important;
    font-size: 0.875rem;
    min-width: 140px;
    max-width: 200px;
    width: auto;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    cursor: pointer;
    display: inline-block;
}

.language-select-footer::-ms-expand {
    display: none;
}

.language-select-footer:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Mobile Language Switcher */
@media (max-width: 768px) {
    .language-select {
        min-width: 100px;
        font-size: 0.75rem;
        padding: 0.4rem 1.75rem 0.4rem 0.6rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    
    section.container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    #language-switcher-mobile {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Concept Approval Plugin Overlay - Hidden by default, shown via JavaScript */
#concept-approval-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    display: none !important; /* Hidden by default - JavaScript will set to flex when showing */
    align-items: center !important;
    justify-content: center !important;
}

#concept-approval-dialog {
    z-index: 10000 !important;
    position: relative !important;
}

