/* Global Styles */
:root {
    --primary: #011e41; /* Deep Navy */
    --secondary: #c5a059; /* Gold */
    --accent: #d4af37;
    --bg-light: #fcfcfc;
    --text-main: #333;
    --text-muted: #666;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

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

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navbar */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    color: var(--primary);
    letter-spacing: 1px;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    position: relative;
    font-weight: 500;
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links a:hover::after {
    width: 100%;
}

.btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #002b5e;
    transform: translateY(-2px);
}

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

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

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(1, 30, 65, 0.7), rgba(1, 30, 65, 0.7)), 
                url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?auto=format&fit=crop&q=80&w=2070');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.search-box {
    background: var(--white);
    padding: 10px;
    border-radius: 50px;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    border-radius: 50px;
    outline: none;
}

.search-box .btn {
    border-radius: 50px;
    padding: 15px 40px;
}

/* Services Section */
.services {
    padding: 100px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
}

.section-head h2 {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 10px;
}

.section-head p {
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-bottom: 3px solid var(--secondary);
}

.service-card i {
    font-size: 40px;
    color: var(--secondary);
    margin-bottom: 20px;
    display: block;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

/* Talk to Lawyer Section */
.consultation {
    background: #f0f4f8;
    padding: 80px 0;
}

.consult-box {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--white);
    padding: 50px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.consult-text {
    flex: 1;
}

.consult-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary);
}

.consult-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-num {
    background: var(--secondary);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
}

.consult-img {
    flex: 0.8;
}

.consult-img img {
    width: 100%;
    border-radius: 8px;
}

/* Footer */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h4 {
    margin-bottom: 25px;
    color: var(--secondary);
    font-size: 18px;
}

.footer-col p {
    opacity: 0.7;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    opacity: 0.7;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    opacity: 0.6;
}

/* Trust Badges */
.trust-badges {
    background: white;
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}

.badges-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.5;
    filter: grayscale(1);
}

.badges-flex i { font-size: 30px; }

/* Featured Experts */
.experts {
    padding: 100px 0;
    background: #fff;
}

.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.expert-card {
    text-align: center;
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    transition: var(--transition);
}

.expert-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--secondary);
}

.expert-card:hover {
    background: white;
    box-shadow: var(--shadow);
}

.rating { color: #f0ad4e; margin-bottom: 10px; }

/* Testimonials */
.testimonials {
    background: var(--primary);
    color: white;
    padding: 100px 0;
}

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

.test-card {
    background: rgba(255,255,255,0.05);
    padding: 40px;
    border-radius: 12px;
    position: relative;
}

.test-card i.quote {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    opacity: 0.1;
}

/* Blog Section */
.blog { padding: 100px 0; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.blog-img { height: 200px; overflow: hidden; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.blog-card:hover .blog-img img { transform: scale(1.1); }
.blog-content { padding: 25px; }

/* FAQ Section */
.faq { padding: 100px 0; background: #f9f9f9; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.faq-answer { display: none; padding-top: 15px; color: var(--text-muted); }

/* App Promo */
.app-promo {
    background: linear-gradient(to right, var(--primary), #003a7a);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.app-btns { display: flex; justify-content: center; gap: 20px; margin-top: 30px; }
.app-btn {
    background: white;
    color: var(--primary);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
}

/* --- Animations --- */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-onload {
    animation: fadeInUp 1s ease-out forwards;
}

/* Delay for children in grid */
.services-grid .service-card,
.experts-grid .expert-card,
.blog-grid .blog-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.reveal.active .service-card,
.reveal.active .expert-card,
.reveal.active .blog-card {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay using nth-child */
.reveal.active .service-card:nth-child(2),
.reveal.active .expert-card:nth-child(2),
.reveal.active .blog-card:nth-child(2) { transition-delay: 0.1s; }
.reveal.active .service-card:nth-child(3),
.reveal.active .expert-card:nth-child(3),
.reveal.active .blog-card:nth-child(3) { transition-delay: 0.2s; }
.reveal.active .service-card:nth-child(4),
.reveal.active .expert-card:nth-child(4) { transition-delay: 0.3s; }
.reveal.active .service-card:nth-child(5) { transition-delay: 0.4s; }
.reveal.active .service-card:nth-child(6) { transition-delay: 0.5s; }

/* Micro-interactions */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active {
    transform: scale(0.95);
}

.logo:hover {
    transform: scale(1.05);
}

.logo {
    transition: transform 0.3s ease;
}

/* --- Responsive Styles --- */

/* Tablets (max-width: 992px) */
@media (max-width: 992px) {
    .container { padding: 0 30px; }
    
    .hero h1 { font-size: 44px; }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .consult-box {
        flex-direction: column;
        padding: 40px;
        gap: 30px;
    }
    
    .consult-img { display: none; }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    .menu-toggle { display: block !important; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        gap: 15px;
        z-index: 999;
    }
    
    .nav-links.active { display: flex; }
    
    .nav-btns { display: none; }
    .nav-btns.active {
        display: flex;
        position: absolute;
        top: calc(100% + 180px); /* Adjust based on menu height */
        left: 0;
        width: 100%;
        background: white;
        padding: 0 20px 20px;
        box-shadow: 0 5px 5px rgba(0,0,0,0.05);
        justify-content: center;
        z-index: 998;
    }
    
    /* Better alternative: combine nav elements in mobile view */
    .nav { position: relative; }
    
    .hero { height: auto; padding: 100px 0; }
    .hero h1 { font-size: 36px; }
    .hero p { font-size: 16px; }
    
    .search-box {
        flex-direction: column;
        border-radius: 12px;
        gap: 10px;
    }
    
    .search-box input { border-radius: 8px; }
    .search-box .btn { border-radius: 8px; width: 100%; }
    
    .section-head h2 { font-size: 28px; }
    
    .badges-flex {
        display: flex;
        overflow-x: auto;
        padding-bottom: 20px;
        gap: 30px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    .badges-flex span { flex-shrink: 0; }
    
    .services-grid, .experts-grid, .blog-grid, .test-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    
    .app-btns { flex-direction: column; }
}

/* Small Phones (max-width: 480px) */
/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(1, 30, 65, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow);
    position: relative;
    animation: modalSlideDown 0.4s ease-out;
}

@keyframes modalSlideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 30px;
    background: var(--primary);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--secondary);
}

.close-modal {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--secondary);
}

.modal-body {
    padding: 30px;
}

@media (max-width: 480px) {
    .container { padding: 0 20px; }
    
    .hero h1 { font-size: 28px; }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .faq-question { font-size: 14px; }
}
