/* ==========================================
   FOOTER
========================================== */
.footer {
    background: linear-gradient(135deg, var(--color-principal) 0%, var(--color-secundari) 100%);
    color: var(--color-white);
    padding: 4rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="1.5" fill="white" opacity="0.15"/><circle cx="40" cy="70" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="80" r="2.5" fill="white" opacity="0.08"/><circle cx="10" cy="60" r="1.8" fill="white" opacity="0.12"/></svg>') repeat;
    animation: sparkle 20s linear infinite;
}

@keyframes sparkle {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    font-family: 'Comfortaa', sans-serif !important;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--color-cta);
    border-radius: 2px;
}

.footer-logo-svg {
    height: 90px;
    width: auto;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.footer-logo-svg:hover {
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

.footer-description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-family: 'Comfortaa', sans-serif !important;
    margin-bottom: 1.5rem;
}

/* ==========================================
   ENLLAÇOS DEL FOOTER - SOLUCIÓ DEFINITIVA
========================================== */

/* Resetem qualsevol estil que pugui estar interferint */
.footer-section a.footer-link {
    /* Reset total */
    all: unset;
    
    /* Estils base */
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-family: 'Comfortaa', sans-serif !important;
    cursor: pointer !important;
    
    /* Display i posicionament */
    display: block !important;
    position: relative !important;
    
    /* Padding amb espai per la fletxa */
    padding: 0.5rem 0 0.5rem 2rem !important;
    margin: 0 !important;
    
    /* Transició */
    transition: all 0.3s ease !important;
}

/* Fletxa abans de l'enllaç */
.footer-section a.footer-link::before {
    content: '▸' !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--color-cta) !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    transition: all 0.3s ease !important;
}

/* Hover de l'enllaç */
.footer-section a.footer-link:hover {
    color: var(--color-white) !important;
    padding-left: 2.5rem !important;
}

/* Hover de la fletxa */
.footer-section a.footer-link:hover::before {
    color: var(--color-white) !important;
    transform: translateY(-50%) translateX(5px) !important;
}

/* ==========================================
   CONTACTE
========================================== */
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
    transition: var(--transition-smooth);
}

.footer-contact-item:hover {
    color: var(--color-white);
    transform: translateX(5px);
}

.footer-contact-item i {
    color: var(--color-cta);
    width: 20px;
    text-align: center;
    transition: var(--transition-bounce);
}

.footer-contact-item:hover i {
    transform: scale(1.2);
}

/* Enllaços de contacte */
.footer-contact-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-contact-item a:hover {
    color: var(--color-white);
}

/* ==========================================
   XARXES SOCIALS
========================================== */
/* Iconos de redes sociales en el footer */
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
}

