:root {
    --color-primary: #FF0057; /* Red/Pink accent, aggressive */
    --color-secondary: #00A9FF; /* Blue/Cyan accent, techy */
    --color-background: #11111A; /* Very dark blue/black */
    --color-text: #E0E0FF; /* Light text */
    --color-dark-element: #222233;
    --max-width: 1200px;
}

/* Base Reset and Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    /* Updated font stack for a slightly more modern, tech look */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden; /* Ensure no horizontal scroll */
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

h1, h2, h3 {
    margin-bottom: 0.5em;
    font-weight: 700;
}

h1 { font-size: 3rem; }
h2 { 
    font-size: 2.5rem; 
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}
h3 { font-size: 1.8rem; }

.content-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header & Navigation */
.main-header {
    background: rgba(17, 17, 26, 0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.logo img {
    height: 40px; 
    width: auto;
}

.desktop-nav a {
    margin-left: 1.5rem; /* Reduced spacing to fit new link */
    font-weight: bold;
    text-transform: uppercase;
}

.menu-toggle {
    display: none; /* Hide on desktop */
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav {
    display: none; /* Hidden by default */
    position: absolute;
    top: 60px; /* Adjust based on header height */
    left: 0;
    right: 0;
    background: var(--color-dark-element);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    padding: 0.75rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

/* CTA Button Style */
.cta-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: #FFF;
    font-weight: bold;
    border: 2px solid var(--color-primary);
    border-radius: 5px;
    text-transform: uppercase;
    transition: background 0.3s, transform 0.2s;
    margin-top: 1rem;
}

.cta-button:hover {
    background: transparent;
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Use a background that complements the tech theme */
    background: linear-gradient(rgba(17, 17, 26, 0.8), rgba(17, 17, 26, 0.8)), 
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="%23333344" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    background-size: cover;
    padding: 4rem 1rem;
}

.hero-content h1 {
    font-size: 4.5rem;
    letter-spacing: 5px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

.hero-content p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    color: #AAAAAA;
}

/* Services Section */
.services-section {
    padding: 4rem 1rem;
    background-color: var(--color-dark-element);
    border-top: 5px solid var(--color-primary);
}

/* New Service Groups Styling */
.specialized-services-group {
    padding: 4rem 1rem;
    text-align: center;
}

#digital-innovation, #specialized-services {
    background-color: var(--color-background);
}

#advanced-research {
    background-color: var(--color-dark-element);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sub-Service Grid Layout */
.sub-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: var(--max-width);
    margin: 2rem auto;
}

.expanded-card {
    height: auto;
    text-align: left;
}

.expanded-card p {
    font-size: 0.95rem;
    color: #CCC;
}

.detailed-list {
    max-width: 900px;
    margin: 3rem auto 0;
    text-align: left;
    padding: 1.5rem;
    border: 2px solid var(--color-secondary);
    background: #1e1e2d;
    border-radius: 8px;
}

.detailed-list h4 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.detailed-list ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.detailed-list li {
    flex-basis: calc(50% - 10px);
    padding: 0.3rem 0;
}

/* Cloud IT Services Section */
.cloud-it-services-section {
    padding: 4rem 1rem;
    background-color: var(--color-dark-element);
    border-top: 5px solid var(--color-secondary);
    border-bottom: 5px solid var(--color-secondary);
}

.cloud-it-services-section h2 {
    color: var(--color-primary);
}

.cloud-it-content {
    display: flex;
    gap: 3rem;
    align-items: center;
    background: #181825;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 169, 255, 0.2);
}

.cloud-it-content img {
    width: 45%;
    max-width: 500px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--color-secondary);
    box-shadow: 0 0 10px rgba(0, 169, 255, 0.5);
}

.cloud-it-details {
    flex: 1;
}

.cloud-it-details h3 {
    color: var(--color-secondary);
    margin-top: 0;
}

.cloud-it-details ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.cloud-it-details li {
    padding: 0.5rem 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
}

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

.xaas-item {
    background: var(--color-background);
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid var(--color-primary);
    text-align: center;
    font-weight: 600;
    color: var(--color-text);
}

.iva-notice {
    margin-top: 2rem;
    font-weight: bold;
    color: var(--color-primary);
    background: rgba(255, 0, 87, 0.1);
    padding: 0.5rem;
    border-radius: 5px;
    display: inline-block;
}

.specialized-content {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 2rem;
    background: var(--color-dark-element);
    border-radius: 10px;
    border: 1px solid rgba(0, 169, 255, 0.2);
    text-align: left;
}

.specialized-content ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.specialized-content li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.highlight {
    color: var(--color-primary);
    font-weight: bold;
}

/* Sponsors Scrolling Section */
.sponsors-section {
    background-color: var(--color-primary);
    overflow: hidden;
    padding: 0.5rem 0;
    margin: 4rem 0; /* Separator */
}

.sponsors-wrapper {
    display: block;
    width: 100%;
}

.scrolling-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-dark-element);
    padding: 0 20px;
    text-transform: uppercase;
    width: max-content; 
    display: flex;
    animation: marquee 40s linear infinite reverse; /* Reverse makes it slide right */
}

