/* ============================================================
   index.css — TibuTec sitio principal
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- Variables ---- */
:root {
    --primary:      #0f172a;
    --primary-soft: #1e293b;
    --accent:       #3b82f6;
    --accent-dark:  #2563eb;
    --red:          #ef4444;
    --red-dark:     #dc2626;
    --green:        #22c55e;
    --text:         #1e293b;
    --text-muted:   #64748b;
    --bg:           #ffffff;
    --bg-alt:       #f8fafc;
    --border:       #e2e8f0;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:    0 12px 40px rgba(0,0,0,.12);
    --radius:       14px;
    --radius-sm:    8px;
}

/* ---- Reset ---- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a  { text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: .9rem 2rem;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 44px; width: 44px; object-fit: contain; border-radius: 8px; }
.logo h1 { font-size: 1.4rem; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }

.nav-menu { display: flex; gap: .25rem; }
.nav-menu a {
    padding: .45rem .9rem;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: background .2s, color .2s;
}
.nav-menu a:hover, .nav-menu a.active {
    background: #f1f5f9;
    color: var(--primary);
}

/* Ícono de admin en el nav */
.nav-admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--text-muted) !important;
    transition: all .2s;
}
.nav-admin-link:hover {
    background: var(--primary) !important;
    color: white !important;
    transform: rotate(30deg);
}

.hamburger { display: none; cursor: pointer; font-size: 1.4rem; color: var(--primary); padding: .4rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: white;
    padding: 6rem 2rem 4rem;
}

.hero-carousel { position:absolute; inset:0; z-index:0; }
.carousel-inner { width:100%; height:100%; position:relative; }

.carousel-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
    background-size: cover;
    background-position: center;
}
.carousel-item.active { opacity: 1; }
.carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.65) 100%);
}

.hero-content { position:relative; z-index:2; max-width: 780px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: white;
    font-size: .78rem;
    font-weight: 600;
    padding: .35rem .85rem;
    border-radius: 99px;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(6px);
    letter-spacing: .5px;
    text-transform: uppercase;
}

.hero h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: clamp(.95rem, 2vw, 1.15rem);
    max-width: 640px;
    margin: 0 auto 2.2rem;
    color: rgba(255,255,255,.85);
    line-height: 1.7;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-hero-primary {
    background: var(--accent);
    color: white;
    padding: .85rem 2rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: .95rem;
    transition: all .25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-hero-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,.4); }

.btn-hero-ghost {
    background: rgba(255,255,255,.12);
    color: white;
    border: 1.5px solid rgba(255,255,255,.4);
    padding: .85rem 2rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: .95rem;
    transition: all .25s;
    backdrop-filter: blur(6px);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.22); }

/* Carrusel controles */
.carousel-indicators {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.carousel-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    border: 1.5px solid rgba(255,255,255,.7);
    cursor: pointer;
    transition: all .3s;
    padding: 0;
}
.carousel-dot.active { background: white; transform: scale(1.35); }

/* ============================================================
   SECCIONES GENERALES
   ============================================================ */
.section-wrap {
    padding: 6rem 2rem;
}
.section-wrap.alt { background: var(--bg-alt); }

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .65rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}
.section-title h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    margin-bottom: .6rem;
}
.section-title p {
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto;
    font-size: .95rem;
}

/* ============================================================
   SERVICIOS
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 2rem 1.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #2d4a6e 100%);
    color: white;
    text-align: center;
}
.service-icon {
    font-size: 2.4rem;
    margin-bottom: .8rem;
    display: block;
    opacity: .9;
}
.card-header h3 { font-size: 1.15rem; font-weight: 700; }

.card-body { padding: 1.5rem 1.8rem; }
.card-body p { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.2rem; line-height: 1.6; }

.icon-list { padding: 0; }
.icon-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: .4rem 0;
    font-size: .88rem;
    color: var(--text);
    border-bottom: 1px solid #f1f5f9;
}
.icon-list li:last-child { border-bottom: none; }
.icon-list i { color: var(--green); font-size: .8rem; flex-shrink: 0; }

/* ============================================================
   EQUIPO
   ============================================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.interactive-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    transition: box-shadow .3s;
}
.interactive-card:hover { box-shadow: var(--shadow-md); }

.card-content { display: flex; flex-direction: column; align-items: center; }

.photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin-bottom: 1rem;
}

.profile-img {
    width: 110px; height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 16px rgba(59,130,246,.25);
    transition: transform .3s;
}
.photo-container:hover .profile-img { transform: scale(1.05); }

.expand-hint {
    margin-top: 8px;
    font-size: .75rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    transition: opacity .2s;
}
.expand-hint i { transition: transform .3s; }
.interactive-card.expanded .expand-hint i { transform: rotate(180deg); }

.name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: .7rem;
    text-align: center;
    letter-spacing: -.3px;
}

.info-container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .5s ease, opacity .4s ease;
    width: 100%;
}
.interactive-card.expanded .info-container {
    max-height: 2000px;
    opacity: 1;
}

.card-title {
    font-size: .88rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    margin: .8rem 0 .5rem;
}

.location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: .83rem;
    margin-bottom: 1rem;
}
.location i { color: var(--red); }

.social-links { display: flex; justify-content: center; gap: .6rem; margin: .8rem 0 1.2rem; }
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: #f1f5f9;
    color: var(--primary);
    border-radius: 50%;
    font-size: .95rem;
    transition: all .25s;
}
.social-links a:hover { background: var(--accent); color: white; transform: translateY(-2px); }

.card-subtitle {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
    margin: 1rem 0 .7rem;
}

.skills { display: flex; flex-wrap: wrap; gap: 6px; margin: .5rem 0 1rem; }
.skill {
    background: #eff6ff;
    color: var(--accent-dark);
    padding: .28rem .7rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 500;
}

.info-columns { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: .5rem 0; }
.info-column { flex: 1; min-width: 260px; }
.info-column p { font-size: .88rem; color: var(--text-muted); line-height: 1.6; }

.buttons { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; justify-content: center; }
.card-btn {
    padding: .6rem 1.2rem;
    border-radius: 99px;
    font-weight: 600;
    font-size: .82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .25s;
    min-width: 130px;
    justify-content: center;
}
.btn-primary   { background: var(--accent); color: white; }
.btn-primary:hover   { background: var(--accent-dark); }
.btn-secondary { background: var(--red); color: white; }
.btn-secondary:hover { background: var(--red-dark); }
.btn-whatsapp  { background: #22c55e; color: white; }
.btn-whatsapp:hover  { background: #16a34a; }

.instruction {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ============================================================
   PROYECTOS
   ============================================================ */
