/* CSS Variables & Reset */
:root {
    --primary-color: #0d1b2a;
    /* Deeper Navy */
    --secondary-color: #c8a14b;
    /* Richer Gold matching the image */
    --text-color: #0d1b2a;
    /* Lighter text for dark backgrounds if needed, but keeping main text readable */
    --text-color-dark: #333333;
    --light-text: #a0a8b8;
    --bg-color: #ffffff;
    --light-bg: #f4f6f8;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px -10px rgba(13, 27, 42, 0.2);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.section {
    padding: 80px 0;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    margin-left: 15px;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Article Images Style (Uploaded via Admin & General) */
.article-responsive-img,
#articleBody img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    display: block;
    object-fit: cover;
    max-height: 600px;
    /* Prevent overly tall images */
}

/* Header */
.header {
    background-color: var(--primary-color);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
}

.logo span {
    color: var(--white);
    font-size: 0.8rem;
    letter-spacing: 4px;
    margin-top: 5px;
    display: block;
    font-weight: 400;
    padding-top: 5px;
    position: relative;
}

.logo span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

@keyframes lineExpand {
    0% {
        width: 0;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        width: 100%;
        opacity: 1;
    }
}

.logo:hover span::before {
    animation: lineExpand 0.4s ease-out forwards;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--white);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-color: #0d1b2a;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/hero.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    margin-top: 0;
    /* Override margin if needed */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--white);
}

.hero-title span {
    color: var(--secondary-color);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-hero-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow);
    display: block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.practice-areas .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.lead-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-align: justify;
}

.about-text p {
    text-align: justify;
}

.about-list {
    margin-top: 20px;
}

.about-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-align: justify;
}

.about-list i {
    color: var(--secondary-color);
    margin-top: 5px;
}

/* Practice Areas */
.practice-areas {
    background-color: var(--light-bg);
}

.section-subtitle {
    margin-top: 15px;
    color: var(--light-text);
    margin-bottom: 50px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 3px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    border-top-color: var(--secondary-color);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.card p {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 8px;
    /* text moves slightly on hover */
}

/* Contact Section */
.contact {
    background-color: var(--light-bg);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-card {
    background-color: var(--white);
    padding: 40px;
    box-shadow: var(--shadow);
    border-radius: 4px;
    height: 100%;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 5px;
}



.map-container {
    margin-top: 30px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid #ddd;
}

.map-container iframe {
    display: block;
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: inherit;
    transition: var(--transition);
    background-color: #f9f9f9;
    font-size: 0.95rem;
    resize: vertical;
    /* Allow vertical resize only */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(200, 161, 75, 0.1);
}

.form-group textarea {
    min-height: 120px;
    /* Enforce a reasonable minimum height */
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 40px 0;
    border-top: 3px solid var(--secondary-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-footer {
    font-family: var(--font-heading);
    color: var(--white);
    font-size: 1.8rem;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 2px;
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    text-transform: uppercase;
    text-align: center;
}

.logo-footer span {
    color: var(--white);
    font-size: 0.8rem;
    letter-spacing: 4px;
    margin-top: 5px;
    display: block;
    font-weight: 400;
    padding-top: 5px;
    position: relative;
}

.logo-footer span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.logo-footer:hover span::before {
    animation: lineExpand 0.4s ease-out forwards;
}

.footer-links a {
    color: var(--light-text);
    margin-left: 20px;
    font-size: 1.2rem;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        /* Adjust based on header height */
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }

    .nav-links a {
        color: var(--primary-color);
    }

    .nav-links.active {
        right: 0;
    }

    .sm-hidden {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Article Images Style (Uploaded via Admin & General) */
.article-responsive-img,
#articleBody img {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    display: inline-block;
    object-fit: contain;
    max-height: 800px;
}

/* Ensure text wraps around floated images */
#articleBody p {
    clear: none;
}

/* Desktop: Default Float Left (User Request) */
@media (min-width: 768px) {

    .article-responsive-img,
    #articleBody img {
        float: left !important;
        margin: 10px 30px 20px 0;
        max-width: 50%;
        display: block;
    }
}

/* Quill Alignment Support for Images */
/* Override default float behavior if specific alignment is chosen */

.ql-align-center img {
    float: none !important;
    display: block;
    margin: 20px auto;
}

.ql-align-right img {
    float: right !important;
    margin: 5px 0 15px 25px;
    display: block;
}

.ql-align-justify img {
    float: none !important;
    display: block;
    margin: 20px auto;
}

/* Quill Editor Alignment Classes */
.ql-align-center {
    text-align: center;
}

.ql-align-right {
    text-align: right;
}

.ql-align-justify {
    text-align: justify;
}

/* Comment Section Styles */
.comments-section {
    margin-top: 50px;
    background-color: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.comment-list {
    margin-bottom: 30px;
}

.comment-item {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.comment-author {
    font-weight: bold;
    color: var(--primary-color);
}

.comment-text {
    color: var(--text-color);
    line-height: 1.5;
}

.comment-form-container {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.comment-form-container h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.comment-form .form-group {
    margin-bottom: 15px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.comment-form button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form button:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Admin Comment Style */
.admin-comment {
    border-left: 4px solid var(--secondary-color);
    background-color: #fff9e6;
}

.admin-badge {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    vertical-align: middle;
}