/* Footer Styles - Restructured as Closing Ritual */

.footer {
    background: var(--surface-base);
    color: var(--text-primary);
    padding-top: 4rem;
    padding-bottom: 2rem;
    margin-top: 6rem;
    position: relative;
}

/* Footer design tokens */
.footer {
    --surface-footer: var(--surface-base);
    --text-footer: var(--text-primary);
    --text-muted-footer: var(--text-muted);
    --border-footer: var(--stroke-subtle);
    --link-footer: var(--text-primary);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--stroke-subtle);
    opacity: 0.3;
}

/* Section 1: Emotional Close (Newsletter + Calm Statement) */
.footer-emotional-close {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-newsletter {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.footer-newsletter-title {
    font-family: var(--velora-font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--heading-color);
    margin-bottom: 0.75rem;
    font-weight: 400;
    line-height: 1.3;
}

.footer-newsletter-subtitle {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 0.75rem;
    min-width: 0; /* Prevent form from overflowing */
}

.newsletter-input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-input::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

.newsletter-button {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 50px;
    background: var(--color-primary);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.newsletter-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.footer-calm-statement {
    text-align: center;
    max-width: 65ch;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-calm-statement p {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.7;
    line-height: 1.7;
    font-style: italic;
}

/* Section 2: Navigation */
.footer-navigation {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-column {
    text-align: left;
    min-width: 0; /* Prevent grid children from overflowing */
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.footer-column h4 i {
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: inline-block;
    font-size: 0.9375rem;
}

.footer-column ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
    transform: translateX(3px);
}

/* Zodiac Section - Collapsible on Mobile */
.footer-zodiac-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-zodiac-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 0;
    cursor: pointer;
    color: var(--heading-color);
}

.footer-zodiac-toggle h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-zodiac-chevron {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
    opacity: 0.6;
}

.zodiac-columns {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.zodiac-link-with-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0; /* Prevents zodiac cards from overflowing */
}

.zodiac-link-with-name:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.zodiac-link-with-name span {
    font-size: 0.8125rem;
    color: var(--text-color);
    opacity: 0.7;
    text-align: center;
}

/* Section 3: Meta (Legal, copyright, language) */
.footer-meta {
    padding-top: 2rem;
    text-align: center;
}

.footer-info-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-info-links a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.6;
    font-size: 0.875rem;
    transition: opacity 0.2s ease;
}

.footer-info-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-separator {
    color: var(--text-color);
    opacity: 0.3;
    margin: 0 0.25rem;
}

.footer-copyright {
    margin-top: 1rem;
}

.footer-copyright p {
    margin: 0;
    opacity: 0.6;
    font-size: 0.875rem;
}

/* Light mode footer gradient */
[data-theme="light"] .footer {
    background: var(--footer-gradient-light);
}

/* Dark mode adjustments */
[data-theme="dark"] .footer {
    background: var(--surface-base);
    color: var(--text-primary);
}

[data-theme="dark"] .footer::before {
    background: var(--stroke-subtle);
}

[data-theme="dark"] .newsletter-input {
    background: var(--surface-card);
    border-color: var(--stroke-subtle);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .zodiac-columns {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-emotional-close {
        margin-bottom: 3rem;
        padding-bottom: 2rem;
    }
    
    .footer-newsletter {
        margin-bottom: 1.5rem;
    }
    
    .footer-navigation {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem; /* Increase gap on mobile */
    }
    
    .newsletter-input {
        min-height: 48px; /* iOS tap target */
    }

    .newsletter-button {
        width: 100%;
        justify-content: center;
        min-height: 48px; /* iOS tap target */
    }

    .footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .zodiac-columns {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Zodiac list collapsed by default on mobile */
    .footer-zodiac-section #footer-zodiac-list {
        display: none;
    }
    
    .footer-zodiac-section #footer-zodiac-list:not([hidden]) {
        display: grid;
    }
}

@media (max-width: 480px) {
    .footer {
        padding-top: 3rem;
    }
    
    .footer-emotional-close {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .zodiac-columns {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-info-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-separator {
        display: none;
    }
}
