/* Lex ARAM LLP - Indian Law Firm Theme */
/* Color Palette from Logo: Gold, Maroon, Black */

:root {
    /* Khaitan & Co Inspired Color Theme */
    --primary-navy: #1a2332;
    --primary-dark: #0d1521;
    --primary-blue: #2c5aa0;
    --accent-blue: #3d7bd6;
    --accent-light: #e8f1f8;
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --light-gray: #f5f7fa;
    --medium-gray: #6c757d;
    --dark-gray: #2d3748;
    --text-dark: #1a202c;
    
    /* Accent Colors */
    --accent-gold: #d4af37;
    --accent-teal: #2d9cdb;
    
    /* Typography */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Open Sans', sans-serif;
    --font-accent: 'Crimson Text', serif;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--primary-black);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-navy);
}

h3 {
    font-size: 2rem;
    color: var(--primary-black);
}

p {
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

/* Header Styles */
.header {
    background: var(--primary-navy);
    color: var(--white);
    padding: 1rem 0;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.logo {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 1rem;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes logo white for dark header */
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
    padding: 5px;
    border-radius: 8px;
}

.logo a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.logo a:hover .logo-img {
    -webkit-transform: scale(1.05);
    -ms-transform: scale(1.05);
    transform: scale(1.05);
    -webkit-filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(212, 175, 55, 0.6));
    filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(212, 175, 55, 0.6));
}

.logo a:hover {
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
}

.logo-text {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.logo-text .lex {
    font-style: italic;
    color: var(--accent-blue);
}

.logo-text .aram {
    font-weight: 900;
    color: var(--white);
}

.logo-text .llp {
    font-size: 0.8rem;
    color: var(--accent-blue);
    margin-left: 0.5rem;
}

/* Navigation */
.nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5rem;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--accent-blue);
    color: var(--white);
}

.mobile-menu-toggle i {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .header {
        position: relative !important;
    }
    
    .header nav {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
    }
    
    .nav {
        display: none !important;
        background: var(--primary-navy) !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        width: 100% !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    }
    
    .nav.active {
        display: flex !important;
    }
    
    .nav li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .nav a {
        display: block !important;
        width: 100% !important;
        padding: 1rem 2rem !important;
        color: #FFFFFF !important;
        text-decoration: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.2) !important;
    }
    
    .nav a:last-child {
        border-bottom: none !important;
    }
    
    .nav a:hover {
        background: rgba(61, 123, 214, 0.2) !important;
    }
    
    .nav li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        display: block !important;
    }
    
    .nav a {
        display: block !important;
        width: 100% !important;
        padding: 1rem 2rem !important;
        color: #FFFFFF !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        border-bottom: 1px solid rgba(255,255,255,0.15) !important;
    }
    
    .nav a:last-child {
        border-bottom: none !important;
    }
    
    .nav a:hover,
    .nav a:focus {
        background-color: rgba(61, 123, 214, 0.2) !important;
        color: #3d7bd6 !important;
    }
}

/* Hero Section - Khaitan & Co Style */
.hero {
    background: var(--primary-navy);
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 8rem 2rem;
    min-height: 70vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    position: relative;
}

.hero-content h1 {
    color: var(--white);
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content .subtitle {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-bottom: 2rem;
    font-family: var(--font-accent);
}

.hero-content .description {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    color: var(--light-gray);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.btn-primary:hover {
    -webkit-transform: translateY(-3px);
    -ms-transform: translateY(-3px);
    transform: translateY(-3px);
    -webkit-box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-navy);
    border: 2px solid var(--accent-blue);
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-blue);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid var(--accent-blue);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--white);
}

/* Footer */
.footer {
    background: var(--primary-black);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--medium-gray);
    color: var(--medium-gray);
}

