/* Shared styles for Soluciones, Proyectos, Equipo */

/* Fix body background for static pages */
body {
    background-color: var(--bg);
    overflow-x: hidden;
    overflow-y: auto;
    /* Allow scrolling on these pages */
}

/* Header */
.page-header {
    padding: 8rem 5% 4rem 5%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .page-header {
        padding: 6rem 5% 2rem 5%;
    }

    .page-header h1 {
        font-size: 2rem !important;
        /* Override desktop styles */
    }
}

.page-header p {
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    /* Allow wider subtitles */
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.accent-text {
    color: var(--accent);
}

/* Content Container */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 5%;
}

/* Text Blocks */
.text-block {
    margin-bottom: 4rem;
}

.text-block.centered {
    text-align: center;
}

.text-block h2,
.text-block h3 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 1.5rem;
}

/* Grid System */
.grid-section h3 {
    text-align: center;
    font-family: var(--font-heading);
    margin-bottom: 3rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

/* Split Layout */
.split-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 4rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 3rem;
    border-radius: 4px;
}

.left,
.right {
    flex: 1;
    min-width: 280px;
    /* Lower min-width for smaller phones */
}

.right ul {
    list-style: none;
    padding: 0;
}

.right li {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent);
}

/* Projects Grid */
.card-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 5px var(--accent));
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.project-card {
    border-top: 2px solid var(--accent);
    padding-top: 1rem;
}

.project-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
    filter: brightness(0.8);
    transition: filter 0.3s;
}

.project-card:hover .project-thumb {
    filter: brightness(1.1);
}

.project-meta {
    font-size: 0.8rem;
    letter-spacing: 2px;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.project-stat {
    margin-top: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.project-stat .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* Team */
.team-layout {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.founders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    .founders-grid {
        grid-template-columns: 1fr;
    }
}

.founder-card {
    display: flex;
    flex-direction: column;
    /* Stack image and text vertically inside the card */
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, #111 0%, #050505 100%);
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    /* Softer corners */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    /* Equal height */
}

.founder-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
}

.founder-img img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(100%);
    transition: filter 1.5s ease-out, transform 1.5s ease-out;
    /* Slower transition for cinematic feel */
}

/* Scroll Trigger State */
.founder-img img.in-view {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.role {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Joint Logos Section */
.joint-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 3rem;
}

.project-logo-link {
    display: block;
    transition: transform 0.3s ease;
}

.project-logo-link:hover {
    transform: scale(1.1);
}

.project-logo {
    height: 110px;
    width: 110px;
    object-fit: cover;
    /* or contain if we want to see full edges, but cover usually looks better for 'icons' */
    border-radius: 50%;
    /* Make them circular for uniformity */
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.3s ease, filter 0.3s ease;
    filter: grayscale(100%);
    /* Start gray to match theme */
}

/* Specific adjustment if quipu is transparent/different ratio, but user said they have backgrounds */
/* Quipu might benefit from being slightly larger visually if it has less padding */

.project-logo-link:hover .project-logo {
    border-color: var(--accent);
    filter: grayscale(0%);
}

/* Mobile check */
@media (max-width: 768px) {
    .joint-logos {
        gap: 2rem;
    }

    .project-logo {
        height: 80px;
        width: 80px;
    }
}

/* Footer */
.simple-footer {
    text-align: center;
    padding: 2rem;
    opacity: 0.5;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }

    .founder-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Alignment Fix */
.text-block.centered p {
    margin-left: auto;
    margin-right: auto;
}

/* Contact Page Styles */
.centered-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}

.contact-hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #aaa;
}

.whatsapp-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: #25d366;
    color: #fff;
    padding: 1.5rem 3rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
}

.wa-icon-large {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.email-section {
    margin-top: 4rem;
}

.email-link {
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 5px;
    transition: color 0.3s;
}

.email-link:hover {
    color: var(--accent);
}

/* Clients Grid */
.clients-section {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    /* Hide scrollbars */
}

.clients-carousel {
    position: relative;
    width: 100%;
    margin-top: 3rem;
    /* Fade edges mask */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.carousel-track {
    display: flex;
    align-items: flex-start;
    /* Align to top so bottom padding is free space */
    gap: 5rem;
    width: max-content;
    animation: scroll-left 40s linear infinite;
    padding: 2rem 0 6rem 0;
    /* Huge bottom padding to fit the hover text */
}

@media (max-width: 768px) {
    .carousel-track {
        gap: 3rem;
        padding-bottom: 4rem;
    }

    .client-card img {
        height: 50px;
    }
}

.carousel-track:hover {
    animation-play-state: paused;
}

.client-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    position: relative;
    /* Ensure z-index is managed if needed */
    z-index: 1;
    transition: transform 0.3s;
}

.client-card img {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.client-card:hover {
    transform: translateY(-5px);
}

.client-card:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

.client-info {
    position: absolute;
    top: 100%;
    margin-top: 1rem;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
    pointer-events: none;
    /* Let clicks pass through if overlapping, though it's inside link */
    width: 200px;
    /* Fixed width to prevent wrapping weirdness */
}

.client-card:hover .client-info {
    opacity: 1;
    transform: translateY(0);
}

.client-name {
    display: block;
    font-family: var(--font-heading);
    color: #fff;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.client-industry {
    display: block;
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 1px;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Move half the track (the length of the original set) */
}