        *, *::before, *::after {
            box-sizing: border-box;
        }

        html, body {
            max-width: 100vw;
            overflow-x: hidden;
        }

        body {
            font-family: 'Poppins', sans-serif;
            display: flex;
            flex-direction: row;
            align-items: stretch;
            height: 100vh;
            margin: 0;
            background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); /* Llamativo background gradient */
            overflow: hidden;
        }

        #sidebar {
            width: 250px;
            background-color: #333;
            color: white;
            display: flex;
            flex-direction: column;
            padding-top: 20px;
            box-shadow: 2px 0 5px rgba(0,0,0,0.1);
            z-index: 10;
        }

        #logo-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px 0;
            background: transparent;
            margin-bottom: 20px;
        }

        .logo-svg {
            color: #d81b60; /* A vivid color for the logo */
            margin-bottom: 10px;
        }

        .logo-text {
            font-size: 2em;
            font-weight: bold;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        #main-menu {
            width: 100%;
        }

        #main-menu ul {
            list-style-type: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        #main-menu li {
            display: block;
        }

        #main-menu a {
            color: white;
            text-decoration: none;
            padding: 15px 25px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            gap: 15px;
            transition: transform 0.3s ease, background-color 0.3s ease;
        }

        #main-menu a i {
            width: 20px;
            text-align: center;
        }

        #main-menu a:hover {
            background-color: #555;
            transform: translateX(10px);
        }

        #content-area {
            flex-grow: 1;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding: 40px;
            box-sizing: border-box;
            overflow-y: auto;
        }

        .content-section {
            width: 100%;
            max-width: 800px;
            display: flex;
            flex-direction: column;
            align-items: center;
            background: rgba(255, 255, 255, 0.9);
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 8px 16px rgba(0,0,0,0.1);
            box-sizing: border-box;
        }

        .hero {
            text-align: center;
            margin-bottom: 40px;
        }

        .hero-title {
            font-size: 3em;
            color: #d81b60;
            margin-bottom: 10px;
        }

        .hero-subtitle {
            font-size: 1.5em;
            color: #555;
            font-weight: normal;
            margin-bottom: 20px;
        }

        .hero-text {
            font-size: 1.1em;
            line-height: 1.6;
            color: #444;
        }

        .features {
            display: flex;
            justify-content: space-around;
            width: 100%;
            gap: 20px;
            margin-top: 20px;
        }

        .feature-item {
            flex: 1;
            text-align: center;
            padding: 20px;
            background: #fdfbfb;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: transform 0.2s;
        }

        .feature-item:hover {
             transform: translateY(-5px);
        }

        .feature-item h4 {
            color: #333;
            margin-bottom: 10px;
        }

        .resource-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            width: 100%;
            margin-top: 20px;
        }

        .resource-category {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .resource-category h3 {
            margin-top: 0;
            color: #007bff;
            border-bottom: 2px solid #e9ecef;
            padding-bottom: 10px;
            margin-bottom: 15px;
        }

        .resource-category ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }

        .resource-category li {
            margin-bottom: 10px;
        }

        .resource-category a {
            text-decoration: none;
            color: #333;
            transition: color 0.2s;
        }

        .resource-category a:hover {
            color: #d81b60;
        }

        #chat-container {
            width: 100%;
            max-width: 400px;
            height: 500px;
            background-color: white;
            border: 1px solid #ccc;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            box-sizing: border-box;
        }

        #chat-history {
            flex-grow: 1;
            padding: 10px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .message {
            max-width: 80%;
            padding: 8px 12px;
            border-radius: 15px;
            word-wrap: break-word;
            white-space: pre-wrap;
        }

        .user-message {
            align-self: flex-end;
            background-color: #007bff;
            color: white;
        }

        .idealita-message {
            align-self: flex-start;
            background-color: #e9ecef;
            color: black;
        }

        .thinking-message {
            align-self: flex-start;
            background-color: #e9ecef;
            color: #555;
            font-style: italic;
        }

        #input-container {
            display: flex;
            padding: 10px;
            border-top: 1px solid #ccc;
            background-color: #fafafa;
        }

        #user-input {
            flex-grow: 1;
            min-width: 0;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 14px;
        }

        #send-btn {
            padding: 10px 20px;
            margin-left: 10px;
            border: none;
            border-radius: 4px;
            background-color: #28a745;
            color: white;
            font-size: 14px;
            cursor: pointer;
        }

        #send-btn:hover {
            background-color: #218838;
        }

        #send-btn:disabled {
            background-color: #999;
            cursor: not-allowed;
        }

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
.animate-chat {
    animation: slideUpFade 0.5s ease-out forwards;
}

.servicio-item {
    background: #fdfbfb;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.servicio-item:hover {
    transform: translateY(-3px);
}

.servicio-item h3 {
    color: #d81b60;
    margin: 0;
}

.pension-form {
    width: 100%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-group label {
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#btn-calcular-pension {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: #28a745;
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

#btn-calcular-pension:hover {
    background-color: #218838;
}

/* NEW HOME SECTION STYLES */

.new-home-section {
    background-color: #f8f6ff;
    border-radius: 24px;
    padding: 60px;
    max-width: 1000px;
    box-shadow: none;
}

.home-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.home-text {
    flex: 1;
    text-align: left;
    padding-right: 40px;
}

.home-subtitle {
    color: #7b61ff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.home-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    color: #1a1a2e;
    margin: 0 0 24px 0;
    letter-spacing: -1px;
}

.home-title span {
    color: #6c40f7;
}

.home-description {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
}

.home-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: #6c40f7;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #5833cc;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: white;
    color: #555;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background-color: #f5f5f5;
    color: #333;
    border-color: #ccc;
    transform: translateY(-2px);
}

