@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0056b3;
    --primary-dark: #003d80;
    --secondary: #00a8e8;
    --accent: #ff6b35;
    --dark: #0f172a;
    --light: #f8fafc;
    --white: #ffffff;
    --text: #334155;
    --success: #10b981;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* --- Global Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', sans-serif; 
    line-height: 1.6; 
    color: var(--text); 
    background: var(--white); 
    overflow-x: hidden; /* Prevent horizontal scroll */
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Force long words to wrap (Fixes mobile layout issues) */
h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* --- Header --- */
header {
    position: fixed; width: 100%; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
header.scrolled { box-shadow: var(--shadow-md); padding: 0.5rem 0; }

nav {
    max-width: 1280px; margin: 0 auto; padding: 1rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    position: relative;
}

.logo {
    display: flex; align-items: center; gap: 0.75rem; 
    font-size: 1.5rem; font-weight: 800; color: var(--primary-dark);
    letter-spacing: -0.5px;
}
.logo img { height: 40px; width: auto; display: block; }

.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--text); position: relative; }
.nav-links a:hover { color: var(--primary); }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0;
    background-color: var(--primary); transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }

.cta-btn {
    background: var(--primary); color: white; padding: 0.75rem 1.8rem;
    border-radius: 6px; font-weight: 600; border: none; cursor: pointer;
    font-size: 0.95rem; transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.cta-btn:hover { 
    background: var(--primary-dark); transform: translateY(-1px); 
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.2);
}

.mobile-toggle { 
    display: none; 
    font-size: 1.8rem; 
    cursor: pointer; 
    color: var(--dark);
    padding: 0.5rem;
}

/* --- Hero Section --- */
.hero {
    margin-top: 80px; padding: 8rem 2rem 6rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 40px 40px; opacity: 0.15;
}
.hero-content {
    max-width: 1280px; margin: 0 auto; position: relative; z-index: 1;
    text-align: center; max-width: 800px;
}
.hero h1 { 
    font-size: 3.5rem; font-weight: 800; line-height: 1.15; 
    margin-bottom: 1.5rem; letter-spacing: -1px; 
}
.highlight { 
    background: linear-gradient(to right, #60a5fa, #3b82f6); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
}
.hero p { 
    font-size: 1.25rem; color: #cbd5e1; margin-bottom: 2.5rem; 
    font-weight: 300; line-height: 1.8; 
}

/* --- Services Grid (Fixed for Mobile Overflow) --- */
.services { padding: 6rem 2rem; background: var(--light); overflow: hidden; }
.section-title { 
    text-align: center; font-size: 2.5rem; color: var(--dark); 
    font-weight: 700; margin-bottom: 4rem; 
    padding: 0 1rem;
}
.services-grid {
    max-width: 1280px; margin: 0 auto;
    display: grid; 
    /* CHANGED: Fits small phones (280px) */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    width: 100%;
}
.service-card {
    background: white; padding: 3rem 2.5rem; border-radius: 16px;
    border: 1px solid #e2e8f0; transition: all 0.4s ease;
    display: flex; flex-direction: column;
    max-width: 100%; box-sizing: border-box;
    text-align: center;
}
.service-card:hover { 
    transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--primary); 
}
.service-icon {
    width: 60px; height: 60px; background: #eff6ff; color: var(--primary);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin: 0 auto 1.5rem;
}
.service-card h3 { font-size: 1.35rem; margin-bottom: 1rem; color: var(--dark); }
.service-card p { color: #64748b; margin-bottom: 1.5rem; line-height: 1.7; flex-grow: 1; }
.service-link {
    color: var(--primary); font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.5rem;
    justify-content: center;
}
.service-link:hover { gap: 0.8rem; }

/* --- Inner Page Layouts --- */
.page-header {
    background: var(--primary-dark); color: white; padding: 10rem 2rem 5rem;
    text-align: center; margin-bottom: 5rem;
}
.page-header h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; }

.breadcrumb { 
    font-size: 0.9rem; color: var(--secondary); margin-bottom: 1.5rem; 
    text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; 
}

.content-wrapper { max-width: 1100px; margin: 0 auto 8rem; padding: 0 2rem; }

.detail-grid { display: grid; grid-template-columns: 1.8fr 1fr; gap: 5rem; }
.full-width-container { max-width: 800px; margin: 0 auto; }

