/* 
   MJ Abogada - Luxury Law Style 
   Palette: Navy (#0A1218), Cream (#E7DFD4), Gold (#B98E44), White (#FFFFFF)
   Fonts: Playfair Display (Headings), DM Sans (Body)
*/

:root {
    --color-bg-dark: #0A1218;
    --color-bg-light: #F5F2EB;
    /* Slightly warmer than #E7DFD4 for backgrounds */
    --color-bg-cream: #E7DFD4;
    --color-accent-gold: #B98E44;
    --color-accent-gold-light: #CCBD99;
    --color-text-dark: #152833;
    --color-text-light: #FFFFFF;
    --color-text-muted: #6B7280;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'DM Sans', sans-serif;

    --container-width: 1200px;
    --border-radius: 4px;
    /* Slight radius, keeping it professional */
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.gold-text {
    color: var(--color-accent-gold);
}

.italic-accent {
    font-style: italic;
    font-weight: 400;
    font-family: var(--font-heading);
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-tag {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent-gold);
    margin-bottom: 15px;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 30px;
}

.text-center {
    text-align: center;
}

.text-light {
    color: var(--color-text-light);
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--color-accent-gold);
    margin: 20px 0 30px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent-gold);
    color: white;
}

.btn-primary:hover {
    background-color: #a37c38;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(185, 142, 68, 0.2);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-text-dark);
    color: var(--color-text-dark);
    margin-left: 20px;
}

.btn-outline:hover {
    background-color: var(--color-text-dark);
    color: white;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    width: 100%;
    /* Remove fixed height to allow content to define it */
    min-height: 40px;
    padding: 8px 0;
    background-color: var(--color-bg-light);
    z-index: 1001;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
    font-weight: 500;
}

.top-bar-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    gap: 40px;
    /* More gap for separation */
}

.top-bar-item {
    display: flex;
    align-items: flex-start;
    /* Align icon to top */
    gap: 10px;
    color: var(--color-text-dark);
    line-height: 1.3;
}

.top-bar-text {
    display: flex;
    flex-direction: column;
}

.top-bar-icon {
    color: var(--color-accent-gold);
    font-size: 1.1rem;
    margin-top: 2px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 60px;
    /* Approximate height of 2-line top bar */
    width: 100%;
    background-color: rgba(245, 242, 235, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    height: 80px;

    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text-dark);
}

.logo-monogram {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-accent-gold);
    line-height: 1;
    border: 1px solid var(--color-accent-gold);
    padding: 2px 8px;
    border-radius: 2px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.logo-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent-gold);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--color-text-dark);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 140px;
    /* Offset for navbar (80px) + top bar (~60px) */
    background-color: var(--color-bg-dark);
    /* Fallback */
}

.hero-bg-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    overflow: hidden;
}

.hero-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* transition: transform 0.5s ease-out; managed by GSAP */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(10, 18, 24, 1) 15%,
            rgba(10, 18, 24, 0.6) 50%,
            rgba(10, 18, 24, 0) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    height: 100%;
    align-items: center;
}

.hero-text {
    max-width: 600px;
    color: var(--color-text-light);
}

.pre-heading {
    display: block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: white;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 480px;
}

/* Hero Cards */
.hero-cards-wrapper {
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    z-index: 3;
    padding-bottom: 40px;
}

.hero-cards-container {
    display: flex;
    gap: 30px;
}

.hero-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    flex: 1;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--color-accent-gold);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-10px);
}

.card-icon {
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(185, 142, 68, 0.1);
    border-radius: 50%;
}

.card-icon svg {
    stroke: var(--color-accent-gold);
}

.hero-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.hero-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}


/* About Section */
.about-section {
    padding-top: 150px;
    /* Space for flying cards */
}

.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-img {
    width: 100%;
    border-radius: var(--border-radius);
    display: block;
    box-shadow: 20px 20px 0 var(--color-bg-cream);
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background-color: var(--color-bg-dark);
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.exp-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent-gold);
}

.exp-text {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-desc {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--color-text-muted);
}

.benefits-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.check-icon {
    margin-top: 2px;
}

/* Services */
.dark-bg {
    background-color: var(--color-bg-dark);
    color: white;
}

.dark-bg .section-title {
    color: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.service-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.service-card:hover {
    background-color: rgba(255, 255, 255, 0.08);
    /* Slightly lighter on hover */
    transform: translateY(-5px);
    border-color: var(--color-accent-gold);
}

.service-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.service-card h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 15px;
    min-height: 60px;
    /* Align heights */
}

.service-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.link-arrow {
    color: var(--color-accent-gold);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Timeline */
.process-section {
    background-color: var(--color-bg-light);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 80px auto 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: #d1d5db;
}

.timeline-item {
    margin-bottom: 60px;
    position: relative;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background-color: var(--color-accent-gold);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 6px white;
}

.timeline-content {
    width: 45%;
    padding: 0 20px;
    position: relative;
    top: -5px;
}

.timeline-content.left {
    text-align: right;
    margin-right: auto;
}

.timeline-content.right {
    margin-left: auto;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--color-text-muted);
}


