:root {
    /* Paleta Corporativa Hispana de Seguros - Automóvil */
    --primary-blue: #27316f;      /* Azul principal Hispana */
    --primary-light: #4c5f9b;     /* Azul secundario */
    --accent-magenta: #ee0bf1;    /* Magenta característico de Automóvil */
    --accent-magenta-hover: #c909cc;
    --accent-green: #b7fd65;      /* Verde lima - Precios y destacados */
    --text-dark: #333333;
    --text-muted: #666666;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --input-focus: #ee0bf1;       /* Focus con el magenta de la marca */
    --error-color: #e11d48;
}

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

body {
    font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    background-image: radial-gradient(circle at 100% 0%, rgba(238, 11, 241, 0.05) 0%, transparent 40%),
                      radial-gradient(circle at 0% 100%, rgba(39, 49, 111, 0.05) 0%, transparent 40%);
}

/* Header & Logo */
.brand-header {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease-out;
}

.brand-logo {
    height: 80px;
    object-fit: contain;
}

.app-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.7s ease-out;
}

.app-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.app-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Tarjeta Principal */
.corporate-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px -10px rgba(39, 49, 111, 0.08);
    border-top: 6px solid var(--accent-magenta);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.corporate-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(238, 11, 241, 0.05) 0%, transparent 100%);
    border-bottom-left-radius: 100%;
    pointer-events: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group.full-width {
    grid-column: span 2;
}

label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

select, input {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

select {
    cursor: pointer;
    /* Custom arrow for select with magenta color */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ee0bf1%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.65rem auto;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(238, 11, 241, 0.1);
}

select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f1f5f9;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-magenta) 0%, var(--primary-blue) 100%);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 20px -5px rgba(238, 11, 241, 0.4);
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(238, 11, 241, 0.5);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-primary:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Loader corporativo */
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f5f9;
    border-left-color: var(--accent-magenta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1.5rem auto 0;
}

/* Resultados */
.resultados-container {
    margin-top: 3rem;
    animation: fadeIn 0.5s ease-out;
}

.resultados-titulo {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    display: inline-block;
}

.planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    background: var(--bg-white);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background-color: var(--primary-blue);
    transition: background-color 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -10px rgba(39, 49, 111, 0.15);
    border-color: rgba(39, 49, 111, 0.1);
}

.plan-card:hover::before {
    background-color: var(--accent-magenta);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px dashed var(--border-color);
}

.plan-title {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.2rem;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4CAF50; /* A color closely matching the accent-green but readable */
}

.hidden {
    display: none !important;
}

/* Iconografía SVG inline utility */
.icon-car {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

/* Animaciones */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .input-group.full-width {
        grid-column: span 1;
    }
    .corporate-card {
        padding: 1.5rem;
    }
}
