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

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
}

/* Critical CSS - Above the fold content */
.hero {
    will-change: transform;
}

/* GPU acceleration for animations */
.fadeInUp,
.fadeInLeft,
.fadeInRight,
.scaleIn,
.staggered {
    will-change: transform, opacity;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

/* Smooth Scroll Animations */
.fadeIn {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

.fadeIn.visible {
    opacity: 1;
    transform: translateY(0);
}

.fadeInLeft {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 1s ease-out;
}

.fadeInLeft.visible {
    opacity: 1;
    transform: translateX(0);
}

.fadeInRight {
    opacity: 0;
    transform: translateX(40px);
    transition: all 1s ease-out;
}

.fadeInRight.visible {
    opacity: 1;
    transform: translateX(0);
}

.fadeInUp {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s ease-out;
}

.fadeInUp.visible {
    opacity: 1;
    transform: translateY(0);
}

.scaleIn {
    opacity: 0;
    transform: scale(0.9);
    transition: all 1s ease-out;
}

.scaleIn.visible {
    opacity: 1;
    transform: scale(1);
}

.slideUp {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1.5s ease-out;
}

.slideUp.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for grid items */
.staggered {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.8s ease-out;
}

.staggered.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Scroll offset to prevent content being hidden behind fixed header */
html {
    scroll-padding-top: 120px;
}

section {
    scroll-margin-top: 0px;
}

/* Top Contact Bar */
.top-bar {
    background-color: #afafaf;
    padding: 0;
    font-size: 13px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    padding: 0 20px;
    min-height: 38px;
}

.contact-info {
    display: flex;
    gap: 25px;
    align-items: center;
}

.contact-info span {
    color: #161616;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
}

.contact-info span i {
    font-size: 14px;
    color: #161616;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 36px;
    margin-left: auto;
}

.top-bar .social-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.top-bar .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(26, 26, 26, 0.1);
    color: #161616;
    border-radius: 50%;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.top-bar .social-links a:hover {
    background-color: #161616;
    color: #e5e5e5;
    transform: translateY(-1px);
}

.top-bar .social-links a i {
    font-size: 14px;
}

.language-selector {
    display: flex;
    gap: 5px;
    align-items: center;
}

.lang-btn {
    padding: 4px 10px;
    border: 1px solid #161616;
    background-color: transparent;
    color: #161616;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn.active,
.lang-btn:hover {
    background-color: #161616;
    color: #e5e5e5;
}

.contact-btn {
    background-color: #161616;
    color: #e5e5e5;
    padding: 0 15px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-btn:hover {
    background-color: #888888;
    transform: translateY(-1px);
}

/* Main Navigation */
.main-nav {
    background-color: #161616;
    padding: 15px 0;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    padding: 0 20px;
}

.logo img {
    height: 45px;
    filter: brightness(0) invert(1);
    top: 4px;
    position: relative;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 35px;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    padding: 8px 0;
}

nav ul li a:hover {
    color: #e5e5e5;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e5e5e5;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a.active {
    color: #e5e5e5;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section with Parallax */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: #fff;
    padding: 250px 0 150px;
    text-align: left;
    background: linear-gradient(rgba(26, 26, 26, 0.7), rgba(26, 26, 26, 0.7)), url('assets/hero4.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin-bottom: 0;
    overflow: hidden;
}

/* Prevent gap between sections */
.hero+section {
    margin-top: 0;
}

/* Fallback for browsers that don't support background-attachment: fixed */
@supports not (background-attachment: fixed) {
    .hero {
        background-attachment: scroll;
    }
}

.hero .container {
    max-width: 1400px;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 900px;
}

.hero-subtitle {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #e5e5e5;
    margin-bottom: 30px;
    opacity: 1;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4.5em;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 40px;
    letter-spacing: -1px;
    color: #ffffff;
}

.hero h1 span {
    color: #e5e5e5;
    font-weight: 400;
}

.hero-logo {
    margin-bottom: 40px;
    text-align: center;
}

.hero-logo img {
    height: 120px;
    width: auto;
    filter: brightness(0) invert(1);
}

.hero-content {
    text-align: center;
}

.btn {
    display: inline-block;
    background-color: transparent;
    color: #e5e5e5;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 0;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 2px solid #e5e5e5;
    margin-top: 10px;
}

.btn:hover {
    background-color: #e5e5e5;
    color: #161616;
}

/* Hero Animation Classes */
.hero-animate-1,
.hero-animate-2,
.hero-animate-3 {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}

.hero-animate-1.animate {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-animate-2.animate {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-animate-3.animate {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 1s ease-out 0.9s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
section {
    padding: 100px 0;
}

.about,
.panama,
.attorneys,
.practice-areas,
.contact,
.why-choose,
.good-at {
    background-color: #f8f9fa;
}

/* About Section */
.about {
    margin-top: 0;
    padding-top: 100px;
    background-image: url('assets/about-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: 1;
    background-image: url('assets/pattern.png');
    background-repeat: repeat;
}

.about .container {
    position: relative;
    z-index: 2;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
    margin-top: 40px;
    padding: 40px;
    border-radius: 10px;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.about-text h2 {
    font-size: 2.5em;
    color: #161616;
    margin-bottom: 25px;
    font-weight: 300;
    line-height: 1.2;
}

.about-text p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #888888;
}

.btn-outline {
    background-color: transparent;
    color: #161616;
    border: 2px solid #e5e5e5;
    margin-top: 20px;
}

.btn-outline:hover {
    background-color: #161616;
    color: #ffffff;
}

.panama {
    background-color: #414141;
}

.panama-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    color: #cbcbcb;
}

.panama-text h1 {
    color: #fff;
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 300;
}

.panama-text h3 {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 30px;
    font-weight: 500;
}

.panama-text p {
    color: #e2e2e2;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
    text-align: justify;
}

.panama-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.panama-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.panama-image img:hover {
    transform: scale(1.02);
}

.good-at {
    background-color: #fff;
}


/* Attorneys Section */
.attorneys {
    background-color: #f8f9fa;
    text-align: center;
    background-image: url('assets/socios-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.attorneys::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.6);
    z-index: 1;
    background-image: url('assets/pattern2.png');
    background-repeat: repeat;
    opacity: 0.7;
}

.attorneys .container {
    position: relative;
    z-index: 2;
}

.attorneys h2 {
    font-size: 2.5em;
    color: #161616;
    margin-bottom: 60px;
    font-weight: 300;
}

.attorneys-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 1200px) {
    .attorneys-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .attorneys-grid {
        grid-template-columns: 1fr;
    }
}

.attorney-card {
    background-color: #afafaf;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    position: relative;
}

.attorney-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.attorney-image {
    margin-bottom: 25px;
    position: relative;
}

.attorney-image img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e5e5e5;
    transition: transform 0.3s ease;
}

.attorney-card:hover .attorney-image img {
    transform: scale(1.05);
}

.attorney-info {
    position: relative;
}

.attorney-info h3 {
    color: #161616;
    margin-bottom: 8px;
    font-size: 1.4em;
    font-weight: 600;
}

.attorney-info .position {
    color: #161616;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attorney-info .specialty {
    color: #000;
    font-size: 14px;
    line-height: 1.5;
    font-style: italic;
    margin-bottom: 20px;
}

.expand-icon {
    position: absolute;
    bottom: -10px;
    right: 20px;
    color: #e5e5e5;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.expand-icon.active {
    transform: rotate(180deg);
}

/* Attorney Profile Expanded */
.attorney-profile {
    margin-top: 40px;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 15px;
    animation: slideDown 0.3s ease-out;
}

.attorney-profile.closing {
    animation: slideUp 0.3s ease-out forwards;
}

.profile-content {
    display: block;
    text-align: left;
}

.profile-image-full {
    float: left;
    width: 300px;
    margin: 0 40px 20px 0;
}

.profile-image-full img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 4px solid #e5e5e5;
}

.profile-text h3 {
    color: #161616;
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.profile-position {
    color: #161616;
    font-weight: 600;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
}

.profile-description p {
    color: #888888;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
}

.profile-close {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.close-profile-btn {
    background-color: #161616;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.close-profile-btn:hover {
    background-color: #888888;
    transform: scale(1.1);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Testimonials Section */
.testimonials {
    background-color: #f8f9fa;
    background-image: url('assets/pattern.png');
    background-repeat: repeat;
    background-position: top left;
    background-size: auto;
    text-align: center;
}

.testimonials h2 {
    font-size: 2.5em;
    color: #161616;
    margin-bottom: 60px;
    font-weight: 300;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.testimonial {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.testimonial:hover {
    transform: translateY(-5px);
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 30px;
    font-size: 60px;
    color: #e5e5e5;
    font-family: serif;
    line-height: 1;
}

.testimonial-content {
    margin-bottom: 30px;
}

.testimonial-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #888888;
    font-style: italic;
    margin: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    margin: 0;
    color: #161616;
    font-size: 16px;
    font-weight: 600;
}

.testimonial-author span {
    color: #161616;
    font-size: 14px;
    font-weight: 500;
}


/* Practice Areas */
.practice-areas {
    background-color: #161616;
    color: #fff;
    text-align: center;
}

.practice-areas h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 300;
    color: #fff;
}

.practice-areas>p {
    font-size: 1.2em;
    margin-bottom: 60px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 50px;
}

@media (max-width: 1200px) {
    .areas-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .areas-grid {
        grid-template-columns: 1fr;
    }
}

.area-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.area-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: background-color 0.3s ease;
}

.area-item:hover {
    transform: translateY(-5px);
}

.area-item:hover::before {
    background-color: rgba(0, 0, 0, 0.2);
}

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

.area-item:hover img {
    transform: scale(1.1);
}

.area-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 20px 15px 15px;
    transform: translateY(0);
    z-index: 2;
    transition: transform 0.3s ease;
}

.area-item:hover .area-overlay {
    transform: translateY(0);
}

.area-overlay h3 {
    margin: 0 0 5px 0;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.2;
}

.area-overlay p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.3;
}

/* Area Descriptions */
.area-descriptions {
    margin-top: 40px;
}

.area-description {
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 15px;
    animation: slideDown 0.3s ease-out;
    text-align: left;
    color: #333;
}

.area-description h3 {
    color: #161616;
    font-size: 2em;
    margin-bottom: 25px;
    font-weight: 600;
}

.area-description p {
    color: #888888;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    background-color: #fff;
    border-radius: 15px;
    max-width: 1000px;
    max-height: 90vh;
    width: 90%;
    position: relative;
    overflow: hidden;
    animation: lightboxZoom 0.3s ease-out;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
    background-color: rgba(0, 0, 0, 0.5);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.lightbox-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.lightbox-image {
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.lightbox-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    max-height: 80vh;
}

.lightbox-info h3 {
    color: #161616;
    font-size: 2.2em;
    margin-bottom: 25px;
    font-weight: 600;
    line-height: 1.2;
}

.lightbox-info p {
    color: #888888;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.3);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        width: 95%;
        max-height: 95vh;
    }

    .lightbox-body {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .lightbox-info {
        padding: 30px 25px;
        max-height: 50vh;
    }

    .lightbox-info h3 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .lightbox-image {
        min-height: 300px;
    }
}

/* Why Choose Us */
.why-choose {
    background-color: #fff;
    text-align: center;
}

.why-choose h2 {
    font-size: 2.5em;
    color: #161616;
    margin-bottom: 60px;
    font-weight: 300;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature {
    text-align: center;
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border-top: 4px solid #e5e5e5;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background-color: #e5e5e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature:nth-child(1)::before {
    content: '⚖️';
    font-size: 24px;
    line-height: 60px;
    text-align: center;
}

.feature:nth-child(2)::before {
    content: '🏆';
    font-size: 24px;
    line-height: 60px;
    text-align: center;
}

.feature:nth-child(3)::before {
    content: '🤝';
    font-size: 24px;
    line-height: 60px;
    text-align: center;
}

.feature:nth-child(4)::before {
    content: '💰';
    font-size: 24px;
    line-height: 60px;
    text-align: center;
}

.feature h3 {
    color: #161616;
    margin-bottom: 15px;
    margin-top: 20px;
    font-size: 1.4em;
    font-weight: 500;
}

.feature p {
    color: #888888;
    line-height: 1.6;
    font-size: 15px;
}

/* What We Are Good At */
.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skill {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.skill h3 {
    color: #007bff;
    margin-bottom: 10px;
}

/* Free Evaluation */
.contacto {
    min-height: 70vh;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0 !important;
}

.contact-content {
    display: flex;
    min-height: 70vh;
    margin: 0;
    padding: 0;
}

.contact-form-block {
    flex: 1;
    background: #afafaf;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
}

.contact-image-block {
    flex: 1;
    position: relative;
    background-image: url('assets/contacto-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow: hidden;
}

.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.contact-info-overlay {
    text-align: center;
    color: white;
    max-width: 400px;
}

.contact-info-overlay h3 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #e5e5e5;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    text-align: left;
}

.contact-item i {
    color: #e5e5e5;
    font-size: 1.2em;
    margin-right: 15px;
    margin-top: 3px;
    min-width: 20px;
}

.contact-item div {
    flex: 1;
}

.contact-item strong {
    display: block;
    margin-bottom: 5px;
    color: #e5e5e5;
    font-weight: 600;
}

.contact-item span {
    color: #ffffff;
    line-height: 1.4;
}

.social-links-overlay {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links-overlay a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgb(0 0 0 / 20%);
    color: #e5e5e5;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
    border: 2px solid rgb(229 229 229 / 30%);
}

.social-links-overlay a:hover {
    background-color: #e5e5e5;
    color: #161616;
    transform: translateY(-3px);
    border-color: #e5e5e5;
}

.contact-bg-pattern {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(26, 26, 26, 0.7) 0%,
            rgba(229, 229, 229, 0.4) 100%);
    position: relative;
}

.contact-bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.form-content {
    max-width: 500px;
    width: 100%;
    color: #161616;
}

.form-content h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 400;
    color: #161616;
    font-family: 'Playfair Display', serif;
}

.form-content p {
    font-size: 1.1em;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    padding: 18px 0;
    border: none;
    border-bottom: 1px solid rgba(26, 26, 26, 0.3);
    background: transparent;
    color: #161616;
    font-size: 16px;
    font-style: italic;
    transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(26, 26, 26, 0.6);
    font-style: italic;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-bottom-color: #161616;
    background: rgba(26, 26, 26, 0.05);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.submit-btn {
    background: transparent;
    color: #161616;
    padding: 15px 40px;
    border: 2px solid #161616;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 20px;
    align-self: flex-start;
}

.submit-btn:hover {
    background-color: #161616;
    color: #e5e5e5;
    transform: translateY(-2px);
}

.form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-loading {
    opacity: 0.7;
    pointer-events: none;
}

.form-loading button {
    position: relative;
}

.form-loading button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Contact */
.contact-info {
    margin-bottom: 0px;
}

.map {
    height: 300px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
footer {
    background: #161616;
    color: #fff;
    padding: 80px 0 0px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e5e5, transparent);
    z-index: 1;
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    background-image: url('assets/pattern.png'), url('assets/footer-bg.png');
    background-size: auto, 54%;
    background-position: center, right;
    background-repeat: repeat, no-repeat;
    padding: 0 20px;
    border-radius: 8px;
}

footer .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(22, 22, 22, 0.92);
    border-radius: 8px;
    z-index: -1;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    margin-bottom: 0px;
}

.footer-logo img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-logo img:hover {
    opacity: 1;
}

.footer-section h3 {
    color: #e5e5e5;
    margin-bottom: 25px;
    font-size: 1.2em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links,
.footer-contact {
    margin-bottom: 0;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 15px;
}

.footer-links ul li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #e5e5e5;
    font-size: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.footer-links ul li a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
}

.footer-links ul li a:hover {
    color: #e5e5e5;
}

.footer-contact p {
    margin-bottom: 15px;
    color: #ecf0f1;
    font-size: 14px;
    line-height: 1.6;
}

.footer-contact strong {
    color: #e5e5e5;
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 6px;
    text-align: center;
    background: #414141;
}

.footer-bottom p {
    margin: 0;
    color: #bdc3c7;
    font-size: 14px;
    text-align: center;
    padding-bottom: 7px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 0px;
}

.footer-social-column {
    justify-content: flex-start !important;
    margin-top: 15px;
}

.social-links.footer {
    margin-bottom: 18px;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #e5e5e5 0%, #161616 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #e5e5e5;
    transform: translateY(-2px);
}

.footer-section a {
    color: #fff;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #e5e5e5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #888888;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
    }

    .about-content {
        gap: 40px;
    }
}

@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .contact-content {
        flex-direction: column;
        min-height: auto;
    }

    .contact-form-block {
        padding: 40px 20px;
        min-height: auto;
    }

    .contact-image-block {
        min-height: auto;
        height: auto;
        order: -1;
        background-attachment: scroll;
        position: relative;
    }

    .contact-bg-pattern {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .contact-overlay {
        position: relative;
        padding: 60px 20px;
        height: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 2;
    }

    .contact-info-overlay {
        max-width: 300px;
    }

    .contact-info-overlay h3 {
        font-size: 2em;
        margin-bottom: 20px;
    }

    .contact-item {
        margin-bottom: 15px;
    }

    .contact-item i {
        font-size: 1em;
        margin-right: 10px;
    }

    .social-links-overlay a {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .form-content h2 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 8px 0;
    }

    .top-bar .container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        min-height: auto;
    }

    .contact-info {
        display: none;
    }

    .top-bar-right {
        gap: 15px;
    }

    .main-nav .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    .hamburger-menu {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, #161616 0%, #888888 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    nav.active {
        left: 0;
    }

    /* Adjust scroll offset for mobile */
    html {
        scroll-padding-top: 140px;
    }

    section {
        scroll-margin-top: 60px;
    }

    nav ul {
        flex-direction: column;
        gap: 30px;
        margin: 0;
        padding: 0;
        text-align: center;
    }

    nav ul li a {
        font-size: 18px;
        font-weight: 600;
        letter-spacing: 1px;
        padding: 15px 30px;
        border-radius: 5px;
        transition: all 0.3s ease;
        position: relative;
    }

    nav ul li a::after {
        display: none;
    }

    nav ul li a:hover,
    nav ul li a.active {
        background-color: rgba(229, 229, 229, 0.2);
        color: #e5e5e5;
    }

    .hero {
        padding: 200px 0 100px;
        text-align: center;
        background-position: center center;
    }

    .hero h1 {
        font-size: 3em;
        line-height: 1.2;
    }

    .hero-logo img {
        height: 90px;
        filter: brightness(0) invert(1);
    }

    .hero-subtitle {
        font-size: 12px;
        letter-spacing: 1.5px;
        margin-bottom: 20px;
    }

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

    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .attorney-card {
        max-width: 100%;
        padding: 30px 20px;
    }

    .profile-content {
        display: block;
        text-align: center;
    }

    .profile-image-full {
        float: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 20px auto;
    }

    .profile-image-full img {
        height: auto;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .areas-grid {
        grid-template-columns: 1fr;
    }

    .area-description {
        padding: 30px 20px;
    }

    footer .container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section {
        align-items: center;
    }

    .footer_description {
        text-align: center;
    }

    .footer-links ul li::before {
        display: none;
    }

    .social-links {
        gap: 15px;
    }

    .panama-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .panama-text h1 {
        font-size: 2.5em;
    }

    .panama-text h3 {
        font-size: 1.3em;
    }

    .panama-image img {
        height: 300px;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2em;
        line-height: 1.3;
    }

    .hero-logo img {
        height: 70px;
        filter: brightness(0) invert(1);
    }

    .hero-subtitle {
        font-size: 11px;
        letter-spacing: 1px;
        margin-bottom: 15px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 12px;
        letter-spacing: 1.5px;
    }

    .about-text h2,
    .why-choose h2,
    .attorneys h2,
    .testimonials h2,
    .portfolio h2 {
        font-size: 2em;
    }

    section {
        padding: 60px 0;
    }

    .feature {
        padding: 30px 20px;
    }

    .attorney-card {
        padding: 20px;
    }

    .attorney-image img {
        width: 150px;
        height: 150px;
    }

    .attorney-profile {
        padding: 20px;
        margin-top: 20px;
    }

    .profile-text h3 {
        font-size: 1.5em;
    }

    .expand-icon {
        right: 15px;
        bottom: -5px;
    }

    .testimonial {
        padding: 30px 20px;
    }

    .contact-form-block {
        padding: 30px 15px;
    }

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

    .form-content h2 {
        font-size: 1.8em;
    }

    footer {
        padding: 60px 0 20px;
    }
}

.footer_description {
    color: #a0a0a0 !important;
    margin-bottom: 25px;
    font-size: 10.5px;
    font-weight: 400;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    text-align: left;
}

/* Team Introduction Section */
.team-introduction {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 40px auto 0;
}

.team-intro-card {
    width: 100%;
}

.team-intro-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #161616;
    text-align: left;
}

.team-intro-text h2 {
    margin-bottom: 20px;
    text-align: left;
}

.team-intro-text p {
    text-align: left !important;
}

@media (max-width: 768px) {
    .team-introduction {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .team-intro-card {
        max-width: 320px;
        margin: 0 auto;
    }

    .team-intro-text {
        margin-top: 20px;
    }
}