:root {
    --primary-color: #005A9C; /* Azul oscuro corporativo */
    --secondary-color: #00A8E8; /* Azul claro vibrante */
    --accent-color: #FFC107; /* Amarillo para acentos */
    --text-color: #333;
    --bg-color: #f4f7f6;
    --light-gray: #e0e0e0;
    --dark-gray: #555;
    --success-color: #28a745;
    --error-color: #dc3545;
    --font-family: 'Arial', sans-serif;
    --recommended-badge-bg: var(--accent-color);
    --recommended-badge-text: var(--primary-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

header .logo {
    display: flex;
    align-items: center;
}

header #logo-img {
    height: 50px;
    margin-right: 15px;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

header nav ul li a:hover,
header nav ul li a.active-link {
    background-color: var(--secondary-color);
}

header nav ul li a.auth-link {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

header nav ul li a.auth-link:hover {
    background-color: #ffda6b;
}

header nav ul li a.admin-link {
    background-color: var(--error-color); /* Distinct color for admin */
    color: white;
}

header nav ul li a.admin-link:hover {
    background-color: #c82333; /* Darker red on hover */
}

main {
    flex-grow: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

section {
    background-color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1.8rem;
}

.section-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    flex-shrink: 0; /* Prevent icon from shrinking if h2 text is long */
}

.hidden {
    display: none;
}

.active-section {
    display: block;
}

/* Home section specific styles */
.features-overview {
    display: flex;
    gap: 1.5rem;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.feature-card {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    flex-basis: calc(33.333% - 1rem); /* Adjust for gap, aiming for 3 per row */
    min-width: 250px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex; /* For aligning content if needed */
    flex-direction: column; /* Stack items vertically */
}

.feature-card p {
    font-size: 0.9rem;
    flex-grow: 1; /* Allows paragraphs to take available space for consistent card height */
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Simulator Styles */
#simulator-tool {
    background-color: #e9f5ff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
}

#simulator-tool h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

#simulator-tool h4 {
    color: var(--dark-gray);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 0.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-column label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: bold;
    color: var(--dark-gray);
}

#simulator-tool input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-size: 1rem;
}

#calculate-budget {
    display: block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 1rem auto;
}

#calculate-budget:hover {
    background-color: var(--secondary-color);
}

.results-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: white;
    border-radius: 4px;
    border: 1px solid var(--light-gray);
}

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

.results-box p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.results-box p strong {
    font-weight: bold;
}

.currency {
    font-weight: bold;
}

#net-balance.positive {
    color: var(--success-color);
    font-weight: bold;
}

#net-balance.negative {
    color: var(--error-color);
    font-weight: bold;
}

/* Resources Section */
.resource-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background-color: #fff;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.resource-card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    align-self: center;
}

.resource-card h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.resource-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
}

/* Login/Register Section */
.auth-forms {
    display: flex;
    gap: 2rem;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 1.5rem; /* Added margin */
}

.login-form, .register-form {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    flex-basis: calc(50% - 1rem);
    min-width: 300px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.login-form h3, .register-form h3 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
}

.login-form label, .register-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.login-form input, .register-form input {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 0.8rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.security-note {
    margin-top: 1.5rem;
    text-align: center;
    font-style: italic;
    color: var(--dark-gray);
    font-size: 0.9em; /* Slightly smaller */
}

/* Subscriptions Section */
#subscriptions h2 {
    text-align: center;
    margin-bottom: 1rem;
}

#subscriptions > p { /* Target direct paragraph child for introductory text */
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--dark-gray);
}

.subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.plan-card {
    background-color: #fff;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative; /* For recommended badge positioning */
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.plan-card h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.plan-card .price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.plan-card .price span {
    font-size: 1rem;
    font-weight: normal;
    color: var(--dark-gray);
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    text-align: left;
    flex-grow: 1; /* Pushes button to the bottom */
}

.plan-card ul li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.plan-card ul li .check-mark {
    color: var(--success-color);
    margin-right: 8px;
    font-weight: bold;
}

.plan-card ul li .cross-mark {
    color: var(--error-color);
    margin-right: 8px;
    font-weight: bold;
}

.plan-card button {
    margin-top: auto; /* Pushes button to the bottom if flex-grow not enough */
    width: 100%;
    padding: 0.8rem;
}

.plan-card.recommended {
    border: 2px solid var(--secondary-color);
}

.recommended-badge {
    position: absolute;
    top: -15px; /* Adjust to sit nicely on the border */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--recommended-badge-bg);
    color: var(--recommended-badge-text);
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ensure recommended plan button stands out */
.plan-card.recommended .btn-secondary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.plan-card.recommended .btn-secondary:hover {
    background-color: #ffda6b; /* Lighter accent */
}

.disclaimer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-top: 1rem;
}

/* Admin Section Styles */
#admin .admin-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

#admin .admin-card {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-color);
}

#admin .admin-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

#admin .admin-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

#admin .admin-card .btn-secondary {
    width: auto; /* Override default button width if necessary */
    padding: 0.5rem 1rem;
}

.link-to-section {
    color: var(--secondary-color);
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
}

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

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: #f4f4f4;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto; /* Pushes footer to bottom */
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Call Booking and Expert Profiles */
.call-booking, .expert-profile, .networking-forum, .tracking-dashboard {
    background-color: #e9f5ff;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 5px;
    border-left: 5px solid var(--secondary-color);
}

.call-booking button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 992px) { /* Target tablets and below for plan cards stacking */
    .subscription-plans {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .feature-card {
        flex-basis: calc(50% - 1rem); /* 2 per row on medium screens */
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    header .logo h1 {
        font-size: 1.5rem;
    }
    header nav ul {
        flex-direction: column;
        margin-top: 1rem;
    }
    header nav ul li {
        margin: 0.5rem 0;
    }
    .features-overview {
        flex-direction: column;
    }
    .feature-card {
        flex-basis: 100%; /* Stack on small screens */
    }
    .form-grid {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
    .auth-forms {
        flex-direction: column;
    }
    .login-form, .register-form {
        flex-basis: 100%;
    }
}