/* ==========================================================================
   INDEX.CSS — Estilos exclusivos da página principal (index.html)
   ========================================================================== */

/* ==========================================================================
   CURSOR DNA SVG (exclusivo do index — substitui o cursor padrão do global)
   ========================================================================== */
#cursor {
    position: fixed;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    pointer-events: none !important;
    z-index: 2147483647;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* Reset the simple dot from global */
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

#cursor svg {
    width: 100%;
    height: 100%;
    color: var(--primary);
    filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.8));
    animation: spinDNA 3s linear infinite;
}

@keyframes spinDNA {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#cursor-blur {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none !important;
    z-index: 2147483646;
    transition: 0.1s ease-out;
    opacity: 0;
}

.hovering-link #cursor {
    transform: translate(-50%, -50%) scale(1.6);
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.hovering-link #cursor svg {
    animation: spinDNA 1s linear infinite;
    filter: drop-shadow(0 0 12px var(--primary));
    color: var(--text-main);
}

.hovering-link #cursor-blur {
    opacity: 0 !important;
    transform: translate(-50%, -50%) scale(1.5);
}

/* ==========================================================================
   DNA SCROLL SECTIONS
   ========================================================================== */
.scroll-container {
    position: relative;
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 5%;
    z-index: 10;
    pointer-events: none;
}

.section.align-left  { justify-content: flex-start; }
.section.align-right { justify-content: flex-end; }

.section-content {
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    padding: 3.5rem;
    border-radius: 32px;
    max-width: 550px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

.section-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    line-height: 1.1;
    color: var(--text-main);
}

.section-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.section-content img {
    border-radius: 16px;
    margin-bottom: 1.5rem;
    width: 100%;
    height: 180px;
    object-fit: cover;
    opacity: 0.9;
}

/* Scroll Indicator */
.scroll-indicator-custom {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--primary);
}

.mouse-line {
    width: 2px;
    height: 40px;
    background: rgba(0, 240, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.mouse-line::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 50%;
    background: var(--primary);
    animation: scrollLine 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollLine {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* ==========================================================================
   CONTEÚDO SECTIONS (Sobre, Especialidades, equipe, contacto)
   ========================================================================== */
.content-section {
    padding: 8rem 0;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
}

/* Bento Grid Layout Específico do Index */
.bento-grid-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.bento-grid-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Sobre Grid */
.sobre-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Contato Grid */
.contato-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
}

/* ==========================================================================
   GLASS PANELS (Especialidades bento)
   ========================================================================== */
.glass-panel {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: var(--bg-surface);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-base) 0%, transparent 80%);
    z-index: 1;
    pointer-events: none;
}

.glass-panel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: transform 0.6s, opacity 0.6s;
    z-index: 0;
}

.glass-panel:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 30px var(--glow-spread);
    transform: translateY(-5px);
}

.glass-panel:hover img {
    transform: scale(1.05);
    opacity: 0.7;
}

.glass-panel .glowing-border {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--primary), transparent, var(--secondary)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 3;
}

.glass-panel:hover .glowing-border {
    opacity: 1;
}

.panel-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.glass-panel h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.glass-panel p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.learn-more {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.glass-panel:hover .learn-more {
    gap: 10px;
    text-shadow: 0 0 10px var(--primary);
}

/* ==========================================================================
   TILT CARDS (Serviços / Equipe)
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.tilt-card {
    border-radius: 20px;
    overflow: hidden;
    background: rgba(10, 12, 25, 0.6);
    border: 1px solid var(--glass-border);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.tilt-card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.tilt-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.tilt-card:hover .tilt-card-img img {
    transform: scale(1.08);
    filter: brightness(0.8) saturate(1.3);
}

.tilt-card-content {
    padding: 2rem;
}

.tilt-card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.tilt-card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Botão "Ver Exame" nos cards */
.btn-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
    padding-bottom: 3px;
    transition: all 0.3s;
}

.btn-card:hover {
    color: #fff;
    border-color: #fff;
}

/* ==========================================================================
   BOTÃO PREMIUM (CTA / Glass Nav)
   ========================================================================== */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.5rem;
    border-radius: 100px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-highlight);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: 0.6s ease;
}

.btn-premium:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--glow-spread);
    transform: translateY(-3px);
    background: var(--bg-surface-hover);
}

.btn-premium:hover::after {
    left: 150%;
}

.btn-premium.pulse {
    animation: btnPulse 3s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(0, 240, 255, 0); }
    50%       { box-shadow: 0 0 20px rgba(0, 240, 255, 0.3); }
}

/* ==========================================================================
   FLOATING CARD (Sobre — CAP/CLIA)
   ========================================================================== */
@keyframes floatBox {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}

/* ==========================================================================
   FORMULÁRIO E CONTACTO
   ========================================================================== */
.form-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(20px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.03);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.08);
}

.form-control::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

/* Mapa */
.map-frame {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 16px;
    filter: grayscale(0.5) invert(0.1);
}

/* ==========================================================================
   BLOBS DE FUNDO (index usa .bg-blob)
   ========================================================================== */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.blob-primary {
    background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, transparent 70%);
}

.blob-secondary {
    background: radial-gradient(circle, rgba(164, 92, 255, 0.05) 0%, transparent 70%);
}

/* Nav logo styling for index (div.logo, not a.logo) */
.pill-nav .logo {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    text-decoration: none !important;
}

.pill-nav .logo span {
    color: var(--primary) !important;
}



/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: 1fr 1fr; }
    .sobre-grid    { grid-template-columns: 1fr; gap: 3rem; }
    .contato-grid  { grid-template-columns: 1fr; }
    .bento-grid-top    { grid-template-columns: 1fr; }
    .bento-grid-bottom { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .services-grid     { grid-template-columns: 1fr; }
    .bento-grid-bottom { grid-template-columns: 1fr; }
    .sobre-content-mobile { padding-left: 0 !important; margin-top: 2rem; }
    #cursor, #cursor-blur { display: none !important; }
    * { cursor: auto !important; }
}

