/* Jainca Group - Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #1e3a8a; /* Deep Blue */
    --primary-light: #3b82f6;
    --secondary: #dc2626; /* Corporate Red */
    --accent: #facc15; /* Subtle gold/yellow for CTAs */
    --background: #ffffff;
    --surface: #f8fafc;
    --text: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --primary-gradient: linear-gradient(135deg, var(--primary), var(--primary-light));
    --secondary-gradient: linear-gradient(135deg, var(--secondary), #ef4444);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Futuristic Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.loader-logo {
    width: 250px;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
    animation: pulse 2s infinite ease-in-out;
}

.loader-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    box-shadow: 0 0 15px var(--primary-light);
    transition: width 0.1s linear;
}

.loader-text {
    margin-top: 15px;
    color: var(--white);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
}

.loader-percentage {
    font-weight: 600;
    color: var(--primary-light);
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* --- Layout Components --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

input, textarea, select {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.2);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Specialized Components --- */

/* Testimonials */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

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

.testimonial-quote {
    font-size: 1.1rem;
    color: var(--text);
    font-style: italic;
    margin-bottom: 25px;
    position: relative;
}

.testimonial-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-light);
    opacity: 0.2;
    position: absolute;
    top: -30px;
    left: -10px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
}

.testimonial-info h4 {
    font-size: 1rem;
    margin: 0;
}

.testimonial-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Mission & Vision */
.mission-vision-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.mv-card {
    padding: 50px 40px;
    border-radius: 30px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.mv-card.primary {
    background: var(--primary-gradient);
    color: var(--white);
}

.mv-card.primary h3, .mv-card.primary p {
    color: var(--white);
}

.mv-card.secondary {
    background: var(--white);
    box-shadow: var(--shadow);
}

.mv-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    display: inline-block;
}

/* CTA Section */
.cta-banner {
    background: var(--primary-gradient);
    padding: 80px 0;
    color: var(--white);
    text-align: center;
    border-radius: 40px;
    margin: 60px auto;
    width: 90%;
    max-width: 1200px;
}

.cta-banner h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-banner p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* History Timeline */
.history-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 80px;
}

.history-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.history-image {
    border-radius: 40px;
    box-shadow: var(--shadow-heavy);
    width: 100%;
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0 !important;
        padding: 20px !important;
    }
    .sidebar {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        padding: 20px !important;
    }
    .sidebar nav ul {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
    }
    .sidebar li {
        margin-top: 0 !important;
    }
    
    /* Global grid adjustment */
    [style*="display: grid"] {
        gap: 30px !important;
    }
}

@media (max-width: 768px) {
    .history-block {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .history-block.reverse .history-image {
        order: 1;
    }
    .history-block.reverse .history-content {
        order: 2;
    }
    
    /* Mobile Menu Toggle */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.3s;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    .nav-menu.active {
        right: 0;
    }
    .hamburger {
        display: block !important;
        cursor: pointer;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 20px !important;
        text-align: center;
    }
    
    .nav-menu a {
        font-size: 1.5rem;
        color: var(--text) !important;
    }

    header .container {
        padding: 0 20px;
    }
    
    #main-logo {
        height: 60px !important;
    }
}

.hamburger {
    display: none;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary);
    margin: 5px 0;
    transition: 0.3s;
}

.btn-lang {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
    min-width: 45px;
}

.btn-lang:hover {
    background: var(--primary);
    color: white;
}

@media (max-width: 768px) {
    .nav-menu ul {
        align-items: center;
    }
}
/* PWA Install Button & Banner */
#pwa-install-btn {
    display: none; /* Hidden by default, shown via JS */
    background: var(--accent);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.3);
    transition: var(--transition);
    animation: pulse-gold 2s infinite;
}

#pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 204, 21, 0.4);
    background: #fde047;
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(250, 204, 21, 0); }
    100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}

/* Mobile PWA Prompt */
.pwa-mobile-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #0f172a;
    color: white;
    padding: 20px;
    border-radius: 20px;
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-mobile-prompt.show {
    display: flex;
    transform: translateY(0);
}

.pwa-prompt-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pwa-prompt-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    object-fit: cover;
}

.pwa-prompt-text h4 {
    color: white;
    font-size: 1rem;
    margin: 0;
}

.pwa-prompt-text p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}