/* Colores específicos por red social */
.social-link:nth-child(1):hover {
    /* Instagram - Gradiente */
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-link:nth-child(2):hover {
    /* Temperatura */
    background: linear-gradient(135deg, #3498db, #e67e22);
    color: white;
}

.social-link:nth-child(3):hover {
    /* Email */
    background: #ea4335;
    color: white;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ==========================================
   FOOTER BOTTOM
========================================== */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal-links {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-family: 'Comfortaa', sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    left: 0;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-family: 'Comfortaa', sans-serif !important;
    transition: var(--transition-smooth);
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block;
}

.footer-legal-links a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.footer-legal-links .separator {
    color: rgba(255, 255, 255, 0.5);
    user-select: none;
    margin: 0;
    padding: 0;
}

.footer-made-with {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-family: 'Comfortaa', sans-serif !important;
}

.heart {
    color: var(--color-cta);
    animation: heartbeat 2s ease-in-out infinite;
}

.footer-temp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #e67e22);
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.footer-temp-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .footer {
        padding: 3rem 1.5rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: left;
    }
    
    .footer-section h3::after {
        left: 0;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* ==========================================
   DEVELOPER CREDIT BAR - Andreu Pujol
========================================== */

.developer-credit-bar {
    position: relative;
    width: 100%;  /* ← CANVIAT: Ara és 100% del contenidor, no viewport */
    display: flex;
    justify-content: center;  /* ← NOU: Centra el contingut */
    align-items: center;
    margin-top: 25px;
    margin-bottom: 0 !important;
    padding: 15px 0 0 0;  /* ← CANVIAT: Reduït padding inferior de 15px a 10px */
    overflow: visible;  /* ← CANVIAT: Per veure l'ombra */
}

.credit-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #1a252f 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3),
                0 0 20px rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
    transform: scale(0.75);
    transform-origin: center;
}

.credit-content:hover {
    transform: scale(0.77) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(52, 152, 219, 0.4);
}

.credit-copyright {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    letter-spacing: 0.3px;
    font-family: 'Comfortaa', sans-serif;
    white-space: nowrap;
    padding-right: 4px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.credit-separator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #e67e22 20%, 
        #3498db 50%, 
        #e67e22 80%, 
        transparent 100%
    );
    background-size: 200% 100%;
    animation: lineFlow 3s linear infinite;
    border-radius: 50px 50px 0 0;  /* ← NOU: Segueix la forma */
}

.credit-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.credit-icon {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
    animation: iconPulse 2s ease-in-out infinite;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.credit-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.credit-link {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    padding: 2px 8px;
    border-radius: 4px;
}

.credit-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #27ae60, #3498db);
    transition: width 0.4s ease;
}

.credit-link:hover {
    color: #3498db;
    text-shadow: 0 0 8px rgba(52, 152, 219, 0.6);
    transform: translateY(-1px);
}

.credit-link:hover::after {
    width: 100%;
}

.link-arrow {
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.credit-link:hover .link-arrow {
    transform: translateX(4px);
}

/* Partícules flotants decoratives - Des de baix cap amunt */
.credit-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    border-radius: 50px;  /* ← NOU: Respeta la forma de la càpsula */
}

.particle {
    position: absolute;
    bottom: -10px;  /* ← Comencen des de baix */
    width: 5px;
    height: 5px;
    background: rgba(52, 152, 219, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.8);
    animation: particleFloatUp 8s infinite ease-in-out;
}

/* Distribució aleatòria de les 15 partícules */
.particle:nth-child(1) {
    left: 5%;
    animation-delay: 0s;
    animation-duration: 7s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(2) {
    left: 12%;
    animation-delay: 1.5s;
    animation-duration: 9s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(3) {
    left: 20%;
    animation-delay: 0.8s;
    animation-duration: 6s;
    width: 3px;
    height: 3px;
}

.particle:nth-child(4) {
    left: 28%;
    animation-delay: 2s;
    animation-duration: 8s;
    width: 5px;
    height: 5px;
}

.particle:nth-child(5) {
    left: 35%;
    animation-delay: 0.3s;
    animation-duration: 7.5s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(6) {
    left: 42%;
    animation-delay: 1.2s;
    animation-duration: 6.5s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(7) {
    left: 50%;
    animation-delay: 2.5s;
    animation-duration: 8.5s;
    width: 5px;
    height: 5px;
}

.particle:nth-child(8) {
    left: 58%;
    animation-delay: 0.5s;
    animation-duration: 7s;
    width: 4px;
    height: 4px;
}

.particle:nth-child(9) {
    left: 65%;
    animation-delay: 1.8s;
    animation-duration: 9s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(10) {
    left: 72%;
    animation-delay: 0.9s;
    animation-duration: 6.5s;
    width: 3px;
    height: 3px;
}

/* Animació de baix cap amunt amb moviment horitzontal */
@keyframes particleFloatUp {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-80px) translateX(20px);
        opacity: 0;
    }
}

/* Animacions */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes lineFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(60px) translateX(0);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-20px) translateX(30px);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .footer-legal-links {
        justify-content: flex-start;
        font-size: 0.85rem;
    }

    .credit-text {
        font-size: 10px;
    }

    .credit-copyright {
        font-size: 10px;
    }

    .credit-icon {
        font-size: 20px;
        display: none;
    }

    .credit-content {
        padding: 8px 16px;
        border-radius: 40px;
        transform: scale(0.8);
        gap: 8px;
    }

    .developer-credit-bar {
        padding: 12px 10px 0 10px;
    }
}

@media (max-width: 480px) {
    .footer-legal-links {
        flex-direction: column;
        gap: 0.3rem;
    }

    .footer-legal-links .separator {
        display: none;
    }

    .credit-content {
        flex-direction: row;
        gap: 6px;
        padding: 6px 12px;
        border-radius: 30px;
        transform: scale(0.9);
    }

    .credit-copyright {
        font-size: 9px;
        padding-right: 6px;
    }

    .credit-text {
        text-align: center;
        font-size: 9px;
    }

    .credit-icon {
        display: none;
    }
}


/* FORÇAR eliminació total d'espais inferiors */
html {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.footer {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.footer-container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.footer-bottom {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.developer-credit-bar {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Eliminar qualsevol element que vingui després */
.developer-credit-bar ~ * {
    margin: 0 !important;
    padding: 0 !important;
    display: none !important;
}
