/*
Theme Name: Hafiz-Brothers
Theme URI: https://hafizbrothers.com
Author: Antigravity
Author URI: https://google.deepmind.com
Description: A custom premium theme for Hafiz Brothers Legal Firm.
Version: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hafiz-brothers
*/

:root {
    /* Premium Palette - Improved Balance */
    --primary-blue: #0f1c30;
    /* Slightly cooler dark blue */
    --primary-dark: #070f1a;
    /* Richer black-blue */
    --primary-light: #1c2b45;
    /* Lighter navy for UI elements */

    --accent-gold: #d4af37;
    /* Metallic Gold (less yellow/neon) */
    --gold-muted: #8a7322;
    /* Muted for subtle borders */
    --gold-highlight: #f9e286;
    /* Soft highlight */

    --text-main: #eff6ff;
    /* White with tiny blue tint */
    --text-muted: #94a3b8;
    /* Cool grey */
    --text-dark: #0f172a;

    /* Glassmorphism Refined */
    --glass-bg: rgba(20, 35, 60, 0.6);
    --glass-border: rgba(212, 175, 55, 0.15);
    /* Subtle gold border */
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    --backdrop-blur: blur(16px);

    /* Fonts & Typography */
    --font-heading: 'Noto Nastaliq Urdu', serif;
    --font-body: 'Noto Nastaliq Urdu', sans-serif;
    --font-eng: 'Outfit', sans-serif;

    --line-height-urdu: 2.2;
    /* Better readability */

    /* Universal Transition */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-dark);
    color: var(--text-main);
    line-height: var(--line-height-urdu);
    overflow-x: hidden;
    direction: rtl;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 20%);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-muted);
    border-radius: 5px;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 1rem 0;
}

.header.scrolled {
    background: rgba(7, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    width: 120px;
    transition: var(--transition);
}

.logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    filter: brightness(1.1);
    /* Slight adjustment */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0;
    background-color: var(--accent-gold);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links .nav-btn {
    border: 1px solid var(--accent-gold);
    padding: 5px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links .nav-btn::after {
    display: none;
}

.nav-links .nav-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 700px;
    background: url('assets/hero-bg.png') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(2, 12, 27, 0.95) 0%,
            rgba(10, 25, 47, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 4.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    /* Elegant text shadow */
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-tagline {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-divider {
    width: 80px;
    height: 3px;
    background: var(--accent-gold);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

.hero-subtext {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
    display: inline-block;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b89628 100%);
    color: #000;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
}

.cta-button.secondary {
    background: transparent;
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.cta-button:hover {
    transform: translateY(-3px);
}

.cta-button.primary:hover {
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.cta-button.secondary:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Sections Common */
.section-padding {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
    line-height: 1.2;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-gold);
    margin: 1rem auto 0;
}

/* Cards Grid (Services) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.card {
    background: var(--glass-bg);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(30, 45, 75, 0.7);
    border-color: var(--accent-gold);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.card-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.card:hover .card-icon-wrapper {
    background: var(--accent-gold);
    color: #000;
}

.card-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-gold);
    transition: var(--transition);
}

.card:hover .card-icon {
    color: #000;
}

.card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(17, 34, 64, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: right;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: var(--transition);
}

.feature-card:hover {
    background: rgba(17, 34, 64, 0.8);
    border-color: var(--accent-gold);
}

.feature-card .icon-box {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    background: var(--primary-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
}

.contact-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent);
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-card h3 {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 2.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.icon-circle {
    width: 50px;
    height: 50px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.info-item p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-family: var(--font-eng);
}

/* Use body font for Urdu content in contact details */
.info-item p:not([dir='ltr']) {
    font-family: var(--font-body);
}

/* Contact Form */
.contact-form {
    padding: 4rem 3rem;
    background: #132035;
}

.contact-form h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(2, 12, 27, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(2, 12, 27, 0.8);
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: var(--accent-gold);
    color: #000;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    width: auto;
}

.submit-btn:hover {
    background: #b89628;
    transform: translateY(-2px);
}

/* Footer & Disclaimer */
.footer {
    background: #050b14;
    padding: 3rem 5% 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.disclaimer-box {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: rgba(212, 175, 55, 0.08);
    /* Low opacity gold */
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    margin-bottom: 3rem;
}

.disclaimer-icon {
    color: var(--accent-gold);
    flex-shrink: 0;
}

.disclaimer-text h4 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.disclaimer-text p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.footer p {
    font-size: 0.9rem;
    color: #555;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .section-padding {
        padding: 5rem 5%;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-tagline {
        font-size: 1.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-card,
    .contact-form {
        padding: 2.5rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        background: var(--primary-dark);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.4s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
        z-index: 1001;
        width: 30px;
        height: 25px;
        position: relative;
        /* Above nav menu */
    }

    .bar {
        background-color: var(--accent-gold);
        width: 30px;
        height: 3px;
        margin: 6px 0;
        transition: 0.3s;
    }

    /* Hamburger Animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-7px, 6px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-7px, -6px);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }

    .feature-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .disclaimer-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}