/* ============================================
   Junaid Law Associates - Pakistan Law Firm
   Inspired by RIAA Barker Gillette
   ============================================ */

:root {
    /* Primary colors - Deep blue & gold, professional */
    --color-primary: #0a1628;
    --color-primary-light: #1a2d4a;
    --color-accent: #b8860b;
    --color-accent-light: #d4a84b;
    --color-accent-dark: #8b6914;
    
    /* 中性色 */
    --color-text: #2c3e50;
    --color-text-light: #5a6c7d;
    --color-text-muted: #8b9cad;
    --color-bg: #f8f9fa;
    --color-bg-alt: #ffffff;
    --color-border: #e2e8f0;
    
    /* 排版 */
    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* 间距与尺寸 */
    --container-max: 1200px;
    --header-height: 70px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.06);
    --shadow-md: 0 4px 20px rgba(10, 22, 40, 0.08);
    --shadow-lg: 0 8px 40px rgba(10, 22, 40, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

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

a:hover {
    color: var(--color-accent);
}

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

/* ========== Cookie Banner ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform var(--transition);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner.hidden {
    display: none;
}

.cookie-banner p {
    font-size: 14px;
    flex: 1;
}

.cookie-banner a {
    color: var(--color-accent-light);
    text-decoration: underline;
}

.btn-accept {
    background: var(--color-accent);
    color: var(--color-primary);
    border: none;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-accept:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
}

/* ========== Header ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-bg-alt);
    box-shadow: var(--shadow-sm);
}

.header-top {
    background: var(--color-primary);
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

.header-top .container {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.phone-link {
    color: rgba(255,255,255,0.9);
    transition: color var(--transition);
}

.phone-link:hover {
    color: var(--color-accent-light);
}

.main-nav {
    padding: 0;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.02em;
}

.logo:hover {
    color: var(--color-accent-dark);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    display: block;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 14px;
    color: var(--color-text);
}

.nav-links > li > a:hover {
    color: var(--color-accent);
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--color-bg-alt);
    box-shadow: var(--shadow-lg);
    list-style: none;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--color-text);
}

.dropdown li a:hover {
    background: var(--color-bg);
    color: var(--color-accent);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
}

/* ========== Hero ========== */
.hero {
    position: relative;
    height: 85vh;
    min-height: 500px;
    max-height: 800px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, #0d2137 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23b8860b' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.85) 0%, rgba(26, 45, 74, 0.75) 100%);
}

.hero-slide .hero-content {
    position: relative;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: #fff;
    padding: 40px;
    max-width: 800px;
}

.hero-tag {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent-light);
    margin-bottom: 16px;
}

.hero-content h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-sub {
    font-size: 14px;
    opacity: 0.9;
}

.hero-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 2;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all var(--transition);
}

.indicator.active {
    background: var(--color-accent);
    transform: scale(1.2);
}

/* ========== Main Content ========== */
.main-content {
    padding-bottom: 80px;
}

.intro-section {
    padding: 80px 0 60px;
    background: var(--color-bg-alt);
}

.intro-with-image {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: start;
}

.intro-image {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 32px;
}

.intro-text {
    max-width: 100%;
}

.intro-text .lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 24px;
}

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

/* Practices Section */
.practices-section {
    padding: 60px 0;
    background: var(--color-bg);
}

.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-accent);
}

.practice-list {
    list-style: none;
}

.practice-list li {
    margin-bottom: 12px;
}

.practice-list a {
    display: block;
    padding: 8px 0;
    color: var(--color-text);
    transition: all var(--transition);
}

.practice-list a:hover {
    color: var(--color-accent);
    padding-left: 8px;
}

/* News Section */
.news-section {
    padding: 60px 0;
    background: var(--color-bg-alt);
}

.news-section .section-title {
    margin-bottom: 40px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.news-card {
    background: var(--color-bg);
    border-radius: 4px;
    transition: all var(--transition);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-content {
    padding: 28px;
}

.news-date {
    font-size: 12px;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 12px;
}

.news-card-content h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-card-content p {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.read-more:hover {
    color: var(--color-accent-dark);
}

/* Testimonials */
.testimonials-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
}

.testimonials-section .section-title {
    color: #fff;
    border-color: var(--color-accent);
    text-align: center;
    margin-bottom: 48px;
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto 32px;
}

.testimonial {
    display: none;
    text-align: center;
}

.testimonial.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.testimonial-source {
    font-size: 14px;
    color: var(--color-accent-light);
    margin-bottom: 16px;
}

.testimonial blockquote {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.7;
}

.testimonial blockquote::before,
.testimonial blockquote::after {
    content: '"';
}

.testimonial-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.testimonial-prev,
.testimonial-next {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.testimonial-counter {
    font-size: 14px;
    opacity: 0.8;
}

.read-more-link {
    display: block;
    text-align: center;
    color: var(--color-accent-light);
    font-weight: 500;
}

.read-more-link:hover {
    color: #fff;
}

/* Recognition */
.recognition-section {
    padding: 60px 0;
    background: var(--color-bg);
}

.recognition-section .section-title {
    text-align: center;
    margin-bottom: 40px;
}

.recognition-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.recognition-item {
    padding: 20px 40px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 18px;
}

/* Search */
.search-section {
    padding: 40px 0;
}

.search-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--color-text);
}

.search-input-wrap {
    display: flex;
    max-width: 500px;
}

.search-input-wrap input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--color-border);
    font-size: 16px;
    border-right: none;
}

