/* 
   Amunt i Avall - Disseny Premium de Treballs Verticals i d'Altura
   Full d'estils CSS principal
*/

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

/* Variables de Disseny */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f4f7fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    
    --primary: #ea580c; /* Taronja de seguretat */
    --primary-hover: #c2410c;
    --primary-glow: rgba(234, 88, 12, 0.15);
    
    --accent: #3a6b8c; /* Blau acer de les lletres del logo */
    --accent-glow: rgba(58, 107, 140, 0.15);
    
    --text-main: #0d2235; /* Blau marí fosc del logo */
    --text-muted: #4b5d6c;
    
    --border-color: rgba(58, 107, 140, 0.12);
    --border-hover: rgba(234, 88, 12, 0.4);
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --max-width: 1200px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

ul {
    list-style: none;
}

/* Contenidor general */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    width: 100%;
}

/* NAVEGACIÓ (HEADER) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    padding: 1.5rem 0;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(13, 34, 53, 0.06);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-main);
}

.logo-img {
    height: 125px; /* Mida gran de benvinguda a l'inici per llegir la lletra petita */
    width: auto;
    display: inline-block;
    vertical-align: middle;
    transition: var(--transition-smooth);
}

/* Mida reduïda quan es fa scroll down */
.header.scrolled .logo-img {
    height: 65px;
}

.logo-img:hover {
    transform: scale(1.30); /* Incrementat al 1.70 per a un zoom de gran impacte en hover */
}

