* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* PANTALLA DE CARGA CON BURBUJAS */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #4b0696;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease, visibility 1s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.logo-container {
    position: relative;
    z-index: 10;
    animation: fadeInLogo 1.5s ease;
}

.logo-container img {
    width: 200px;
    height: 200px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes fadeInLogo {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* BURBUJAS */
.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(92, 225, 230, 0.4);
    border-radius: 50%;
    animation: rise linear infinite;
    box-shadow: 0 0 20px rgba(92, 225, 230, 0.3);
}

@keyframes rise {
    0% {
        bottom: -100px;
        opacity: 1;
    }
    100% {
        bottom: 110vh;
        opacity: 0;
    }
}

/* PÁGINA PRINCIPAL */
#main-content {
    opacity: 0;
    transition: opacity 1s ease;
}

#main-content.visible {
    opacity: 1;
}

/* Header */
header {
    background: #4b0696;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffde59;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 80px;
    width: 80px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #5ce1e6;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: #4b0696;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: #5ce1e6;
    border-radius: 50%;
    top: -200px;
    right: -200px;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: #ffde59;
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content img {
    max-width: 250px;
    height: auto;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.cta-button {
    background: #ffde59;
    color: #4b0696;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    background: #5ce1e6;
}

/* Services Section */
.services {
    padding: 5rem 2rem;
    background: white;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #4b0696;
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #5ce1e6;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4b0696;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.service-card h3 {
    color: #4b0696;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: white;
}

.service-card p {
    color: #4b0696;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.service-card:hover p {
    color: white;
}

/* About Section */
.about {
    background: #ffde59;
    padding: 5rem 2rem;
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about h2 {
    color: #4b0696;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about p {
    font-size: 1.2rem;
    color: #4b0696;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background: white;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-info {
    background: #4b0696;
    padding: 2rem;
    border-radius: 20px;
    color: white;
    transition: all 0.3s ease;
}

.contact-info:hover {
    background: #5ce1e6;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffde59;
}

.contact-info p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: white;
}

.contact-info:hover h3 {
    color: #4b0696;
}

.contact-info:hover p {
    color: #4b0696;
}

/* Footer */
footer {
    background: #4b0696;
    color: white;
    text-align: center;
    padding: 2rem;
}

footer p {
    margin: 0.5rem 0;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-links a {
    color: #ffde59;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-links a svg {
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #5ce1e6;
    transform: scale(1.2) translateY(-5px);
}

.social-links a:hover svg {
    filter: drop-shadow(0 5px 10px rgba(92, 225, 230, 0.5));
}

/* RESPONSIVE - TABLET */
@media (max-width: 1024px) {
    nav {
        padding: 0 1.5rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* RESPONSIVE - MÓVIL GRANDE (hasta 768px) */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .logo {
        font-size: 1.3rem;
        gap: 0.5rem;
        text-align: center;
    }

    .logo img {
        height: 60px;
        width: 60px;
    }

    .nav-links {
        gap: 1rem;
        font-size: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .hero {
        padding: 10rem 1.5rem 3rem;
        min-height: 90vh;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .logo-container img {
        width: 150px;
        height: 150px;
    }

    .hero-content img {
        max-width: 180px;
    }

    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services {
        padding: 3rem 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

    .service-card p {
        font-size: 1rem;
    }

    .about {
        padding: 3rem 1.5rem;
    }

    .about h2 {
        font-size: 2rem;
    }

    .about p {
        font-size: 1.1rem;
    }

    .contact {
        padding: 3rem 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-info {
        padding: 1.8rem;
    }

    footer {
        padding: 2rem 1rem;
    }

    footer p {
        font-size: 0.95rem;
        margin: 0.8rem 0;
    }

    .social-links {
        gap: 2rem;
        margin-top: 1.5rem;
    }

    .social-links a svg {
        width: 38px;
        height: 38px;
    }
}

/* RESPONSIVE - MÓVIL PEQUEÑO (hasta 480px) */
@media (max-width: 480px) {
    header {
        padding: 0.8rem 0;
    }

    nav {
        padding: 0.8rem;
    }

    .logo {
        font-size: 1.1rem;
        gap: 0.3rem;
    }

    .logo img {
        height: 50px;
        width: 50px;
    }

    .nav-links {
        gap: 0.8rem;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.3rem;
    }

    .hero {
        padding: 9rem 1rem 2.5rem;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.4;
    }

    .logo-container img {
        width: 120px;
        height: 120px;
    }

    .hero-content img {
        max-width: 140px;
    }

    .cta-button {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
        white-space: nowrap;
    }

    .section-title {
        font-size: 1.6rem;
        padding: 0 1rem;
    }

    .services {
        padding: 2.5rem 1rem;
    }

    .service-card {
        padding: 1.8rem 1.2rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .service-card p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .about {
        padding: 2.5rem 1rem;
    }

    .about h2 {
        font-size: 1.7rem;
    }

    .about p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .contact {
        padding: 2.5rem 1rem;
    }

    .contact-info {
        padding: 1.5rem 1.2rem;
    }

    .contact-info h3 {
        font-size: 1.3rem;
    }

    .contact-info p {
        font-size: 0.95rem;
    }

    footer {
        padding: 1.5rem 0.8rem;
    }

    footer p {
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }

    .social-links {
        gap: 1.5rem;
    }

    .social-links a svg {
        width: 35px;
        height: 35px;
    }
}

/* RESPONSIVE - MÓVIL MUY PEQUEÑO (hasta 360px) */
@media (max-width: 360px) {
    .logo {
        font-size: 0.95rem;
    }

    .logo img {
        height: 45px;
        width: 45px;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .logo-container img {
        width: 100px;
        height: 100px;
    }

    .hero-content img {
        max-width: 120px;
    }

    .cta-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    .about h2 {
        font-size: 1.5rem;
    }

    .about p {
        font-size: 0.95rem;
    }

    .contact-info h3 {
        font-size: 1.2rem;
    }

    .social-links a svg {
        width: 32px;
        height: 32px;
    }
}