/* Atlas Academy - The Individual Learner Theme
   Design System & Shared Styles
   ================================ */

/* Base Styles */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: #FDF6F0;
    color: #3D405B;
}

/* Typography Classes */
.font-poppins {
    font-family: 'Poppins', sans-serif;
}

.font-caveat {
    font-family: 'Caveat', cursive;
}

/* Custom Blob Shapes */
.blob-1 {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.blob-2 {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.blob-3 {
    border-radius: 50% 50% 30% 70% / 50% 70% 30% 50%;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

.animate-float-delay {
    animation: float 6s ease-in-out 2s infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Hand-drawn Underline Effect */
.hand-underline {
    position: relative;
    display: inline-block;
}

.hand-underline::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10'%3E%3Cpath d='M0,8 Q25,2 50,8 T100,8' stroke='%23F2CC8F' stroke-width='3' fill='none'/%3E%3C/svg%3E") no-repeat;
    background-size: 100% 100%;
}

/* Warm Gradient Background */
.warm-gradient {
    background: linear-gradient(135deg, #FDF6F0 0%, #FEF5E5 50%, #FDF2EF 100%);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover:hover {
    transform: translateY(-8px);
}

/* Decorative Patterns */
.circle-pattern {
    background-image: radial-gradient(circle, #E07A5F 2px, transparent 2px);
    background-size: 30px 30px;
}

.dot-pattern {
    background-image: radial-gradient(circle, #A1A793 1.5px, transparent 1.5px);
    background-size: 20px 20px;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Mobile Menu Transitions */
.mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Village House Shape */
.house-shape {
    clip-path: polygon(50% 0%, 100% 35%, 100% 100%, 0 100%, 0 35%);
}

/* Quote Mark Styling */
.quote-mark {
    font-family: Georgia, serif;
    font-size: 8rem;
    line-height: 0;
    opacity: 0.15;
}

/* Wave Divider */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Navigation Active State */
.nav-link.active {
    color: #E07A5F;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #E07A5F;
    border-radius: 2px;
}

/* Teacher Card */
.teacher-card {
    transition: all 0.3s ease;
}

.teacher-card:hover {
    transform: translateY(-5px);
}

.teacher-card:hover .teacher-image {
    transform: scale(1.05);
}

.teacher-image {
    transition: transform 0.3s ease;
}

/* Program Card */
.program-card {
    position: relative;
    overflow: hidden;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E07A5F, #81B29A, #F2CC8F);
}

/* Testimonial Card */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: Georgia, serif;
    font-size: 6rem;
    line-height: 0;
    color: #E07A5F;
    opacity: 0.1;
}

/* Form Styles */
.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #E07A5F;
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.1);
}

/* Button Styles */
.btn-primary {
    background-color: #E07A5F;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #D4603E;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(224, 122, 95, 0.3);
}

.btn-secondary {
    background-color: white;
    color: #3D405B;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    border: 2px solid #81B29A;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #F0F7F4;
    border-color: #5A9A7A;
}

/* Learning Center Card */
.learning-center-card {
    background: linear-gradient(135deg, white 0%, #FDF6F0 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.learning-center-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* Policy Accordion */
.accordion-item {
    border-bottom: 1px solid #E9967A20;
}

.accordion-header {
    cursor: pointer;
    padding: 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    color: #E07A5F;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open {
    max-height: 1000px;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

/* Pricing Table */
.pricing-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pricing-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.pricing-card.featured {
    border: 3px solid #E07A5F;
    transform: scale(1.02);
}

.pricing-card.featured:hover {
    transform: scale(1.02) translateY(-5px);
}

/* Footer */
footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: #E07A5F;
}

/* Responsive Image Container */
.aspect-photo {
    aspect-ratio: 3/4;
}

.aspect-wide {
    aspect-ratio: 16/9;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #FDF6F0;
    border-top: 3px solid #E07A5F;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

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

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: #E07A5F;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 100;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #D4603E;
    transform: translateY(-3px);
}

/* ===================================
   Multi-Step Form Styles
   =================================== */

/* Form Step Transitions */
.form-step {
    animation: fadeIn 0.4s ease-out;
}

.form-step.hidden {
    display: none;
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-step.slide-left {
    animation: fadeInLeft 0.4s ease-out;
}

/* Progress Indicator */
.progress-step .step-circle {
    position: relative;
}

.progress-step .step-circle.completed {
    background-color: #E07A5F;
    color: white;
}

.progress-step .step-circle.active {
    background-color: #E07A5F;
    color: white;
    box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.2);
}

.progress-step.completed .step-label {
    color: #E07A5F;
}

.progress-step.active .step-label {
    color: #E07A5F;
}

/* Program Card Selection */
.program-card-option input:checked + .program-card-inner,
.program-card-option.selected .program-card-inner {
    border-color: #E07A5F;
    background: linear-gradient(135deg, #FDF2EF 0%, white 100%);
    box-shadow: 0 4px 15px rgba(224, 122, 95, 0.15);
}

.program-card-option input:checked + .program-card-inner::after,
.program-card-option.selected .program-card-inner::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #E07A5F;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-card-option input:checked + .program-card-inner::before,
.program-card-option.selected .program-card-inner::before {
    content: '';
    position: absolute;
    top: 18px;
    right: 18px;
    width: 8px;
    height: 4px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    z-index: 1;
}

.program-card-option {
    display: block;
    cursor: pointer;
}

.program-card-inner {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.program-card-option:hover .program-card-inner {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Toggle Button Styles */
.toggle-btn input:checked + .toggle-label {
    background-color: #E07A5F;
    border-color: #E07A5F;
    color: white;
}

/* Conditional Field Animation */
.conditional-field {
    overflow: hidden;
    transition: all 0.3s ease-out;
}

.conditional-field.hidden {
    display: none;
}

.conditional-field.showing {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        margin-top: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        margin-top: 1rem;
    }
}

/* Sibling Entry Animation */
.sibling-entry {
    animation: fadeIn 0.3s ease-out;
}

.sibling-entry.animate-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

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

/* Guardian Entry Animation */
.guardian-entry {
    animation: fadeIn 0.3s ease-out;
}

.guardian-entry .remove-guardian-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.guardian-entry:hover .remove-guardian-btn {
    opacity: 1;
}

/* Form Validation Styles */
.form-input.error {
    border-color: #ef4444;
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-input.valid {
    border-color: #22c55e;
}

/* Success Checkmark Animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

#success-message .w-20 svg path {
    stroke-dasharray: 100;
    animation: checkmark 0.6s ease-out forwards;
}

/* Review Summary Styles */
#review-summary .review-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#review-summary .review-item:last-child {
    border-bottom: none;
}

#review-summary .review-label {
    font-weight: 500;
    color: #3D405B;
}

#review-summary .review-value {
    color: #3D405B;
    opacity: 0.7;
}

/* Terms & Conditions Modal */
#terms-modal {
    animation: fadeIn 0.3s ease-out;
}

#terms-modal.hidden {
    display: none;
}

#terms-modal .terms-modal-backdrop {
    animation: fadeIn 0.3s ease-out;
}

#terms-modal > div > div {
    animation: slideUp 0.3s ease-out;
}

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

/* Terms Content Scrollbar Styling */
#terms-content {
    scrollbar-width: thin;
    scrollbar-color: #A1A793 #EBEEE6;
}

#terms-content::-webkit-scrollbar {
    width: 8px;
}