@media (max-width: 768px) {
    .logo-img {
        height: 85px; /* Mida inicial continguda a mòbils */
    }
    .header {
        padding: 0.8rem 0;
    }
    .header.scrolled .logo-img {
        height: 52px; /* Mida scroll a mòbils per llegir-se bé */
    }
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 8px;
    color: #000;
    font-weight: 900;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.logo span {
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span.highlight {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(234, 88, 12, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

/* HERO SECTION */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 200px;
    padding-bottom: 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    filter: brightness(0.95) contrast(1.05);
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(234, 88, 12, 0.05), transparent 50%),
                linear-gradient(to bottom, var(--bg-primary) 0%, transparent 20%, transparent 80%, var(--bg-primary) 100%),
                linear-gradient(to right, var(--bg-primary) 0%, rgba(255, 255, 255, 0.85) 60%, transparent 100%);
}

.hero .container {
    z-index: 2;
}

.hero-content {
    max-width: 650px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(234, 88, 12, 0.1);
    border: 1px solid rgba(234, 88, 12, 0.3);
    color: var(--primary);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    max-width: 100%;
    box-sizing: border-box;
}

.badge-new span {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--primary);
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-main) 60%, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

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

/* INTRO / SOBRE NOSALTRES */
.section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-subtitle {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    display: block;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

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

/* SOBRE NOSALTRES INFO */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature-badge:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.feature-badge-icon {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.feature-badge h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

.feature-badge p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* SOBRE NOSALTRES FOTO O DETALL TÈCNIC */
.about-visual {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 400px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.about-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 15, 25, 0.9) 10%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.stat-box {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
}

/* SERVEIS (ELS 2 GRANS APARTATS) */
.services-panels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 1rem;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(13, 34, 53, 0.03);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.panel:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px rgba(13, 34, 53, 0.08), 0 0 30px var(--primary-glow);
}

.panel-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: inline-block;
    background: rgba(234, 88, 12, 0.08);
    width: 4.5rem;
    height: 4.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(234, 88, 12, 0.15);
}

.panel-2 .panel-icon {
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(58, 107, 140, 0.15);
}

.panel-2::before {
    background: linear-gradient(to right, var(--accent), #facc15);
}

.panel:hover::before {
    height: 6px;
}

.panel-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.panel-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.service-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.service-check {
    margin-top: 0.25rem;
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-2 .service-check {
    color: var(--accent);
}

.service-item-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.service-item-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* SEGURETAT */
.security-banner {
    background: linear-gradient(135deg, var(--accent), var(--text-main));
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    overflow: hidden;
    position: relative;
    color: #ffffff;
}

.security-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    pointer-events: none;
}

.security-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.security-desc {
    color: #cbd5e1;
    margin-bottom: 2rem;
}

.security-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.security-icon {
    color: var(--accent);
    font-size: 1.2rem;
}

.security-shield {
    display: flex;
    justify-content: center;
    align-items: center;
}

.shield-graphic {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(234, 88, 12, 0.2);
    position: relative;
    animation: rotate 20s linear infinite;
}

.shield-graphic-inner {
    width: 120px;
    height: 120px;
    background: var(--bg-primary);
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 3rem;
    box-shadow: 0 0 30px var(--primary-glow);
    animation: counterRotate 20s linear infinite;
}

/* CONTACTE / PRESSUPOST */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-info-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.contact-info-desc {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

/* Targeta Telèfon */
.phone-card .contact-card-icon {
    background: rgba(234, 88, 12, 0.06);
    border: 1px solid rgba(234, 88, 12, 0.12);
    color: var(--primary);
}

.phone-card:hover {
    border-color: var(--primary) !important;
    background: rgba(234, 88, 12, 0.03) !important;
}

.phone-card:hover .contact-card-icon {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

/* Targeta Correu */
.email-card .contact-card-icon {
    background: var(--accent-glow);
    border: 1px solid rgba(58, 107, 140, 0.12);
    color: var(--accent);
}

.email-card:hover {
    border-color: var(--accent) !important;
    background: rgba(58, 107, 140, 0.03) !important;
}

.email-card:hover .contact-card-icon {
    background: var(--accent) !important;
    color: #ffffff !important;
    border-color: var(--accent) !important;
}

/* Targeta WhatsApp */
.whatsapp-card .contact-card-icon {
    background: rgba(37, 211, 102, 0.06);
    border: 1px solid rgba(37, 211, 102, 0.12);
    color: #25D366;
}

.whatsapp-card:hover {
    border-color: #25D366 !important;
    background: rgba(37, 211, 102, 0.03) !important;
}

.whatsapp-card:hover .contact-card-icon {
    background: #25D366 !important;
    color: #ffffff !important;
    border-color: #25D366 !important;
}

.contact-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.contact-card-content h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.contact-card-content p {
    font-weight: 600;
    font-size: 1.1rem;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* FORMULARI */
.quote-form-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 20px 45px rgba(13, 34, 53, 0.05);
}

.quote-form-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(13, 34, 53, 0.05), rgba(255, 255, 255, 0.02) 50%, rgba(234, 88, 12, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    max-width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    background: #ffffff;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* File input customizer */
.file-upload-wrapper {
    position: relative;
    cursor: pointer;
    max-width: 100%;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px dashed var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.file-upload-wrapper:hover .file-upload-trigger {
    border-color: var(--primary);
    color: var(--text-main);
    background: rgba(234, 88, 12, 0.02);
}

.file-upload-name {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 0.5rem;
    text-align: center;
    display: none;
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
    animation: fadeInUp 0.5s forwards;
}

.success-icon {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* FOOTER */
.footer {
    background-color: #eef2f5;
    border-top: 1px solid var(--border-color);
    padding: 50px 0 30px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-divider {
    height: 1px;
    background-color: var(--border-color);
    margin-bottom: 1.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* MOBIL MENU TOGGLE */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition-smooth);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -7px);
}

/* ANIMACIONS KEYFRAMES */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(234, 88, 12, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(234, 88, 12, 0);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes counterRotate {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-visual {
        height: 350px;
    }
    
    .services-panels {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .security-banner {
        grid-template-columns: 1fr;
        padding: 3rem;
        gap: 3rem;
    }
    
    .security-shield {
        justify-content: flex-start;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        padding: 2rem;
        transition: var(--transition-smooth);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        border-left: 1px solid var(--border-color);
        transform: translateX(100%);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .security-banner {
        padding: 2rem 1.5rem;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .quote-form-container {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

/* BOTÓ FLOTANT DE WHATSAPP */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 50px;
    right: 30px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(18, 140, 126, 0.6);
}

.whatsapp-float svg {
    fill: currentColor;
    width: 32px;
    height: 32px;
}

/* Targeta WhatsApp a la secció de contacte */
.whatsapp-card {
    transition: var(--transition-smooth);
}

.whatsapp-card:hover {
    border-color: #25D366 !important;
    background: rgba(37, 211, 102, 0.05) !important;
}

.whatsapp-card:hover .contact-card-icon {
    background: #25D366 !important;
    color: white !important;
    border-color: #25D366 !important;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 40px;
        right: 20px;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

/* Ajustaments per a dispositius mòbils molt estrets o optimització de visualització real */
@media (max-width: 576px) {
    .badge-new {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        display: inline-flex;
        flex-wrap: wrap;
        border-radius: 20px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .contact-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    .contact-card-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    .contact-card-content p {
        font-size: 0.9rem;
    }
}