.detail-content h2 { color: var(--dark); font-size: 2rem; margin: 2.5rem 0 1.2rem; }
.detail-content p { margin-bottom: 1.2rem; color: var(--text); font-size: 1.05rem; line-height: 1.8; }
.detail-content ul { list-style: disc; margin-left: 1.5rem; margin-bottom: 2rem; color: var(--text); }
.detail-content li { margin-bottom: 0.5rem; }

.sidebar { position: sticky; top: 120px; }
.sidebar-box { background: var(--light); padding: 2.5rem; border-radius: 16px; border: 1px solid #e2e8f0; }
.check-list li { display: flex; gap: 1rem; margin-bottom: 1.2rem; align-items: start; font-size: 0.95rem; }
.check-icon { 
    color: var(--primary); font-weight: bold; flex-shrink: 0; background: #dbeafe; 
    width: 20px; height: 20px; border-radius: 50%; display: flex; 
    align-items: center; justify-content: center; font-size: 0.7rem; margin-top: 3px; 
}

/* --- Footer --- */
footer { background: #020617; color: #94a3b8; padding: 6rem 2rem 2rem; }
.footer-grid {
    max-width: 1280px; margin: 0 auto; display: grid;
    grid-template-columns: 2fr 1fr 1fr; 
    gap: 4rem; padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand h3 { color: white; margin-bottom: 1.2rem; font-size: 1.5rem; }
.footer-links h4 { color: white; margin-bottom: 1.5rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; }
.footer-links a { display: block; margin-bottom: 0.8rem; transition: 0.2s; }
.footer-links a:hover { color: var(--secondary); transform: translateX(5px); }
.footer-bottom { text-align: center; padding-top: 2rem; font-size: 0.9rem; }

/* --- Modal & Toast --- */
.modal {
    display: none; position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s;
}
.modal.active { display: flex; opacity: 1; }
.modal-content {
    background: white; padding: 3rem; border-radius: 20px; width: 90%; max-width: 500px;
    position: relative; transform: translateY(20px); transition: transform 0.3s;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal.active .modal-content { transform: translateY(0); }
.close-modal { 
    position: absolute; top: 1.5rem; right: 1.5rem; cursor: pointer; 
    width: 32px; height: 32px; background: var(--light); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.close-modal:hover { background: #e2e8f0; transform: rotate(90deg); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 600; color: var(--dark); }
.form-input {
    width: 100%; padding: 0.9rem; border: 2px solid #e2e8f0; border-radius: 8px;
    font-family: inherit; font-size: 1rem; transition: 0.2s;
}
.form-input:focus { outline: none; border-color: var(--primary); background: #fff; }

#toast {
    visibility: hidden; min-width: 300px; background-color: var(--success); color: #fff;
    text-align: center; border-radius: 8px; padding: 16px; position: fixed; z-index: 3000;
    left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 1rem; font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); opacity: 0; transition: opacity 0.3s, bottom 0.3s;
}
#toast.show { visibility: visible; opacity: 1; bottom: 50px; }

/* --- MOBILE RESPONSIVENESS (Refined) --- */
@media (max-width: 900px) {
    .mobile-toggle { display: block; }
    
    /* Mobile Menu Dropdown */
    .nav-links { 
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: white; flex-direction: column; padding: 2rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #f1f5f9; gap: 1.5rem;
    }
    .nav-links.active { display: flex; }

    .detail-grid { grid-template-columns: 1fr; gap: 3rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
    
    .hero { padding: 6rem 1.5rem 4rem; margin-top: 60px; }
    .page-header { padding: 8rem 1.5rem 4rem; }
    .services { padding: 4rem 1.5rem; }
    .content-wrapper { padding: 0 1.5rem; margin-bottom: 4rem; }
    
    /* Font Reductions */
    .hero h1 { font-size: 2.25rem; }
    .page-header h1 { font-size: 2rem; }
    .section-title { font-size: 1.8rem; margin-bottom: 2.5rem; }
    
    .service-card { padding: 2rem; }
    .modal-content { padding: 2rem; width: 95%; }
}

@media (max-width: 480px) {
    .logo { font-size: 1.2rem; }
    .logo img { height: 32px; }
    .hero h1 { font-size: 2rem; }
    .section-title { font-size: 1.6rem; }
    .cta-btn { width: 100%; text-align: center; }
    .hero-content div[style*="display: flex"] { flex-direction: column; }
    
    /* Ensure modal fits small screens */
    .modal-content { padding: 1.5rem; width: 90%; }
}