#terms-content::-webkit-scrollbar-track {
    background: #EBEEE6;
    border-radius: 4px;
}

#terms-content::-webkit-scrollbar-thumb {
    background: #A1A793;
    border-radius: 4px;
}

#terms-content::-webkit-scrollbar-thumb:hover {
    background: #8A917B;
}

/* Terms sections */
#terms-content section {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#terms-content section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Accept button states */
#accept-terms-btn:not(:disabled) {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(224, 122, 95, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(224, 122, 95, 0);
    }
}

/* Terms acknowledgment container animation */
#terms-acknowledgment-container {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 200px;
        transform: translateY(0);
    }
}

/* ===================================
   Bubbly Select Dropdowns
   =================================== */

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23E07A5F'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
    transition: all 0.2s ease;
}

.form-select:hover {
    border-color: #E07A5F;
    box-shadow: 0 2px 8px rgba(224, 122, 95, 0.1);
}

.form-select:focus {
    border-color: #E07A5F;
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.1);
}

/* Style the select options */
.form-select option {
    padding: 12px;
    background: white;
}

.form-select option:checked {
    background: linear-gradient(135deg, #FDF2EF 0%, white 100%);
}

/* Potty status note animation */
#potty-note {
    animation: fadeIn 0.3s ease-out;
}

#potty-note.hidden {
    display: none;
}

/* ===================================
   Day in the Life Timeline
   =================================== */

/* Timeline container animation */
[id^="dayinlife-"] {
    animation: timelineOpen 0.4s ease-out;
}

[id^="dayinlife-"].hidden {
    display: none;
}

@keyframes timelineOpen {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

/* Timeline chevron rotation */
[id^="chevron-"] {
    transition: transform 0.3s ease;
}

/* Timeline item hover effect */
[id^="dayinlife-"] .flex.items-start {
    transition: transform 0.2s ease;
}

[id^="dayinlife-"] .flex.items-start:hover {
    transform: translateX(4px);
}

/* Timeline dot pulse on hover */
[id^="dayinlife-"] .flex.items-start:hover .w-11 {
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
}

/* ===================================
   Interactive Teacher Cards
   =================================== */

.teacher-card-interactive {
    transition: transform 0.3s ease;
}

.teacher-card-interactive:hover {
    transform: translateY(-5px);
}

.teacher-card-interactive .teacher-image {
    transition: transform 0.4s ease;
}

.teacher-card-interactive:hover .teacher-image {
    transform: scale(1.05);
}

/* ===================================
   Teacher Modal
   =================================== */

#teacher-modal {
    animation: modalBackdropIn 0.2s ease-out;
}

.teacher-modal-content {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.teacher-modal-content.modal-open {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.teacher-modal-content.modal-close {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.15s ease;
}

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