:root {
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --text-main: #1a1a2e;
    --text-muted: #6b7280;
    --accent: #0055cc;
    --accent-light: #e8f0fe;
    --accent-hover: #0044aa;
    --border: #e5e7eb;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,85,204,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ── Navbar ── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 6%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: #fff !important;
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-1px);
}

/* ── Hero ── */
.hero {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 6% 2rem;
    background: linear-gradient(rgba(10, 20, 50, 0.8), rgba(20, 30, 60, 0.7)), url('../images/hero-bg.webp') center/cover no-repeat;
    color: #fff;
}

.hero-content {
    max-width: 860px;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero h2 {
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    color: #a5c8ff;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.hero p {
    color: #e2e8f0;
    font-size: 1.05rem;
    margin-bottom: 2rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--accent);
    color: #fff;
}

/* ── Portfolio Section ── */
.portfolio-section {
    padding: 6rem 6% 4rem;
    max-width: 1300px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-main);
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 0.95rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ── Category Cards ── */
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.category-bg {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.category-info {
    padding: 1.2rem 1.4rem 1.4rem;
}

.category-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.category-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.btn-text {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
}

.category-card:hover .btn-text {
    gap: 0.6rem;
}

/* ── Modals ── */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(10, 20, 60, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    margin: 4% auto 5%;
    padding: 3rem 3.5rem;
    border-radius: 20px;
    width: 92%;
    max-width: 980px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1rem; right: 1.5rem;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover { color: var(--text-main); }

.modal-header {
    margin-bottom: 0.4rem;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--accent);
    font-weight: 700;
}

.modal-desc {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

/* ── Case Studies ── */
.case-study {
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.case-study:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.case-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.case-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.client-niche {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
}

.strategy-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    max-width: 760px;
}

.strategy-text strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ── Metrics ── */
.metrics-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.metric-item strong {
    display: block;
    font-size: 1.2rem;
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.metric-item span {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Mini Mosaic Grids ── */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.7rem;
}

.photo-container {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    aspect-ratio: 1/1;
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.photo-container img:hover {
    transform: scale(1.05);
}

/* ── Video Grid ── */
.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.7rem;
}

.video-container {
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.video-container video {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-container:hover video {
    transform: scale(1.03);
}

/* ── Client Mosaic (Estrategia) ── */
.client-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.client-tile {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.client-tile:hover {
    box-shadow: var(--shadow-hover);
}

.client-tile-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    background: var(--accent-light);
}

.client-tile-thumb.video-thumb {
    aspect-ratio: 16/9;
    height: 120px;
}

.client-tile-body {
    padding: 0.9rem 1rem;
}

.client-tile-body h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.client-tile-body p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.tag-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tag {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Contact Section ── */
.contact-section {
    background: linear-gradient(135deg, #0055cc 0%, #1a73e8 100%);
    margin: 0 6% 6rem;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 20px;
    color: #fff;
}

.contact-section h2 {
    font-size: 2rem;
    margin-bottom: 0.7rem;
    color: #fff;
}

.contact-section p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.contact-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    padding: 0.7rem 2rem;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.social-link:hover {
    background: #fff;
    color: var(--accent);
    border-color: #fff;
}

/* ── Animations ── */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeInUp 0.75s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ── Tech Info Bar ── */
.tech-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    background: var(--accent-light);
    border: 1px solid #c7d9f8;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 2rem;
}

.tech-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1 1 100%;
    border-bottom: 1px solid rgba(0,85,204,0.1);
    padding-bottom: 0.5rem;
}

.tech-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tech-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    min-width: 160px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-value {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Responsive ── */

/* Tablet landscape */
@media (max-width: 1100px) {
    .portfolio-section { padding: 5rem 4% 3rem; }
    .contact-section { margin: 0 4% 4rem; }
    .modal-content { padding: 2.5rem 2.5rem; }
}

/* Tablet portrait */
@media (max-width: 900px) {
    .portfolio-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
    .client-mosaic { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .modal-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .hero h1 { font-size: 2.4rem; }
    .section-title { font-size: 1.5rem; }
}

/* Mobile large */
@media (max-width: 640px) {
    .navbar { padding: 0.8rem 4%; }
    .logo { font-size: 1.1rem; }
    .nav-links a:not(.btn-primary) { display: none; }

    .hero { padding: 0 5%; }
    .hero h1 { font-size: 1.9rem; line-height: 1.2; }
    .hero h2 { font-size: 1rem; }
    .hero p { font-size: 0.95rem; }
    .hero-actions { flex-direction: column; align-items: center; gap: 0.7rem; }
    .btn-secondary, .btn-primary { width: 100%; max-width: 260px; text-align: center; }

    .portfolio-section { padding: 4rem 4% 2rem; }
    .portfolio-grid { grid-template-columns: 1fr; gap: 1rem; }
    .category-bg { height: 150px; }

    .modal-content {
        padding: 1.8rem 1.2rem;
        margin: 5% auto 8%;
        width: 96%;
        border-radius: 16px;
    }
    .modal-header h2 { font-size: 1.4rem; }
    .close-btn { top: 0.8rem; right: 1rem; font-size: 1.6rem; }

    .case-header { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .case-header h3 { font-size: 1.05rem; }

    .client-mosaic { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
    .client-tile-thumb { height: 100px; }
    .client-tile-body { padding: 0.6rem 0.7rem; }
    .client-tile-body h4 { font-size: 0.82rem; }
    .client-tile-body p { font-size: 0.72rem; }

    .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .modal-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }

    .metrics-row { gap: 1.2rem; }
    .metric-item strong { font-size: 1rem; }

    .contact-section { margin: 0 3% 3rem; padding: 2.5rem 1.2rem; border-radius: 14px; }
    .contact-section h2 { font-size: 1.4rem; }
    .contact-links { flex-direction: column; align-items: center; gap: 0.6rem; }
    .social-link { width: 100%; max-width: 240px; text-align: center; }
}

/* Mobile small */
@media (max-width: 380px) {
    .hero h1 { font-size: 1.6rem; }
    .client-mosaic { grid-template-columns: 1fr; }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-grid { grid-template-columns: 1fr 1fr; }
}