/* Responsive Design */
/* Mobile First Approach */
@media (max-width: 480px) {
    .header-content {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .logo-img {
        width: 55px;
        height: 55px;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .nav {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        width: 100%;
    }
    
    .nav a {
        display: block;
        width: 100%;
    }
    
    .hero {
        padding: 3rem 1rem;
        min-height: 60vh;
        background-attachment: scroll;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-content .subtitle {
        font-size: 1rem;
    }
    
    .hero-content .description {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .consultation-form {
        padding: 2rem 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .qr-display {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    #qrcode canvas,
    #qrcode img {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header-content {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 1rem;
        padding: 0 1.5rem;
    }
    
    .logo-img {
        width: 60px;
        height: 60px;
    }
    
    .nav {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        gap: 0.5rem;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-content .description {
        font-size: 1.1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .consultation-form {
        padding: 2rem 1.5rem;
    }
    
    /* Make form fields stack on mobile */
    .consultation-form form > div[style*="grid-template-columns"] {
        display: block !important;
    }
    
    .consultation-form form > div[style*="grid-template-columns"] > div {
        margin-bottom: 1rem;
    }
}

@media (max-width: 1024px) {
    .header-content {
        padding: 0 1.5rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .btn,
    .nav,
    .qr-display {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* Indian Legal Theme Elements */
.legal-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, var(--accent-blue) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, var(--primary-navy) 2px, transparent 2px);
    background-size: 50px 50px;
    opacity: 0.1;
}

/* Consultation Form Styles */
.consultation-form {
    background: linear-gradient(135deg, var(--light-gray) 0%, #f0f0f0 100%), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300"><rect fill="%23f8f9fa" width="400" height="300"/><g fill="%23d4af37" opacity="0.05"><path d="M50 50h30v30H50z"/><path d="M100 50h30v30H100z"/><path d="M150 50h30v30H150z"/><path d="M200 50h30v30H200z"/><path d="M250 50h30v30H250z"/><path d="M300 50h30v30H300z"/><path d="M350 50h30v30H350z"/><path d="M50 100h30v30H50z"/><path d="M100 100h30v30H100z"/><path d="M150 100h30v30H150z"/><path d="M200 100h30v30H200z"/><path d="M250 100h30v30H250z"/><path d="M300 100h30v30H300z"/><path d="M350 100h30v30H350z"/><path d="M50 150h30v30H50z"/><path d="M100 150h30v30H100z"/><path d="M150 150h30v30H150z"/><path d="M200 150h30v30H200z"/><path d="M250 150h30v30H250z"/><path d="M300 150h30v30H300z"/><path d="M350 150h30v30H350z"/><path d="M50 200h30v30H50z"/><path d="M100 200h30v30H100z"/><path d="M150 200h30v30H150z"/><path d="M200 200h30v30H200z"/><path d="M250 200h30v30H250z"/><path d="M300 200h30v30H300z"/><path d="M350 200h30v30H350z"/></g></svg>');
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group input:valid:not(:placeholder-shown),
.form-group select:valid,
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Team Photos */
.team-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-blue);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.service-card:hover .team-photo {
    transform: scale(1.05);
}

/* QR Code Display */
.qr-display {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 2rem auto;
    max-width: 400px;
    animation: slideDown 0.5s ease;
}

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

.qr-display h3 {
    color: var(--primary-navy);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.qr-display p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

#qrcode {
    display: inline-block;
    padding: 1rem;
    background: var(--white);
    border-radius: 10px;
    margin: 1rem 0;
}

#qrcode canvas,
#qrcode img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.qr-code {
    max-width: 250px;
    margin: 1rem auto;
    border: 3px solid var(--accent-blue);
    border-radius: 10px;
    padding: 10px;
    background: var(--white);
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    transition: all 0.3s ease;
}

.gallery-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(128, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2rem;
    color: var(--white);
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-info h4 {
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.gallery-info p {
    color: var(--medium-gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Gallery Filter */
.gallery-filter {
    background: transparent;
    border: 2px solid var(--accent-blue);
    color: var(--primary-navy);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.gallery-filter:hover,
.gallery-filter.active {
    background: var(--accent-blue);
    color: var(--white);
}

/* Active Navigation */
.nav a.active {
    background-color: var(--accent-blue);
    color: var(--white);
}
