* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #22c55e;
    --secondary: #16a34a;
    --dark: #0f172a;
    --light: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: var(--light);
    overflow-x: hidden;
    background-image: url('images/girona.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--dark);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 24px;
    font-weight: bold;
    color: var(--white);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo:hover .logo-img {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.logo span {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo small {
    display: block;
    font-size: 12px;
    color: var(--white);
    margin-top: 2px;
    letter-spacing: 1px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-list a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-list a:hover {
    color: var(--primary);
}

.nav-list a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: 0.3s ease;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: var(--text);
    min-height: 80vh;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-logo-bg {
    width: 490px;
    height: 490px;
    object-fit: contain;
    opacity: 1;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    25% {
        opacity: 1;
        transform: scale(1.02);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    75% {
        opacity: 1;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    animation: fadeInLeft 0.8s ease;
    text-align: center;
    padding: 0 20px;
}

.hero-title {
    display: none;
}

.hero-subtitle {
    display: none;
}

.hero-tagline {
    display: none;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.hero-buttons {
    display: flex;
    gap: 20px;
    animation: fadeIn 1s ease 0.6s both;
    justify-content: center;
    margin-top: 120px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #000000;
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #000000;
    border: 2px solid #000000;
}

.btn-secondary:hover {
    background: #000000;
    color: var(--white);
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

/* Sections */
.section {
    padding: 80px 0;
    position: relative;
}

.section h2 {
    font-size: 48px;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 40px;
}

/* Qui Som */
.qui-som {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(22, 163, 74, 0.05) 100%);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(34, 197, 94, 0.2);
    border-top: 4px solid var(--primary);
}

.card-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text);
}

.card p {
    color: var(--text-light);
    line-height: 1.6;
}

.premsa {
    background: var(--white);
}

.press-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* smaller cards */
    gap: 20px;
    margin-top: 30px;
}

.article-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: slideUp 0.6s ease;
}

.article-card.hidden {
    display: none;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.article-image {
    position: relative;
    height: 150px; /* reduced height */
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.header-date {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.article-image iframe,
.article-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-image video {
    background: #000; /* black background when video not loaded */
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(22, 163, 74, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px; /* smaller icon */
    color: var(--white);
    animation: zoomIn 0.6s ease;
}

/* allow actual image inside article-image */
.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes zoomIn {
    from {
        transform: scale(1.1);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.article-image:hover .image-placeholder {
    animation: zoomOut 0.3s ease forwards;
}

@keyframes zoomOut {
    to {
        transform: scale(1.1);
    }
}

.article-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--dark); /* match header background */
    color: var(--white); /* white text */
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.article-tag.tv-tag {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}
.article-tag.tv-tag {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.tag-below {
    position: static !important;
    display: inline-block;
    margin: 8px 0 4px 0;
    background: var(--dark); /* same as header */
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    text-align: left;
}

.article-card h3 {
    padding: 15px 15px 8px;
    font-size: 18px; /* smaller heading */
    color: var(--text);
    line-height: 1.4;
}

.article-date {
    padding: 0 15px;
    font-size: 12px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 5px;
}

.article-card p {
    padding: 0 20px 15px;
    color: var(--text-light);
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin: 0 20px 20px;
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.read-more:hover {
    transform: translateX(5px);
}

/* Botiga */
.botiga {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
}

.botiga-container {
    display: grid;
    grid-template-columns: 1fr auto; /* second column only as wide as its content */
    gap: 50px;
    align-items: center;
    margin-top: 40px;
    animation: fadeIn 0.8s ease;
}

.botiga-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); /* 1.5× wider items */
    gap: 20px;
}

.product-item {
    background: var(--white);
    padding: 30px; /* bumped padding to provide space around larger image */
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-item:hover {
    transform: scale(1.05) rotateY(5deg);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3; /* o 1 / 1 si la vols més quadrada */
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px; /* espai interior perquè no toqui vores */
    box-sizing: border-box;
}

.product-image img {
    width: 50%;
    height: 50%;
    object-fit: contain; /* mostra la imatge completa */
    object-position: center;
    display: block;
    margin: 0 auto;
}


/* scale the entire square when hovered so it grows with the image */
.product-image {
    transition: transform 0.3s ease;
}

.product-image:hover {
    transform: scale(2);
    z-index: 10; /* keep above neighbors while enlarged */
}

/* On small screens, keep product images contained and disable hover scaling */
@media (max-width: 768px) {
    .botiga-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .product-image {
        height: 180px;
    }

    .product-image:hover {
        transform: none;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.product-item p {
    font-weight: bold;
    color: var(--text);
}

.botiga-link {
    display: flex;
    justify-content: flex-end; /* push link to the right edge of column */
    align-items: center;
    position: relative; /* for absolute icon positioning */
}

.botiga-link .btn {
    position: relative;
    padding-right: 30px; /* leave space for icon inside */
}

.botiga-link .btn i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Contacte */
.contacte {
    background: var(--white);
}

/* PDF presentation section */
.presentacio .pdf-viewer {
    width: 100%;
    height: 600px;
    border: 1px solid var(--text-light);
    margin-bottom: 15px;
}

.presentacio .pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 40px 0;
}

.contact-info h3,
.social-links h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--text);
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    animation: slideUp 0.6s ease;
}

.contact-item i {
    font-size: 28px;
    color: var(--primary);
    min-width: 40px;
}

.contact-item strong {
    display: block;
    color: var(--text);
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--text-light);
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    text-decoration: underline;
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
}

.social-icon.facebook {
    background: #3b5998;
    color: var(--white);
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: var(--white);
}

.social-icon.twitter {
    background: #1DA1F2;
    color: var(--white);
}

.social-icon.youtube {
    background: #FF0000;
    color: var(--white);
}

.social-icon.tiktok {
    background: #000000;
    color: var(--white);
}

.social-icon:hover {
    filter: brightness(1.2);
}

.contact-form {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(22, 163, 74, 0.05));
    padding: 40px;
    border-radius: 15px;
    margin-top: 50px;
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--text);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.contact-form button {
    width: 100%;
    margin-top: 10px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    animation: slideUp 0.6s ease;
}

.footer-tagline {
    margin-top: 10px;
    font-size: 18px;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 50px 0;
        min-height: 70vh;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-image {
        height: 250px;
    }

    .hero-logo {
        max-width: 90%;
    }

    .nav-list {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-list.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 20px;
        background: var(--dark);
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        z-index: 999;
    }

    .section h2 {
        font-size: 36px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .botiga-container {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Particles Background */
.particles {
    display: none;
}

.particle {
    display: none;
}
