/**
 * ChaserP Modern Homepage Styles
 * South African-inspired design with blue, white, and red accents
 */

/* CSS Variables for South African Theme */
:root {
    --sa-blue: #002395;
    --sa-blue-light: #3b82f6;
    --sa-red: #de3831;
    --sa-red-light: #ef4444;
    --sa-white: #ffffff;
    --sa-black: #000000;
    --sa-green: #007a4d;
    --sa-yellow: #ffb612;
    --sa-orange: #ff7518;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, var(--sa-blue) 0%, var(--sa-blue-light) 100%);
    --red-gradient: linear-gradient(135deg, var(--sa-red) 0%, var(--sa-red-light) 100%);
    --success-gradient: linear-gradient(135deg, var(--sa-green) 0%, #10b981 100%);
    --warning-gradient: linear-gradient(135deg, var(--sa-yellow) 0%, #f59e0b 100%);
    --info-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --purple-gradient: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
    
    /* Spacing */
    --section-padding: 5rem 0;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--sa-black);
    background: var(--sa-white);
    overflow-x: hidden;
}

/* South African Flag Element */
.sa-flag {
    width: 30px;
    height: 20px;
    background: linear-gradient(
        to bottom,
        var(--sa-red) 0%,
        var(--sa-red) 16.66%,
        var(--sa-blue) 16.66%,
        var(--sa-blue) 33.33%,
        var(--sa-white) 33.33%,
        var(--sa-white) 50%,
        var(--sa-green) 50%,
        var(--sa-green) 66.66%,
        var(--sa-yellow) 66.66%,
        var(--sa-yellow) 83.33%,
        var(--sa-black) 83.33%,
        var(--sa-black) 100%
    );
    border-radius: 3px;
    box-shadow: var(--shadow-sm);
}

/* Navigation Styles */
.navbar-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sa-blue) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--sa-black) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--sa-blue) !important;
}

/* Button Styles */
.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--sa-black);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--sa-black);
    transform: translateY(-2px);
}

.btn-primary-glass {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-white-glass {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--sa-blue);
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-white-glass:hover {
    background: white;
    color: var(--sa-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-red-gradient {
    background: var(--red-gradient);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-red-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(222, 56, 49, 0.4);
    color: white;
}

.btn-primary-gradient {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: white;
}

/* Hero Carousel Styles */
.hero-carousel {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-slide {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-badge .badge {
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
}

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

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

.text-white-75 {
    color: rgba(255, 255, 255, 0.75);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.hero-actions {
    margin-bottom: 3rem;
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    display: block;
}

.hero-stats .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Floating Cards Animation */
.hero-visual {
    position: relative;
    height: 500px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-card.card-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.floating-card.card-2 {
    top: 40%;
    left: 5%;
    animation-delay: 2s;
}

.floating-card.card-3 {
    bottom: 15%;
    right: 20%;
    animation-delay: 4s;
}

.floating-card .card-content i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.floating-card .card-content h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--sa-black);
}

.floating-card .card-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 30px;
}

.carousel-control-next {
    right: 30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.carousel-indicators {
    bottom: 30px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background: white;
    transform: scale(1.2);
}

/* Quick Search Section */
.quick-search-section {
    margin-top: -80px;
    position: relative;
    z-index: 10;
    padding: 0 0 5rem 0;
}

.quick-search-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-form .form-control,
.search-form .form-select {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    border-color: var(--sa-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Section Headers */
.section-header {
    margin-bottom: 4rem;
}

.section-badge .badge {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    line-height: 1.6;
}

/* Background Gradients */
.bg-primary-gradient { background: var(--primary-gradient); }
.bg-red-gradient { background: var(--red-gradient); }
.bg-success-gradient { background: var(--success-gradient); }
.bg-warning-gradient { background: var(--warning-gradient); }
.bg-info-gradient { background: var(--info-gradient); }
.bg-purple-gradient { background: var(--purple-gradient); }

/* Badge Styles */
.bg-primary-soft { background: rgba(59, 130, 246, 0.1); color: var(--sa-blue); }
.bg-red-soft { background: rgba(222, 56, 49, 0.1); color: var(--sa-red); }
.bg-success-soft { background: rgba(16, 185, 129, 0.1); color: var(--sa-green); }

/* Job Cards */
.job-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.job-card-header {
    margin-bottom: 1.5rem;
}

.job-badges .badge {
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
}

.job-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.job-title a {
    color: var(--sa-black);
    transition: color 0.3s ease;
}

.job-title a:hover {
    color: var(--sa-blue);
}

.company-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.job-card-body {
    flex: 1;
}

.job-description {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.detail-item i {
    width: 20px;
    text-align: center;
}

.job-card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

/* Feature Cards */
.feature-card-modern {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

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

.feature-icon-modern {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--sa-black);
}

.feature-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.feature-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--sa-blue);
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

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

.testimonial-content {
    margin-bottom: 2rem;
}

.rating {
    margin-bottom: 1rem;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--sa-black);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.author-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--sa-black);
}

.author-title {
    color: var(--sa-blue);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.author-location {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

/* Company Logo Placeholders */
.company-logo-placeholder {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.company-logo-placeholder:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Tech Features */
.tech-feature {
    text-align: center;
    color: white;
}

.tech-feature i {
    margin-bottom: 1rem;
}

.tech-feature h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.text-red {
    color: var(--sa-red) !important;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--sa-blue) 0%, var(--sa-blue-light) 100%);
    color: white;
}

.cta-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-title {
    color: white;
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-features {
    margin-bottom: 2rem;
}

.cta-feature {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Demo Section */
.demo-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.demo-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    color: white;
}

.demo-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--sa-black);
}

.demo-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.demo-account {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.demo-account-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--sa-black);
}

.demo-credentials {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.credential-item {
    margin-bottom: 0.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
}

.demo-description {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

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

/* AOS Animation Overrides */
[data-aos="fade-up"] {
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .floating-cards {
        display: none;
    }
    
    .quick-search-section {
        margin-top: -40px;
    }
    
    .quick-search-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-slide {
        height: 80vh;
        background-attachment: scroll;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    .carousel-control-prev {
        left: 15px;
    }
    
    .carousel-control-next {
        right: 15px;
    }
    
    .quick-search-card {
        padding: 1.5rem;
    }
    
    .search-form .row {
        flex-direction: column;
    }
    
    .search-form .col-md-2 {
        margin-top: 1rem;
    }
    
    .feature-card-modern,
    .job-card,
    .testimonial-card {
        margin-bottom: 2rem;
    }
    
    .cta-card {
        padding: 2rem;
    }
    
    .demo-card {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .hero-stats .stat-number {
        font-size: 1.5rem;
    }
    
    .hero-stats .stat-label {
        font-size: 0.8rem;
    }
    
    .quick-search-card h4 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .hero-carousel,
    .navbar,
    .cta-section,
    .demo-section {
        display: none;
    }
    
    .quick-search-section {
        margin-top: 0;
    }
    
    * {
        box-shadow: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --sa-blue: #000080;
        --sa-red: #cc0000;
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
        --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
    }
    
    .job-card,
    .feature-card-modern,
    .testimonial-card {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-card {
        animation: none;
    }
    
    .carousel {
        transition: none;
    }
}