/* CTA Section */
.cta-section {
    position: relative;
    padding: 120px 0;
    background-color: var(--color-bg-dark);
    /* Fallback */
    overflow: hidden;
}

.image-parallax {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* Taller for parallax */
    background-size: cover;
    background-position: center;
    opacity: 0.4;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 18, 24, 0.8), rgba(10, 18, 24, 0.95));
}

.cta-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.cta-box {
    background-color: white;
    padding: 60px;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.cta-box .section-title {
    font-size: 2.5rem;
}

.contact-form {
    margin-top: 30px;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent-gold);
    background: white;
}

.full-width {
    width: 100%;
}

.form-disclaimer {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 15px;
    text-align: center;
}

.contact-info {
    margin-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    /* Match other borders */
    padding-top: 25px;
    display: flex;
    justify-content: center;
    gap: 40px;
    font-size: 0.95rem;
    flex-wrap: wrap;
    /* Ensure responsiveness */
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    color: var(--color-text-dark);
}

.contact-info-icon {
    color: var(--color-accent-gold);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Prevent icon shrinking */
}

.contact-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}


/* Footer */
.footer {
    background-color: var(--color-bg-dark);
    color: white;
    padding: 80px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 25px;
    filter: brightness(0) invert(1);
    /* Make logo white */
}

.footer-col h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-col ul li a:hover {
    color: var(--color-accent-gold);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}


/* Responsive */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .grid-2-cols {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-bg-wrapper {
        width: 100%;
        opacity: 0.3;
        /* Dim image on mobile to make text readable */
    }

    .hero-cards-container {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    /* Adjust for Top Bar on mobile if needed, or hide it */
    .top-bar {
        justify-content: center;
        padding: 0 10px;
    }

    .top-bar-container {
        justify-content: center;
        gap: 15px;
    }

    .top-bar-item:last-child {
        display: none;
        /* Hide office on small screens to save space */
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        /* Below navbar */
        left: 0;
        width: 100%;
        background-color: #F5F2EB;
        flex-direction: column;
        padding: 40px 0;
        gap: 30px;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Simple mobile menu fallback */
    .menu-toggle {
        display: flex;
    }

    .hero-section {
        display: block;
        /* Stack vertically */
        padding-top: 100px;
        height: auto;
        /* Allow growth */
        padding-bottom: 0;
    }

    .hero-content {
        display: block;
        height: auto;
        padding-bottom: 40px;
    }

    .hero-text {
        text-align: center;
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-cards-wrapper {
        position: relative;
        padding: 20px;
        background: var(--color-bg-light);
        margin-top: 0;
    }

    .hero-cards-container {
        flex-direction: column;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        /* Fix reviews squeezing */
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        text-align: left !important;
    }

    .cta-box {
        padding: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Reviews Section */
.reviews-section {
    background-color: white;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.review-card {
    background-color: var(--color-bg-light);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
}

.stars {
    color: var(--color-accent-gold);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.review-text {
    font-size: 1.05rem;
    font-style: italic;
    margin-bottom: 25px;
    color: var(--color-text-dark);
    flex-grow: 1;
}

.review-author {
    display: flex;
    flex-direction: column;
}

.review-author strong {
    font-size: 1rem;
}

.review-author span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Logo */
.logo-img {
    height: 55px;
    /* Adjust as needed */
    width: auto;
    display: block;
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 320px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    font-family: var(--font-body);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.cookie-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cookie-content {
    padding: 25px;
    text-align: center;
}

.cookie-img-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
}

.cookie-svg {
    width: 100%;
    height: 100%;
    animation: float 3s ease-in-out infinite;
}

.cookie-popup h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text-dark);
    margin-bottom: 10px;
}

.cookie-popup p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.cookie-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    /* Connected buttons look */
    border-top: 1px solid #eee;
    margin: 0 -25px -25px -25px;
    /* Bleed to edges */
}

.btn-cookie {
    padding: 15px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-body);
}

.btn-cookie-outline {
    background: white;
    color: #333;
    border-bottom-left-radius: 20px;
}

.btn-cookie-outline:hover {
    background: #f5f5f5;
}

.btn-cookie-dark {
    background: black;
    /* Or var(--color-text-dark) */
    color: white;
    border-bottom-right-radius: 20px;
}

.btn-cookie-dark:hover {
    background: #333;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-5px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20BA5A;
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: white;
}

@media (max-width: 480px) {
    .cookie-popup {
        left: 20px;
        right: 20px;
        width: auto;
        bottom: 20px;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 25px;
        /* Closer to bottom as requested */
        right: 20px;
    }

    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }

    /* Ensure reviews stack vertically on small screens */
    .reviews-grid {
        grid-template-columns: 1fr !important;
    }
}