/* ==========================================================================
   Base Styles & Typography
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
    background-color: #f8fafc;
}

h1, h2, h3, h4 {
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: #2563eb;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #1d4ed8;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-right: 15px;
    margin-bottom: 10px;
}

.btn-primary {
    background-color: #0f172a;
    color: #ffffff;
    border: 2px solid #0f172a;
}

.btn-primary:hover {
    background-color: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #0f172a;
    border: 2px solid #0f172a;
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
    background-color: #ffffff;
    padding: 1rem 5%;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

nav > a {
    display: flex;
    align-items: center;
}

nav img {
    height: 85px; 
    width: auto;
    display: block; 
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem; 
    align-items: center;
    margin: 0; 
    padding: 0; 
}

nav ul li a {
    color: #475569;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap; 
}

nav ul li a:hover {
    color: #0f172a;
}

nav ul li:last-child a {
    background-color: #2563eb;
    color: #ffffff;
    padding: 10px 24px; 
    border-radius: 6px; 
    display: inline-block; 
    font-weight: 600; 
    white-space: nowrap; 
    transition: all 0.2s ease;
}

nav ul li:last-child a:hover {
    background-color: #1d4ed8;
    color: #ffffff;
    transform: translateY(-2px); 
}

/* ==========================================================================
   Mobile Navigation (Hamburger)
   ========================================================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #0f172a;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    nav ul.nav-menu {
        position: absolute;
        top: 100%;
        left: -120%; 
        opacity: 0; 
        visibility: hidden; 
        flex-direction: column;
        background-color: #ffffff;
        width: 100%;
        text-align: center;
        transition: all 0.3s ease-in-out;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 2rem;
        border-top: 1px solid #e2e8f0;
        z-index: 1000;
    }

    nav ul.nav-menu.active {
        left: 0;
        opacity: 1; 
        visibility: visible;
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* ==========================================================================
   Main Layout & Sections
   ========================================================================== */
main {
    min-height: 80vh;
}

section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

#hero, #about-hero, #contact-hero, #legal-header {
    text-align: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #f8fafc 100%);
    padding: 7rem 5%;
    border-radius: 16px;
    margin-top: 2rem;
    border: 1px solid #e2e8f0;
}

#hero h1, #about-hero h1, #contact-hero h1, #legal-header h1 {
    font-size: 3.5rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    letter-spacing: -0.02em;
}

#hero p, #about-hero p, #contact-hero p, #legal-header p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: #475569;
}

.grid, .grid-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card, article {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card:hover, article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card h3, article h2, article h3 {
    font-size: 1.5rem;
    color: #0f172a;
    margin-bottom: 1rem;
}

.card p {
    flex-grow: 1;
}

ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Pricing Tables
   ========================================================================== */
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background-color: #ffffff;
    padding: 3rem 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pricing-card.featured {
    border: 2px solid #2563eb;
    position: relative;
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    color: #0f172a;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.5rem 0;
}

.pricing-card .price span {
    font-size: 1.25rem;
    color: #64748b;
    font-weight: 500;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    flex-grow: 1;
}

.pricing-card ul li {
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    margin: 0;
}

.pricing-card ul li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Legal Content & Forms
   ========================================================================== */
#legal-content {
    background: #ffffff;
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 2rem;
}

#legal-content h2 {
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

form {
    max-width: 600px;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

input, select, textarea {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 1.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #f8fafc;
}

button[type="submit"] {
    background-color: #2563eb;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

button[type="submit"]:hover {
    background-color: #1d4ed8;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 4rem 5% 2rem;
    margin-top: 5rem;
    text-align: center;
}

.footer-contact {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #f1f5f9;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: #ffffff;
}

/* Mobile Resets */
@media (max-width: 768px) {
    #hero h1, #about-hero h1, #contact-hero h1, #legal-header h1 {
        font-size: 2.25rem;
    }
    
    section {
        padding: 3rem 5%;
    }
    
    .grid, .grid-columns, .pricing-table {
        grid-template-columns: 1fr;
    }
}

/* 2x2 Grid for Homepage Services */
#services .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Forces 2 columns */
    gap: 2rem;
    margin-top: 3rem;
}

/* Mobile: Switch to 1 column */
@media (max-width: 768px) {
    #services .grid {
        grid-template-columns: 1fr;
    }
}