.search-input-wrap input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.search-input-wrap button {
    padding: 14px 28px;
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition);
}

.search-input-wrap button:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* ========== Footer ========== */
.footer {
    background: var(--color-primary);
    color: #fff;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h3 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-accent-light);
}

.footer-col ul {
    list-style: none;
}

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

.footer-col a {
    color: rgba(255,255,255,0.85);
}

.footer-col a:hover {
    color: var(--color-accent-light);
}

.footer-bottom {
    padding: 32px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.copyright {
    font-size: 14px;
    opacity: 0.8;
}

.footer-phone {
    text-align: right;
    font-size: 14px;
}

.footer-phone strong {
    display: block;
    margin-bottom: 8px;
    color: var(--color-accent-light);
}

.footer-phone span {
    display: block;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .two-column-grid {
        grid-template-columns: 1fr;
    }
    
    .intro-with-image {
        grid-template-columns: 1fr;
    }
    
    .intro-image {
        order: -1;
        max-height: 300px;
    }
    
    .about-with-image {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
        max-height: 300px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-bg-alt);
        flex-direction: column;
        padding: 80px 24px 24px;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        transition: right var(--transition);
        z-index: 999;
    }
    
    .nav-links.open {
        right: 0;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 16px;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition);
    }
    
    .has-dropdown.open .dropdown {
        max-height: 500px;
    }
    
    .hero {
        height: 70vh;
        min-height: 400px;
    }
    
    .hero-content h2 {
        font-size: 1.75rem;
    }
    
    .intro-section {
        padding: 48px 0 40px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-phone {
        text-align: center;
    }
    
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-top .container {
        flex-direction: column;
        gap: 4px;
    }
    
    .search-input-wrap {
        flex-direction: column;
    }
    
    .search-input-wrap input {
        border-right: 1px solid var(--color-border);
    }
}

/* ========== Subpage common styles ========== */
.page-hero {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.88) 0%, rgba(26, 45, 74, 0.82) 100%);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 16px;
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Expertise 专业领域页 */
.expertise-detail {
    padding: 60px 0;
}

.expertise-intro {
    max-width: 800px;
    margin-bottom: 48px;
}

.expertise-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.expertise-detail .section-title {
    margin-top: 48px;
    margin-bottom: 32px;
}

.expertise-detail .section-title:first-of-type {
    margin-top: 0;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.expertise-card {
    background: var(--color-bg-alt);
    padding: 28px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.expertise-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.expertise-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.expertise-card p {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.expertise-grid.industries .expertise-card p {
    display: none;
}

/* Team 团队页 */
.team-section {
    padding: 60px 0;
}

.team-intro {
    max-width: 800px;
    margin: 0 auto 48px;
    text-align: center;
}

.team-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.team-card {
    background: var(--color-bg-alt);
    padding: 32px;
    text-align: center;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.team-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.team-avatar,
.team-image {
    width: 100%;
    aspect-ratio: 1;
    margin: 0 auto 20px;
    overflow: hidden;
    border-radius: 4px;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-avatar {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-accent-light);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.team-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.team-role {
    font-size: 14px;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 12px;
}

.team-bio {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* About page */
.about-section {
    padding: 60px 0;
}

.about-with-image {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: start;
}

.about-image {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    max-width: 100%;
}

.about-content .lead {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.about-content p {
    margin-bottom: 20px;
    color: var(--color-text-light);
    line-height: 1.8;
}

/* Contact 联系页 */
.contact-section {
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.contact-card {
    background: var(--color-bg-alt);
    text-align: center;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    overflow: hidden;
}

.contact-card-image {
    height: 180px;
    overflow: hidden;
}

.contact-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-card h3,
.contact-card p {
    padding: 0 24px;
}

.contact-card h3 {
    padding-top: 24px;
}

.contact-card p {
    padding-bottom: 8px;
}

.contact-card p:last-child {
    padding-bottom: 24px;
}

.contact-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.contact-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.contact-card p {
    font-size: 15px;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.contact-card p:last-child {
    margin-bottom: 0;
}
