/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  :root {
    /* Original design color palette - Blue and Coral theme */
    /* --primary: 220 70% 50%; */      /* Deep blue */
    --primary: 0 93% 2%;      /* Black */
    --primary-foreground: 0 0% 98%;
    /* --secondary: 240 5% 96%; */
    --secondary: 43 100% 44%;
    --secondary-foreground: 240 6% 10%;
    /* --accent: 14 90% 65%; */        /* Coral accent */
    --accent: 43 100% 44%;        /* Orange accent */
    --accent-foreground: 0 0% 98%;
    --muted: 240 5% 96%;
    --muted-foreground: 240 4% 46%;
    --background: 0 0% 100%;
    --foreground: 240 10% 4%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 4%;
    --border: 240 6% 90%;
    --input: 240 6% 90%;
    --ring: 220 70% 50%;
    
    /* Gradients */
    /* --gradient-primary: linear-gradient(135deg, hsl(var(--primary)), hsl(14 90% 65%)); */
    --gradient-primary: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    --gradient-subtle: linear-gradient(180deg, hsl(var(--background)), hsl(240 5% 98%));
    
    /* Shadows */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-strong: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px hsl(var(--accent) / 0.3);
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    scroll-behavior: smooth;
  }

  ul {
    list-style: none;
  }

  li:before {
    content: "";
    display: inline-block;
    height: 2px;
    width: 10px;
    background-color: #D18B00;
    margin-right: 4px;
    margin-top: 1em; /* 14px */
    vertical-align: top;
  }

  .services-list li:before {
    margin-top: 1.2em;
  }

  li > span {
    display: inline-block;
    width: calc(100% - 14px);
    vertical-align: top;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
  }
  
  .icon {
    width: 1.25rem;
    height: 1.25rem;
  }
  
  /* Header */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    background: hsla(var(--background) / 0.8);
    border-bottom: 1px solid hsl(var(--border));
  }
  
  .header.scrolled {
    background: hsla(var(--background) / 0.95);
    border-bottom-color: hsl(var(--border));
  }
  
  .nav-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .logo h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }

  .logo  {
    width: 25px;
    height: 100%;
    line-height: 0;
  }

  header #cont_select_idioma_top  {
    position: absolute;
    right: 0;
    top: 0;  
  }

  header #cont_select_idioma_top ul { list-style: none; text-align: right; padding: 5px 2rem; margin: 0; }
  header #cont_select_idioma_top ul li:before { display: none; }
  header #cont_select_idioma_top ul li { list-style: none; display: inline; margin-left: 10px;}
  header #cont_select_idioma_top,
  header #cont_select_idioma_top ul li a { color:inherit; font-size: 0.9em; text-decoration: none; }
  header #cont_select_idioma_top ul li a.actiu { color: #D18B00; }
  
  .nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
  }
  
  .nav-link {
    text-decoration: none;
    color: hsl(var(--foreground));
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
  }
  
  .nav-link:hover {
    color: hsl(var(--primary));
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: hsl(var(--primary));
    transition: width 0.3s ease;
  }
  
  .nav-link:hover::after {
    width: 100%;
  }
  
  .mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
  }
  
  .mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: hsl(var(--foreground));
    transition: var(--transition-smooth);
  }
  
  /* Hero Section */
  .hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
  }
  
  .hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
      hsl(var(--background)) 0%, 
      hsl(var(--background)) 50%, 
      hsl(var(--primary) / 0.05) 100%);
  }
  
  .hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 10;
  }
  
  .hero-text {
    animation: slideUp 0.8s ease-out;
  }
  
  .hero-subtitle {
    font-weight: 500;
    /* text-transform: uppercase; */
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
  }
  
  .hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
  }
  
  .gradient-text {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: block;
    margin-top: 0.5rem;
  }
  
  .hero-description {
    font-size: 1.25rem;
    color: hsl(var(--muted-foreground));
    max-width: 28rem;
    line-height: 1.7;
    margin-bottom: 2rem;
  }
  
  .hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1rem;
  }
  
  .btn-primary {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    box-shadow: var(--shadow-soft);
  }
  
  .btn-primary:hover {
    background: hsl(var(--accent) / 0.9);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
  }
  
  .btn-outline {
    border-color: hsl(var(--accent));
    color: hsl(var(--accent));
    background: transparent;
  }
  
  .btn-outline:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    transform: translateY(-2px);
  }
  
  .btn-full {
    width: 100%;
    justify-content: center;
  }
  
  .social-links {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
  }
  
  .social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: transparent;
    color: hsl(var(--muted-foreground));
    transition: var(--transition-smooth);
    text-decoration: none;
  }
  
  .social-btn:hover {
    color: hsl(var(--accent));
    background: hsl(var(--accent) / 0.1);
    transform: scale(1.1);
  }
  
  .hero-image {
    animation: fadeIn 0.8s ease-out 0.3s both;
  }
  
  .image-container {
    position: relative;
  }
  
  .image-container img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: var(--shadow-strong);
    transition: var(--transition-smooth);
  }
  
  .image-container:hover img {
    transform: translateY(-8px);
  }
  
  .floating-element {
    position: absolute;
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
  }
  
  .element-1 {
    top: -1rem;
    right: -1rem;
    width: 5rem;
    height: 5rem;
    background: hsl(var(--accent) / 0.2);
  }
  
  .element-2 {
    bottom: -1.5rem;
    left: -1.5rem;
    width: 4rem;
    height: 4rem;
    background: hsl(var(--primary) / 0.3);
    animation-delay: 2s;
  }
  
  .scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: fadeIn 0.8s ease-out 0.6s both;
  }
  
  .scroll-btn {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition-smooth);
    animation: bounce 2s infinite;
  }
  
  .scroll-btn:hover {
    color: hsl(var(--accent));
    animation: none;
  }
  
  /* Section Styles */
  .section-header {
    text-align: center;
    margin-bottom: 4rem;
  }
  
  .section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }
  
  .section-description {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.7;
  }
  
  /* Services */
  #services ul {
    width: 45%;
    margin: 0 auto;
  }

  /* About Section */
  .about {
    padding: 6rem 0;
    background: hsl(var(--muted) / 0.3);
  }
  
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
  }
  
  .skill-card {
    background: hsl(var(--card));
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid hsl(var(--border));
  }
  
  .skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
  }
  
  .skill-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.5rem;
    color: hsl(var(--accent));
  }
  
  .skill-icon svg {
    width: 100%;
    height: 100%;
  }
  
  .skill-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
  }
  
  .skill-card p {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
  }
  
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
  }
  
  .stat-card {
    text-align: center;
    padding: 2rem;
  }
  
  .stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: hsl(var(--accent));
    margin-bottom: 0.5rem;
  }
  
  .stat-label {
    color: hsl(var(--muted-foreground));
    font-weight: 500;
  }
  
  /* Projects Section */
  .projects {
    padding: 6rem 0;
  }

  /* Projects Lab */
  .projects-lab {
    padding: 6rem 0;
    background: hsl(var(--muted) / 0.3);
  }

  .project-zooms {
    display: none;
  }
  
  /* .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
  } */

  .projects-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .projects-grid > * {
    flex: 0 1 350px; /* amplada mínima 350px */
  }
  
  .project-card {
    background: hsl(var(--card));
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid hsl(var(--border));
  }
  
  .project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
  }

  .project-card ul {
    margin: -0.5em 1em 1.5em 0em;
    color: hsl(var(--muted-foreground));
  }
  
  .project-image {
    position: relative;
    overflow: hidden;
  }
  
  .project-image img {
    width: 100%;
    height: 365px;
    object-fit: cover;
    transition: var(--transition-smooth);
    border-bottom: 2px solid hsl(var(--border));
  }
  
  .project-card:hover .project-image img {
    transform: scale(1.05);
  }
  
  .project-content {
    padding: 1.5rem;
  }
  
  .project-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }
  
  .project-content p {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
    line-height: 1.6;
  }
  
  .project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }
  
  .tag {
    background: hsl(var(--accent) / 0.1);
    color: hsl(var(--accent));
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .project-links {
    display: flex;
    gap: 1rem;
  }
  
  .project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: hsl(var(--primary));
    text-decoration: none;
    border: 1px solid hsl(var(--primary) / 0.3);
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--transition-smooth);
  }
  
  .project-link:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
  }

  .fancybox-close {
    top: -6px!important;
    right: -38px!important;
  }
  
  /* Contact Section */
  .contact {
    padding: 6rem 0;
    background: hsl(var(--muted) / 0.3);
  }
  
  .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
  }
  
  .contact-form {
    background: hsl(var(--card));
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid hsl(var(--border));
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: hsl(var(--foreground));
  }
  
  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: var(--transition-smooth);
    font-family: inherit;
  }
  
  .form-group input:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: hsl(var(--accent));
    box-shadow: 0 0 0 3px hsl(var(--accent) / 0.1);
  }
  
  .form-group textarea {
    resize: vertical;
    min-height: 120px;
  }
  
  .contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: hsl(var(--card));
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid hsl(var(--border));
  }
  
  .contact-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: hsl(var(--accent));
    flex-shrink: 0;
  }
  
  .contact-icon svg {
    width: 100%;
    height: 100%;
  }
  
  .contact-details h3 {
    font-weight: 600;
    margin-bottom: 0.25rem;
  }
  
  .contact-details p {
    color: hsl(var(--muted-foreground));
  }

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

  .contact-details a:hover {
    text-decoration: underline;
  }
  
  .cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: hsl(var(--card));
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid hsl(var(--border));
  }
  
  .cta-section h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }
  
  .cta-section p {
    color: hsl(var(--muted-foreground));
    margin-bottom: 2rem;
    line-height: 1.6;
  }
  
  /* Footer */
  .footer {
    background: hsl(var(--foreground));
    color: hsl(var(--background));
    padding: 0 0 1rem 0 0;
  }
  
  .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
  }

  footer nav.menu_inferior {
    margin-top: 0.5em;
    text-align: center;
  }
  
  footer nav.menu_inferior ul#menu_footer,
  footer nav.menu_inferior ul#menu_footer_mobile  {
    margin: 0;
    padding: 0;	
  }

  footer nav.menu_inferior ul#menu_footer li:before{
      display: none;
  }

  footer nav.menu_inferior ul#menu_footer li,
  footer nav.menu_inferior ul#menu_footer_mobile li {
    display: inline;
    font-size: 0.85rem;
    padding-right: 0.5em;
  }
  
  footer nav.menu_inferior ul#menu_footer li a,
  footer nav.menu_inferior ul#menu_footer_mobile li a {
    font-size: 1rem;
    text-decoration: none;
    color: #bbb;
  }
  
  footer nav.menu_inferior ul#menu_footer li a:hover {
    /* color: hsl(var(--accent)); */
    text-decoration: underline;
  }
  
  .footer-section h3,
  .footer-section h4 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: hsl(var(--background));
  }
  
  .footer-section p {
    color: hsl(var(--background) / 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  .footer-social {
    display: flex;
    gap: 1rem;
  }
  
  .footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: hsl(var(--background) / 0.8);
    transition: var(--transition-smooth);
  }
  
  .footer-social a:hover {
    color: hsl(var(--accent));
    transform: scale(1.1);
  }
  
  .footer-links,
  .footer-contact {
    list-style: none;
  }
  
  .footer-links li,
  .footer-contact li {
    margin-bottom: 0.5rem;
  }
  
  .footer-links a {
    color: hsl(var(--background) / 0.8);
    text-decoration: none;
    transition: var(--transition-smooth);
  }
  
  .footer-links a:hover {
    color: hsl(var(--accent));
  }
  
  .footer-contact li {
    color: hsl(var(--background) / 0.8);
  }
  
  .footer-bottom {
    text-align: center;
    padding-top: .5rem;
    padding-bottom: .5rem;
    border-top: 1px solid hsl(var(--background) / 0.2);
    color: hsl(var(--background) / 0.6);
  }

  .services-list li {
    padding-bottom: 1em;
  }

  .services-list li::marker {
    color: hsl(var(--accent));
    margin-bottom: -4px;
  }

  #banner-politica-cookies {
    display: block;
    position: fixed;
    bottom: 30px;
    left: 30px;
    right: 0;
    width: 40%;
    background-color: rgb(200 200 200 / 90%);
    height: auto;
    color: #000;
    font-size: 0.875rem;
    z-index: 5000;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding: 1rem;
    box-sizing: border-box;
    border-radius: 15px;
  }
  
  #banner-politica-cookies .wrapper-cookies {
    margin: 0 auto 0 auto;
    max-width: 680px;
  }
  #banner-politica-cookies a {
    color: #B1005C;
    text-decoration: underline;
  }
  #banner-politica-cookies .btn {
    clear: both;
    display: block;
    margin: 15px 0 0 0;
    padding: 0;
    text-align: center;
  }
  #banner-politica-cookies .btn a {
    font-weight: bold;
    text-transform: uppercase;
    color: #272727;
    background-color: #aaa;
    padding: 5px 10px;
    text-decoration: none;
  }
  #banner-politica-cookies .btn:hover a {
    background-color: #bdbdbd;
  }
  
  /* Animations */
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes float {
    0%, 100% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-20px);
    }
  }
  
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-10px);
    }
    60% {
      transform: translateY(-5px);
    }
  }
  
  /* Responsive Design */
  @media (max-width: 1024px) {
    .hero-content {
      grid-template-columns: 1fr;
      gap: 3rem;
      text-align: center;
    }
    
    .hero-text {
      padding-top: 100px;
    }

    .hero-title {
      font-size: 3rem;
    }

    .hero-description {
      justify-content: center;
      max-width: 100%;
      padding: 0 2em;
    }
    .hero-buttons {
      justify-content: center;
    }
    
    .contact-content {
      grid-template-columns: 1fr;
      gap: 2rem;
    }

    /* Services */
    #services ul {
      width: 60%;
      margin: 0 auto;
    }
  }
  
  @media (max-width: 768px) {
    .hero-text {
      padding-top: 100px;
    }

    .nav-links {
      display: none;
    }
    
    .mobile-menu-btn {
      display: flex;
    }
    
    .hero-title {
      font-size: 2.5rem;
    }
    
    .hero-description {
      font-size: 1.125rem;
    }
    
    .hero-buttons {
      flex-direction: column;
      align-items: center;
    }
    
    .section-title {
      font-size: 2.5rem;
    }
    
    .skills-grid {
      grid-template-columns: 1fr;
    }
    
    .projects-grid {
      grid-template-columns: 1fr;
    }
    
    .stats-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
      grid-template-columns: 1fr;
      text-align: center;
    }

    #banner-politica-cookies {
      width: auto;
      right: 15px;
      left: 15px;
    }

    /* Services */
    #services ul {
      width: 80%;
      margin: 0 auto;
    }
  }
  
  @media (max-width: 480px) {
    .hero-text {
      padding-top: 100px;
    }

    .container {
      padding: 0 1rem;
    }
    
    .nav-container {
      padding: 1rem;
    }
    
    .hero-title {
      font-size: 2rem;
    }
    
    .section-title {
      font-size: 2rem;
    }
    
    .stats-grid {
      grid-template-columns: 1fr;
    }

    header #cont_select_idioma_top {
      padding-right: 0;
    }
    header #cont_select_idioma_top ul {
      padding: 5px 1rem;  
    }
    
  }