/* 
 * Dominican MBA - Custom Design System
 * Institutional Colors:
 * - Primary (Dark Blue): #043c74
 * - Secondary (Yellow): #f3b20e
 * - Background: #f8fafc
 */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #043c74;
    --secondary-color: #f3b20e;
    --secondary-hover: #d99f0c;
    --text-color: #334155;
    --text-muted: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .brand-font {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

/* New Header Redesign */
.main-header {
    height: 180px;
    display: flex;
    overflow: hidden;
    position: relative;
    background: #00a2cc; /* Base teal color */
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header-left {
    flex: 1.2;
    background: #00a2cc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    z-index: 2;
    position: relative;
}

.header-right {
    flex: 0.8;
    background: url('../img/header_bg.png') center center / cover no-repeat;
    position: relative;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    margin-left: -60px; /* Slight overlap for smooth cut */
}

.header-text {
    color: white;
    text-align: left;
    max-width: 500px;
}

.label-formulario {
    display: inline-block;
    background: white;
    color: #00a2cc;
    font-weight: 800;
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.header-text h1 {
    font-size: 2.5rem;
    line-height: 1;
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .main-header { height: auto; flex-direction: column; }
    .header-right { display: none; }
    .header-left { padding: 40px 20px; }
    .header-text h1 { font-size: 1.8rem; }
}

/* Form Styles */
.form-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.step-dot {
    width: 32px;
    height: 32px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
    transition: var(--transition);
    color: var(--text-muted);
}

.step-dot.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.step-dot.completed {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.form-step.active {
    display: block;
}

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

.step-title {
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 24px;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

label span {
    color: var(--error-color);
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background-color: #fcfcfc;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(4, 60, 116, 0.1);
    background-color: white;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
}

.option-item input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.btn-outline:hover {
    background-color: #f1f5f9;
    color: var(--text-color);
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
}

.btn-submit:hover {
    filter: brightness(1.2);
}

/* Footer */
footer {
    background: #7395a4;
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

.footer-content p {
    font-size: 14px;
    opacity: 0.8;
}

/* Summary State */
.summary-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.summary-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.summary-section h3 {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 5px;
}

.summary-item {
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item strong {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item span {
    color: var(--text-color);
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap; /* Preserve newlines in summary */
}

.error-msg {
    display: block;
    margin-top: 5px;
    font-weight: 500;
    animation: fadeIn 0.3s ease-out;
}

@media (max-width: 640px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Success State */
.success-message {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    font-size: 64px;
    color: var(--success-color);
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .container {
        margin: 20px auto;
    }
    .form-card {
        padding: 24px;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .form-navigation {
        flex-direction: column;
        gap: 12px;
    }
}

/* UI Redesign: Improved Flatpickr Teal Theme */
.flatpickr-calendar.static, 
.flatpickr-calendar.open,
.flatpickr-calendar {
    background: #fff !important;
    box-shadow: 0 15px 45px rgba(0,0,0,0.15) !important;
    border-radius: 20px !important;
    border: none !important;
    margin-top: 5px !important;
}

.flatpickr-months {
    background: #00a2cc !important;
    border-radius: 20px 20px 0 0 !important;
    color: #fff !important;
    padding: 15px 0 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: #fff !important;
    font-weight: 800 !important;
}

.flatpickr-weekday {
    background: #fff !important;
    color: #00a2cc !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
}

.flatpickr-day.selected, 
.flatpickr-day.selected:hover, 
.flatpickr-day.selected:focus {
    background: #00a2cc !important;
    border-color: #00a2cc !important;
    color: #fff !important;
    border-radius: 50% !important;
}

.flatpickr-day:hover {
    background: rgba(0, 162, 204, 0.1) !important;
    border-radius: 50% !important;
}

.flatpickr-day.today {
    border-color: #00a2cc !important;
    color: #00a2cc !important;
    background: transparent !important;
}

.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
    padding: 10px !important;
    fill: #fff !important;
}

.flatpickr-months .flatpickr-prev-month:hover, 
.flatpickr-months .flatpickr-next-month:hover {
    background: rgba(255,255,255,0.2) !important;
    border-radius: 50% !important;
}

/* Calendar Icon for Flatpickr Alt Input */
.date-picker-wrapper {
    position: relative;
}

.date-picker-wrapper::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 45px; /* Adjusted for label */
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300a2cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 5;
}

.flatpickr-input.form-control {
    padding-right: 45px !important;
    background-color: #fff !important;
}