.home-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.visual-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.speech-bubble {
    position: absolute;
    top: 20px;
    left: 40px;
    background: white;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #4a4a4a;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    z-index: 2;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.orbits {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 300px;
    z-index: 0;
}

.sphere {
    position: relative;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at 30% 30%, #8a63ff, #5125de);
    border-radius: 50%;
    box-shadow: -10px 10px 30px rgba(81, 37, 222, 0.3), inset -10px -10px 30px rgba(0,0,0,0.1);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.eye {
    position: absolute;
    width: 14px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    top: 55%;
}

.eye.left {
    left: 30%;
}

.eye.right {
    right: 30%;
}

.smile {
    position: absolute;
    top: 70%;
    width: 30px;
    height: 10px;
    border-bottom: 3px solid white;
    border-radius: 0 0 30px 30px;
}

.sparkle {
    position: absolute;
    z-index: 2;
}

.sparkle-1 {
    top: 15%;
    right: 15%;
}

.sparkle-2 {
    bottom: 35%;
    left: 10%;
}

.sparkle-3 {
    bottom: 10%;
    right: 40%;
}

/* TOP AUTH BUTTONS */
.top-auth-container {
    position: absolute;
    top: 20px;
    right: 40px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.auth-btn {
    background-color: #e5f1fa;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 16px;
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.auth-btn:hover {
    transform: translateY(-2px);
    background-color: #d0e7f9;
}

/* FLOATING SOCIAL MEDIA ICONS */
.floating-social {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px; /* Square-rounded */
    color: white;
    font-size: 20px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    color: white;
}

.social-icon.facebook {
    background-color: #1877F2;
}

.social-icon.youtube {
    background-color: #FF0000;
}

.social-icon.twitter {
    background-color: #1DA1F2;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.whatsapp {
    background-color: #25D366;
}

/* CUSTOM MODAL STYLES */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.custom-modal-overlay.active { display: flex; }
.custom-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: modalPop 0.3s ease-out;
}
@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.custom-modal-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}
.custom-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.custom-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}
.custom-modal-btn.primary { background-color: #6c40f7; color: white; }
.custom-modal-btn.primary:hover { background-color: #5833cc; }
.custom-modal-btn.secondary { background-color: #e0e0e0; color: #333; }
.custom-modal-btn.secondary:hover { background-color: #ccc; }

/* TABLET RESPONSIVE (max-width: 1024px) */
@media (max-width: 1024px) {
    #content-area {
        padding: 20px;
    }

    .new-home-section {
        padding: 40px;
    }

    .home-title {
        font-size: 48px;
    }

    .home-description {
        font-size: 16px;
    }

    .visual-container {
        width: 300px;
        height: 300px;
    }

    .orbits {
        width: 300px;
        height: 225px;
    }

    .sphere {
        width: 165px;
        height: 165px;
    }

    .speech-bubble {
        left: 0;
    }

    .content-section {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* MOBILE MENU BUTTON (HIDDEN ON DESKTOP/TABLET) */
.mobile-menu-btn {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3000;
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* MOBILE RESPONSIVE (max-width: 768px) */
@media (max-width: 768px) {
    body {
        overflow: auto; /* allow scrolling on body */
        overflow-x: hidden; /* prevent horizontal scroll */
    }

    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
        width: 250px;
    }

    #sidebar.sidebar-open {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: block;
    }

    #content-area {
        padding: 80px 20px 20px 20px; /* Add top padding to clear the menu button */
        width: 100%;
        overflow-y: visible; /* Let body handle vertical scroll */
        overflow-x: hidden;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    .top-auth-container {
        position: relative;
        top: 0;
        right: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        margin-bottom: 20px;
        width: 100%;
        padding-right: 0;
    }

    .home-layout {
        flex-direction: column-reverse; /* Put image above text or text above image */
        text-align: center;
        gap: 40px;
    }

    .home-text {
        text-align: center;
        padding-right: 0;
    }

    .home-title {
        font-size: 36px;
    }

    .home-buttons {
        justify-content: center;
        flex-direction: column;
        width: 100%;
        padding-bottom: 60px;
    }

    .btn {
        width: 100%;
        box-sizing: border-box;
    }

    .new-home-section {
        padding: 30px 20px;
    }

    .custom-modal-content {
        width: 95%;
        padding: 20px;
    }

    /* Make touch targets bigger for inputs */
    input, select, textarea {
        padding: 12px !important;
        font-size: 16px !important; /* Prevents iOS zoom */
    }

    .form-group input, .form-group textarea, .form-group select {
        width: 100%;
        box-sizing: border-box;
    }

    #chat-container {
        width: 100%;
        max-width: 90vw;
        height: 400px;
        box-sizing: border-box;
    }

    /* Ideas layout adjustments */
    #ideas-lista {
        width: 100%;
        padding: 0;
    }

    #ideas-lista li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .idea-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .btn-eliminar-idea {
        padding: 10px 15px;
    }

    /* Make social icons stack or disappear if they overlap text/forms */
    .floating-social {
        bottom: 10px;
        right: 10px;
        flex-direction: column;
        gap: 8px;
        z-index: 50;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}