.projects-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.project-image { position: relative; width: 100%; height: 210px; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project-card:hover .project-image img { transform: scale(1.05); }

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
}
.project-card:hover .project-overlay { opacity: 1; }

.project-links { display: flex; gap: 10px; }
.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    font-size: .95rem;
    transition: all .25s;
}
.project-link:hover { background: var(--accent); color: white; transform: scale(1.1); }

.project-info { padding: 1.4rem; }
.project-info h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: .4rem; }
.project-info p  { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: .9rem; }

.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag {
    background: #f1f5f9;
    color: var(--text);
    padding: .25rem .65rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
}

/* ============================================================
   CONÓCENOS / ABOUT
   ============================================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.4rem;
    letter-spacing: -.5px;
}
.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: .95rem;
    line-height: 1.75;
}

.about-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.stat-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; margin-top: .2rem; }

.about-image { position: relative; }
.about-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
    object-fit: cover;
}
.about-image::before {
    content: '';
    position: absolute;
    inset: -12px -12px auto auto;
    width: 60%;
    height: 60%;
    background: linear-gradient(135deg, rgba(59,130,246,.15), transparent);
    border-radius: var(--radius);
    z-index: -1;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: var(--primary);
    color: rgba(255,255,255,.8);
    padding: 4rem 2rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.footer-logo img { height: 42px; width: 42px; border-radius: 8px; object-fit: contain; }
.footer-logo h3 { color: white; font-size: 1.2rem; font-weight: 800; }

#footer-description { font-size: .88rem; line-height: 1.7; max-width: 280px; }

.footer-social { display: flex; gap: .65rem; margin-top: 1.4rem; }
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    transition: all .25s;
}
.social-icon:hover { background: var(--accent); color: white; transform: translateY(-2px); }

.footer-links h3 {
    color: white;
    font-size: .88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
}
.footer-links li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: .65rem;
    font-size: .87rem;
}
.footer-links a { color: rgba(255,255,255,.65); transition: color .2s; }
.footer-links a:hover { color: white; }
.footer-links i { color: var(--accent); font-size: .8rem; width: 14px; flex-shrink: 0; }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.4rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    color: rgba(255,255,255,.4);
    flex-wrap: wrap;
    gap: .5rem;
}

/* ============================================================
   BOTÓN ADMIN FLOTANTE
   ============================================================ */
.admin-toggle-link {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary);
    color: white;
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transition: all .3s;
}
.admin-toggle-link:hover { background: var(--accent); transform: scale(1.1) rotate(30deg); color: white; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .about-content { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hamburger { display: block; }

    .nav-menu {
        position: fixed;
        top: 66px;
        right: -100%;
        background: var(--primary);
        width: 75%;
        max-width: 300px;
        height: calc(100vh - 66px);
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: .25rem;
        transition: right .3s;
        overflow-y: auto;
    }
    .nav-menu.active { right: 0; }
    .nav-menu a { color: rgba(255,255,255,.75); font-size: .95rem; padding: .7rem 1rem; }
    .nav-menu a:hover, .nav-menu a.active { background: rgba(255,255,255,.1); color: white; }
    .nav-admin-link {
        background: rgba(255,255,255,.1) !important;
        color: rgba(255,255,255,.75) !important;
    }
    .nav-admin-link:hover {
        background: white !important;
        color: var(--primary) !important;
    }

    .hero { min-height: 75vh; padding: 5rem 1.5rem 3rem; }
    .hero h2 { font-size: 1.8rem; }
    .carousel-arrow { width: 36px; height: 36px; }
    .carousel-prev { left: 10px; }
    .carousel-next { right: 10px; }

    .section-wrap { padding: 4rem 1.2rem; }
    .services-grid, .projects-gallery, .team-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .about-stats { justify-content: center; }
    .buttons { flex-direction: column; }
    .card-btn { width: 100%; }
    .info-column { min-width: 100%; }
}

@media (max-width: 480px) {
    .hero { min-height: 65vh; }
    .hero h2 { font-size: 1.5rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .btn-hero-primary, .btn-hero-ghost { width: 100%; max-width: 280px; justify-content: center; }
}
