/* Base Variables */
:root {
    --primary: #0F172A; /* Deep Midnight Slate */
    --primary-light: #1E293B; /* Lighter Slate */
    --secondary: #2563EB; /* Modern Vibrant Blue */
    --secondary-hover: #1D4ED8; /* Darker Blue */
    --accent: #E2E8F0; /* Soft Silver Accent */
    --text-dark: #0F172A;
    --text-light: #FFFFFF;
    --text-muted: #64748B;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC; /* Very soft cool gray */
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 6px;
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* Page transition on main content only — NOT on body,
   because transform on body breaks position:fixed modals */
main {
    animation: fadeInPage 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

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

ul {
    list-style: none;
}

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

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.3;
}

.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.title-separator {
    height: 3px;
    width: 60px;
    background-color: var(--secondary);
    margin-bottom: 20px;
}

.title-separator.center {
    margin: 0 auto 20px auto;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.btn-outline-light:hover {
    background-color: var(--text-light);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

header.scrolled {
    padding: 5px 0;
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition);
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-primary {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
}

.logo-secondary {
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

.nav-links a {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--primary);
    z-index: 1001;
    padding: 80px 30px;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mobile-nav-links a {
    color: var(--text-light);
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background-image: url('hero.png');
    background-size: cover;
    background-position: center 30%;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding-top: 80px;
}

.page-header {
    background-color: var(--primary);
    padding: 150px 0 60px 0;
    text-align: center;
    color: var(--bg-white);
}

.page-header h1 {
    color: var(--bg-white);
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero-title {
    color: var(--bg-white);
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease forwards;
}

.hero-subtitle {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 600px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

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

/* Scroll Reveal Animations */
.sr-hidden {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.sr-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.about-text p strong {
    color: var(--primary);
}

.about-image {
    position: relative;
}

.image-placeholder {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* Hide fallback icon when image is present */
.image-placeholder i {
    display: none;
}

/* Practice Areas */
.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.practice-card {
    background-color: var(--bg-white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.practice-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--secondary);
}

.practice-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 25px;
    transition: var(--transition);
}

.practice-card:hover .practice-icon {
    transform: scale(1.1);
}

.practice-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.practice-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.read-more i {
    transition: var(--transition);
}

.practice-card:hover .read-more i {
    transform: translateX(5px);
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.team-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
}

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

.team-image {
    height: 350px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--secondary);
}

.team-info {
    padding: 30px 20px;
}

.team-info h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.team-title {
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 15px;
}

.team-email {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.team-email:hover {
    color: var(--primary);
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-white);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: var(--bg-white);
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--bg-light);
}

.faq-question h3 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

.faq-question i {
    color: var(--secondary);
    transition: transform 0.3s ease;
}

.faq-item.faq-open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s ease, padding 0.45s ease;
}

.faq-item.faq-open .faq-answer {
    padding: 0 25px 20px 25px;
}

.faq-answer p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.contact-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(59, 130, 246, 0.1); /* Matches modern blue */
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.contact-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.contact-card p, .contact-card a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-card a:hover {
    color: var(--primary);
}

.contact-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-height: 400px;
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: var(--text-light);
    padding: 80px 0 0 0;
}

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

.footer-logo {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

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

.footer-about p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.footer h3 {
    color: var(--bg-white);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-contact ul li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    align-items: flex-start;
}

.footer-contact i {
    color: var(--secondary);
    margin-top: 5px;
}

.footer-bottom {
    background-color: var(--primary-light);
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

/* Floating WhatsApp */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

/* Modal for Practice Areas Details */
.modal-overlay {
    position: fixed;
    inset: 0;                        /* top:0 right:0 bottom:0 left:0 */
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    overflow-y: auto;                /* fallback for very tall content */
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-white);
    width: 100%;
    max-width: 820px;
    max-height: 80vh;
    border-radius: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
    margin: auto;                    /* ensures centering inside flex when content is short */
    transform: translateY(25px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s ease;
    opacity: 0;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    padding: 30px 40px 20px 40px;
    border-bottom: 1px solid var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: var(--bg-white);
    z-index: 10;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-title i {
    color: var(--secondary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px 40px;
}

.modal-body p {
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    .about-container {
        grid-template-columns: 1fr;
    }
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions .btn {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .contact-grid, .footer-container {
        grid-template-columns: 1fr;
    }
    .footer-container {
        gap: 40px;
    }
    .modal-header, .modal-body {
        padding: 20px;
    }
}
