/* CSS for Corvalán y Córdova Ltda. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --primary-color: #0d0d0d;
    --secondary-color: #ffffff;
    --accent-color: #d32f2f;
    /* Red from the logo */
    --text-color: #333333;
    --light-bg: #f4f4f4;
    --transition-speed: 0.3s;
}

/* Solución Visibilidad Modo Oscuro */
@media (prefers-color-scheme: dark) {

    .logo img,
    .hero {
        filter: invert(0.9) hue-rotate(180deg);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--secondary-color);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Header */
header {
    background: #ffffff;
    /* Solid white so the JPG logo blends completely */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 3%;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.logo img {
    height: 65px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 1.35rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-links > li > a {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.8px;
    position: relative;
    padding-bottom: 5px;
    white-space: nowrap;
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition-speed);
}

.nav-links > li > a:hover::after {
    width: 100%;
}

.nav-links > li > a:hover {
    color: var(--accent-color);
}

/* Mobile Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    height: 87vh;
    /* Intermediate size */
    background-image: url('../FotosPaginaWEB/Fondo_Nuevo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: rgb(213, 213, 213);
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    margin-top: 0;
    position: relative;
    /* Needed for pseudo-element */
}

/* Vignette overlay to blend image edges */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Lateral blending only */
    background: linear-gradient(90deg, rgb(213, 213, 213) 0%, transparent 5%, transparent 95%, rgb(213, 213, 213) 100%);
    pointer-events: none;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: transparent;
    border-color: white;
}

/* Sections General */
section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.8rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.left-aligned-title {
    text-align: left;
}

.left-aligned-title::after {
    left: 0;
    transform: none;
}

/* About Us */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-text h3 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 1.05rem;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 2px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Practice Areas */
.services-section {
    background-color: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: white;
    padding: 3rem 2rem;
    border-top: 4px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: #666;
}

/* Strategy/Divider Section */
.strategy-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../FotosPaginaWEB/F-6408-3 (estrategia).jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 120px 5%;
}

.strategy-content h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.strategy-content p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* Careers Section */
.careers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.careers-content {
    order: 2;
}

.careers-image {
    order: 1;
}

.careers-image img {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Contact */
.contact-section {
    background-color: var(--primary-color);
    color: white;
}

.contact-section .section-title {
    color: white;
}

.contact-section .section-title::after {
    background-color: var(--accent-color);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.contact-info h3 {
    color: white;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.info-item {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    gap: 15px;
    opacity: 0.9;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Inter', sans-serif;
}

.contact-form button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.contact-form button:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: black;
    color: white;
    padding: 2rem 5%;
    text-align: center;
    border-top: 1px solid #222;
}

footer p {
    font-size: 1.1rem;
    opacity: 0.6;
}

/* Animations using opacity */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .about,
    .contact-container,
    .careers {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .careers-content {
        order: 1;
    }

    .careers-image {
        order: 2;
    }
}

@media (max-width: 1200px) {
    .navbar {
        padding: 0.65rem 2%;
    }

    .logo img {
        height: 58px;
    }

    .nav-links {
        gap: 0.85rem;
    }

    .nav-links > li > a {
        font-size: 0.76rem;
        letter-spacing: 0.5px;
    }

    .btn-nav {
        padding: 6px 11px;
        font-size: 0.74rem !important;
        letter-spacing: 0.4px;
    }
}

@media (max-width: 991px) {
    .hamburger {
        display: block;
        z-index: 1001;
        /* Above nav links */
    }

    .hamburger.active .bar {
        background-color: var(--primary-color);
    }

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

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 100%;
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.2rem;
        transition: 0.4s ease-in-out;
        box-shadow: none;
        overflow-y: auto;
        padding: 60px 20px;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 6px 0;
    }

    .nav-links > li > a {
        font-size: 1.15rem;
        color: var(--primary-color);
        letter-spacing: 1.2px;
    }

    .nav-links .btn-nav {
        font-size: 0.95rem !important;
        padding: 9px 20px;
    }
}

/* Navbar Button */
.btn-nav {
    display: inline-block;
    padding: 7px 15px;
    background-color: var(--accent-color);
    color: white !important;
    /* Override standard link color */
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.78rem !important;
    letter-spacing: 0.6px;
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.btn-nav:hover {
    background-color: transparent;
    color: var(--accent-color) !important;
    border-color: var(--accent-color);
}

.btn-nav::after {
    display: none;
    /* Remove underline effect */
}

/* Zig-Zag Strategy Section */
.strategy-zigzag {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.zigzag-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
}

.zigzag-row:last-child {
    margin-bottom: 0;
}

.zigzag-row.reverse {
    flex-direction: row-reverse;
}

.zigzag-image,
.zigzag-text {
    flex: 1;
}

.zigzag-image img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 350px;
    object-fit: cover;
}

.zigzag-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

.zigzag-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.zigzag-text p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .zigzag-row {
        gap: 2rem;
    }

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

@media (max-width: 768px) {

    .zigzag-row,
    .zigzag-row.reverse {
        flex-direction: column;
        gap: 2rem;
    }

    .zigzag-image img {
        height: 250px;
    }

    .zigzag-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .zigzag-text {
        text-align: center;
    }
}

/* Compact Cards Layout (Alternative Strategy) */
.strategy-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.strategy-card-item {
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    /* Quieter shadow */
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    text-align: left;
}

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

.card-img-top {
    height: 200px;
    /* Constrained height */
    width: 100%;
    overflow: hidden;
}

.card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.strategy-card-item:hover .card-img-top img {
    transform: scale(1.05);
    /* Subtle zoom */
}

.card-body {
    padding: 2rem;
}

.card-body h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card-body p {
    color: #666;
}

/* Team Section */
.team-section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--secondary-color);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.team-card {
    position: relative;
    border-radius: 4px;
    /* Sharper corners for magazine look */
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
    background: black;
    /* Dark background for loading */
    height: 580px;
    /* Extra tall portrait - iPhone-like ratio but wider */
    border: 4px solid white;
    outline: 1px solid #ddd;
}

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

.team-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: grayscale(0%);
    /* Color by default */
}

.team-card:hover .team-image {
    transform: scale(1.05);
    filter: grayscale(100%);
    /* B&W on hover */
}

/* Overlay: Gradient background, content at bottom */
.team-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    /* Adjust to content */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 10%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Align content to bottom */
    padding: 2rem 1.5rem;
    text-align: left;
    /* Magazine style usually left-aligned */
    transition: all 0.4s ease;
    transform: translateY(0);
    /* Ensure visibility */
}

.team-card:hover .team-info-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 20%, rgba(0, 0, 0, 0.6) 100%);
    transform: translateY(0);
    /* Slide up to reveal full content */
}

.team-member-name {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 0.2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.team-member-role {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--accent-color);
}

.team-member-desc {
    font-size: 1.1rem;
    line-height: 1.5;
    opacity: 0;
    /* Hidden initially */
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
    /* Slight delay */
    max-height: 0;
    /* Collapse space */
}

.team-card:hover .team-member-desc {
    opacity: 1;
    transform: translateY(0);
    max-height: 300px;
    /* Allow expansion - increased to avoid truncation */
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #1ebe57;
    color: #FFF;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* SVG Placeholder for Team */
.team-placeholder-svg {
    width: 100%;
    height: 100%;
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: grayscale(0%);
}

.team-card:hover .team-placeholder-svg {
    transform: scale(1.05);
    filter: grayscale(100%);
}

.team-placeholder-svg svg {
    width: 40%;
    height: 40%;
    fill: #555;
    opacity: 0.8;
}