.scrolling-text span {
    white-space: nowrap;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Scrolls one unit width (50% since we duplicated the content) */
        transform: translateX(-50%); 
    }
}


/* Herrería Section */
.herrería-section {
    padding: 4rem 1rem;
    background-color: #0A0A10; /* Very deep background */
    border-top: 5px solid var(--color-secondary);
}

.herrería-section h2 {
    color: var(--color-secondary);
}

.herrería-card {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: #181825;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.herrería-card img {
    width: 40%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid var(--color-primary);
}

.herrería-details {
    flex: 1;
}

.herrería-details h3 {
    color: var(--color-primary);
    margin-top: 0;
}

.herrería-details ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.owner-info {
    font-size: 1.1rem;
    color: var(--color-text);
}

.owner-contact a {
    font-weight: bold;
    color: var(--color-primary);
}

.disclaimer {
    font-style: italic;
    font-size: 0.9rem;
    color: #AAA;
    margin-top: 1rem;
}

.services-section .subtitle {
    text-align: center;
    margin-bottom: 3rem;
    color: #CCC;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.service-card {
    background: #181825;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--color-secondary);
    border: 1px solid var(--color-secondary); /* Added subtle border on hover */
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: brightness(0.7);
}

.service-card h3 {
    color: var(--color-secondary);
    padding: 1rem 1.5rem 0;
    margin-top: 0.5rem;
}

.service-card p {
    padding: 0 1.5rem 1.5rem;
    flex-grow: 1;
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background-color: var(--color-background);
}

.about-flex {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin-top: 2rem;
}

.about-text {
    flex: 2;
}

.about-image {
    flex: 1;
    min-width: 250px;
    position: relative;
    padding-top: 1rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    border: 3px solid var(--color-secondary);
    box-shadow: 0 0 20px rgba(0, 169, 255, 0.4);
}

.trademark-info {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-left: 5px solid var(--color-primary);
    background: #1e1e2d;
}

.trademark-info h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.trademark-acronym {
    font-weight: bold;
    color: var(--color-secondary);
    font-size: 1.1em;
}

/* Founder Section */
.founder-section {
    padding: 4rem 0;
    background-color: var(--color-dark-element);
    border-top: 1px solid var(--color-dark-element);
    border-bottom: 1px solid var(--color-dark-element);
}

.founder-details {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
    padding: 2rem;
    background: #181825;
    border-radius: 10px;
}

.founder-bio {
    flex: 3;
}

.founder-bio h3 {
    color: var(--color-primary);
}

.founder-portrait {
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.portrait-placeholder {
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, var(--color-secondary), var(--color-primary));
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-background);
    border: 5px solid var(--color-text);
}

.portrait-caption {
    font-style: italic;
    color: #AAA;
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    text-align: center;
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--color-dark-element);
    background-color: #1e1e2d;
    color: var(--color-text);
    border-radius: 5px;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-secondary);
    outline: none;
}

/* Footer */
.main-footer {
    background-color: #0A0A10;
    padding: 3rem 1rem 0.5rem;
    color: #AAA;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.footer-brand img {
    height: 30px;
    margin-bottom: 0.5rem;
}

.footer-links h4,
.footer-contact h4,
.footer-legal h4 {
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-contact p {
    color: #AAA;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    font-size: 0.8rem;
    color: #777;
}

.iva-notice-footer {
    font-weight: 500;
    color: var(--color-primary);
    margin: 0.5rem 0;
}

.footer-bottom .slogan {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-secondary);
    margin-top: 0.5rem;
    padding-bottom: 0.5rem;
}


/* --- Responsiveness (Mobile First) --- */

/* Mobile adjustments (up to 768px) */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .menu-toggle {
        display: block;
    }

    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .hero-section {
        min-height: 60vh;
        padding: 6rem 1rem 3rem;
    }

    /* Adjust service cards for better vertical stacking on smaller screens */
    .services-grid, .sub-services-grid {
        grid-template-columns: 1fr;
    }
    
    .detailed-list ul {
        flex-direction: column;
    }
    
    .detailed-list li {
        flex-basis: 100%;
    }
    
    .about-flex, .founder-details {
        flex-direction: column;
        text-align: center;
    }
    
    .about-image, .founder-portrait {
        order: -1; /* Move image/portrait to the top */
        margin-bottom: 1.5rem;
    }

    .about-image img {
        width: 80%;
        margin: 0 auto;
    }

    .herrería-card, .cloud-it-content {
        flex-direction: column;
        padding: 1.5rem;
    }

    .herrería-card img, .cloud-it-content img {
        width: 100%;
        max-width: 300px;
        margin-bottom: 1rem;
    }
    
    .cloud-it-details {
        text-align: left;
    }

    .xaas-grid {
        grid-template-columns: 1fr;
    }

    .herrería-details {
        text-align: left;
    }

    .founder-details {
        padding: 1.5rem 1rem;
    }

    .founder-portrait {
        min-width: 100%;
    }
    
    .portrait-placeholder {
        width: 120px;
        height: 120px;
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul {
        padding: 0;
    }
    
    .footer-brand img {
        margin: 0 auto 0.5rem;
        display: block;
    }
}

/* Tablet/Desktop transition adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop optimization */
@media (min-width: 1025px) {
    .services-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}