/* ------------ RESET ------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: 12px;
    top: 12px;
    background: #FBE4D8;
    color: #2B124C;
    padding: 8px 12px;
    border-radius: 6px;
    transform: translateY(-200%);
    transition: transform 180ms ease;
    z-index: 9999;
}
.skip-link:focus {
    transform: translateY(0);
    outline: 3px solid rgba(82,43,91,0.15);
}

/* ------------ BODY ------------ */
body {
    font-family: Poppins, Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at center,
        #FBE4D8 0%,
        #DFB6B2 25%,
        #854F6C 50%,
        #522B5B 70%,
        #2B124C 85%,
        #190019 100%
    );
    background-attachment: fixed;
    color: #000;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Better mobile performance */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* Page load animation */
    animation: pageLoad 0.6s ease-out;
}

/* Allow text selection where needed */
p, span, label, input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
    /* Better mobile scrolling */
    -webkit-overflow-scrolling: touch;
}

/* Add smooth fade-in for page load */
@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* keyboard focus visible improvements */
:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid rgba(133,79,108,0.18);
    outline-offset: 3px;
}

/* ------------ HEADER HERO ------------ */
.hero {
    background-color: rgba(41, 18, 76, 0.95);
    padding: 50px 20px 60px;
    text-align: center;
    border-radius: 0 0 40px 40px;
    position: relative;
    box-shadow: 0 20px 60px rgba(25, 0, 25, 0.3);
    backdrop-filter: blur(10px);
    animation: heroFadeIn 0.8s ease-out;
    transform-origin: top center;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero h1 {
    font-size: 48px;
    color: #FBE4D8;
    text-transform: uppercase;
    font-family: Merriweather, serif;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    animation: titleSlideIn 0.8s ease-out 0.2s both;
    line-height: 1.2;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-sub {
    color: #DFB6B2;
    margin-top: 8px;
    font-size: 20px;
    opacity: 0.98;
    font-weight: 300;
    letter-spacing: 0.5px;
    animation: subtitleFadeIn 1s ease-out 0.4s both;
}

@keyframes subtitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 0.98;
        transform: translateY(0);
    }
}

/* CTA button */
.cta {
    display: inline-block;
    margin-top: 14px;
    padding: 14px 28px;
    background: linear-gradient(90deg, #854F6C 0%, #DFB6B2 100%);
    color: #190019;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 12px 40px rgba(133, 79, 108, 0.3);
    transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 220ms ease, background 300ms ease;
    cursor: pointer;
    position: relative;
    z-index: 10;
    letter-spacing: 0.5px;
    font-size: 15px;
    animation: buttonBounceIn 0.8s ease-out 0.6s both;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@keyframes buttonBounceIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(133, 79, 108, 0.35);
}

/* Removed buttonGlow animation for professional look */

.cta:active {
    transform: translateY(-2px) scale(0.98);
    transition: transform 100ms ease;
}

/* Ripple effect on click */
/* Removed ripple effect for professional look */
.cta:focus {
    outline: 3px solid rgba(251, 228, 216, 0.5);
    outline-offset: 4px;
}

/* Secondary CTA button (Services) */
.cta-secondary {
    background: linear-gradient(90deg, #522B5B 0%, #2B124C 100%);
    box-shadow: 0 12px 40px rgba(82, 43, 91, 0.3);
    margin-left: 12px;
    color: #FBE4D8;
}
.cta-secondary:hover {
    box-shadow: 0 20px 50px rgba(82, 43, 91, 0.4);
}

/* CTA button group for responsive layout */
.cta-group {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* ensure hero contents are positioned relative for CTA pseudo */
.hero { position: relative; }

/* ------------ HERO TOP CONTAINER ------------ */
.hero-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.hero-top h1 {
    margin: 0;
}

.hero h1 span {
    display: block;
    font-size: 22px;
    color: #fff;
    margin-bottom: 10px;
        display: inline-block; /* allow transforms */
        animation: heroPulse 6s ease-in-out infinite;}


@keyframes heroPulse {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.95;
        text-shadow: none;
    }
    50% {
        transform: translateY(-6px) scale(1.03);
        opacity: 1;
        text-shadow: 0 6px 18px rgba(25, 0, 25, 0.35);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.95;
        text-shadow: none;
    }
}

/* subtle entrance for content boxes */
.box {
    background-color: #DFB6B2;
    padding: 40px;
    border-radius: 16px;
    max-width: 800px;
    margin: auto;
    box-shadow: 0 8px 32px rgba(25, 0, 25, 0.12);
    border: 1px solid rgba(251, 228, 216, 0.3);
    position: relative;
    overflow: hidden;
    /* prepare for CSS-driven reveal/stagger */
    opacity: 0;
    transform: translateY(20px);
    transition: transform 500ms ease,
            opacity 500ms ease,
            box-shadow 300ms ease;
    transition-delay: calc(var(--i, 0) * 0.08s);
    will-change: transform, opacity;
}

@keyframes boxFadeUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* When JS marks a box as revealed, CSS handles the smooth entrance */
.box.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: boxReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes boxReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* decorative glint layer that shifts on hover and during reveal */
.box::before {
    content: '';
    position: absolute;
    inset: -30% -30% auto -30%;
    height: 180%;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 100%);
    transform: rotate(-20deg) translateX(-40%);
    transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1), opacity 600ms ease;
    pointer-events: none;
    opacity: 0.6;
}

.box.revealed::before {
    transform: rotate(-20deg) translateX(-10%);
}

/* Hover micro-interactions for boxes */
.box:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(25, 0, 25, 0.25);
    transition: transform 300ms ease,
                box-shadow 300ms ease;
}

/* Touch-friendly hover for mobile */
@media (hover: hover) and (pointer: fine) {
    .box:hover {
        transform: translateY(-12px) scale(1.02) rotate(-0.25deg);
    }
}

.box:hover::before {
    transform: rotate(-20deg) translateX(10%);
    opacity: 0.85;
}

/* make headings and paragraphs animate subtly when the box is hovered */
.box h2,
.box p,
.box details summary {
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), color 320ms ease, opacity 320ms ease;
    transform-origin: left center;
    animation: fadeInUp 0.8s ease-out calc(var(--i, 0) * 0.1s + 0.3s) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.box:hover h2 { 
    color: #2B124C;
}
.box:hover p  { 
    color: #190019;
}
.box:hover details summary { 
    color: #522B5B;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero,
    .hero h1,
    .hero-sub,
    .cta,
    .box,
    .box.revealed {
        animation: none !important;
        transform: none !important;
    }

    .box {
        opacity: 1 !important;
    }
}
/* ------------ LOGO STYLING ------------ */
.hero-logo {
    max-width: 180px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(25, 0, 25, 0.25);
    margin: 0 auto 25px;
    display: block;
    transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 420ms ease,
                box-shadow 420ms ease;
    animation: logoFadeInScale 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    cursor: pointer;
}

.hero-logo:hover {
    transform: scale(1.08) rotate(-2deg);
    filter: brightness(1.1) drop-shadow(0 0 12px rgba(223, 182, 178, 0.4));
    box-shadow: 0 20px 60px rgba(82, 43, 91, 0.3);
}

@keyframes logoFadeInScale {
    from {
        opacity: 0;
        transform: scale(0.85) rotate(8deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-logo {
        animation: none !important;
        transition: none !important;
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .hero-logo {
        max-width: 140px;
        margin: 0 auto 20px;
    }
}

/* ------------ MAIN CONTENT / BOXES ------------ */
main {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    animation: mainFadeIn 1s ease-out 0.3s both;
}

@keyframes mainFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.box {
    background-color: #DFB6B2;
    padding: 30px;
    border-radius: 20px;
    max-width: 750px;
    margin: auto;
    box-shadow: 0 10px 40px rgba(25, 0, 25, 0.15);
    border: 1px solid rgba(251, 228, 216, 0.3);
}

.box h2 {
    color: #2B124C;
    margin-bottom: 20px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.box p {
    line-height: 1.8;
    font-size: 17px;
    color: #190019;
    font-weight: 400;
    margin-bottom: 16px;
}

/* ------------ COLLAPSIBLE SKILL SECTIONS ------------ */
.box details {
    margin: 16px 0;
    padding: 12px 0;
    border-bottom: 1px solid rgba(25, 0, 25, 0.1);
}

.box details:last-child {
    border-bottom: none;
}

.box summary {
    cursor: pointer;
    user-select: none;
    outline: none;
    padding: 10px 0;
    transition: color 200ms ease, transform 200ms ease;
}

.box summary:hover {
    color: #522B5B;
    transform: translateX(4px);
}

.box summary h3 {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
}

.box details[open] summary {
    margin-bottom: 8px;
}

.box details ul {
    margin: 12px 0 12px 24px;
    animation: expandList 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes expandList {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect reduced motion for details expansion */
@media (prefers-reduced-motion: reduce) {
    .box details ul {
        animation: none !important;
    }
}

/* ------------ EVENTS BOX ------------ */
.events {
    background-color: #2B124C;
    text-align: center;
    box-shadow: 0 15px 50px rgba(25, 0, 25, 0.2);
}

/* ------------ JOIN FORM ------------ */
.join-form-box {
    background: linear-gradient(135deg, #FBE4D8 0%, #DFB6B2 100%);
    border: 2px solid #522B5B;
}

/* Hidden/collapsed state for the join form: keeps it accessible but visually hidden
   so JS can reveal it. Use max-height for a smooth reveal on expand. */
.join-form-box.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    transition: max-height 360ms ease, opacity 280ms ease, padding 280ms ease, border-width 280ms ease;
}
.join-form-box.expanded {
    max-height: 2000px; /* generous value to contain the expanded form with new fields */
    opacity: 1;
    padding: 30px;
    border-width: 2px;
    transition: max-height 420ms cubic-bezier(0.22,1,0.36,1), opacity 320ms ease, padding 320ms ease, border-width 320ms ease;
    animation: formSlideDown 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes formSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close button inside the form section */
.form-close {
    position: absolute;
    right: 18px;
    top: 18px;
    background: transparent;
    border: none;
    color: #2B124C;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
}
.form-close:hover,
.form-close:focus {
    background: rgba(82,43,91,0.06);
    outline: 3px solid rgba(133,79,108,0.12);
}

.join-form-box h2 {
    color: #2B124C;
    margin-bottom: 8px;
}

.join-form-box p {
    color: #522B5B;
    font-size: 14px;
    margin-bottom: 20px;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: #2B124C;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid rgba(82, 43, 91, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #190019;
    font-family: Poppins, Arial, sans-serif;
    font-size: 14px;
    transition: border-color 280ms ease, background-color 280ms ease, box-shadow 280ms ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #854F6C;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(133, 79, 108, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: Poppins, Arial, sans-serif;
}

/* ------------ HIDDEN HONEYPOT FIELD ------------ */
.hidden-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.form-submit {
    margin-top: 10px;
    padding: 14px 28px;
    width: 100%;
    border: none;
}

.form-submit:hover {
    transform: translateY(-3px) scale(1.01);
}

.form-message {
    text-align: center;
    font-weight: 600;
    min-height: 20px;
    margin-top: -10px;
}

.form-message.success {
    color: #2B124C;
}

.form-message.error {
    color: #854F6C;
}

/* ------------ SERVICES FORM BOX ------------ */
.services-form-box {
    background: linear-gradient(135deg, #522B5B 0%, #2B124C 100%);
    border: 2px solid #854F6C;
    color: #FBE4D8;
}

.services-form-box.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    transition: max-height 360ms ease, opacity 280ms ease, padding 280ms ease, border-width 280ms ease;
}

.services-form-box.expanded {
    max-height: 2500px; /* generous value to contain the expanded form with new business fields */
    opacity: 1;
    padding: 30px;
    border-width: 2px;
    transition: max-height 420ms cubic-bezier(0.22,1,0.36,1), opacity 320ms ease, padding 320ms ease, border-width 320ms ease;
}

.services-form-box h2 {
    color: #FBE4D8;
    margin-bottom: 8px;
}

.services-form-box p {
    color: #DFB6B2;
    font-size: 14px;
    margin-bottom: 20px;
}

.services-form-box .form-group label {
    color: #FBE4D8;
}

.services-form-box .form-group input,
.services-form-box .form-group select,
.services-form-box .form-group textarea {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(223, 182, 178, 0.3);
    color: #190019;
}

.services-form-box .form-group input:focus,
.services-form-box .form-group select:focus,
.services-form-box .form-group textarea:focus {
    border-color: #DFB6B2;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(223, 182, 178, 0.25);
}

.services-form-box .form-close {
    color: #FBE4D8;
}

.services-form-box .form-close:hover,
.services-form-box .form-close:focus {
    background: rgba(223, 182, 178, 0.1);
    outline: 3px solid rgba(223, 182, 178, 0.2);
}

/* Section headers in services form */
.services-form-box h3 {
    color: #FBE4D8;
    margin: 30px 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid rgba(251, 228, 216, 0.3);
    padding-bottom: 10px;
    font-family: Poppins, Arial, sans-serif;
}

.services-form-box h3:first-of-type {
    margin-top: 10px;
}

.events h2 {
    color: #FBE4D8;
    transition-property: color, transform;
    transition-duration: 280ms;
    transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 26px;
}

.events h2:hover {
    color: #DFB6B2;
    transform: scale(1.02);
}

/* Events CTA styling */
.events-cta {
    margin-top: 14px;
    text-align: center;
}

.events-cta .cta {
    padding: 12px 28px;
    font-size: 16px;
    border-radius: 40px;
    box-shadow: 0 14px 44px rgba(0,0,0,0.18);
}

/* Instagram icon (inline SVG via background-image) */
.icon-instagram,
.icon-instagram-footer {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: -2px;
    margin-right: 10px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}
/* icon placeholders kept for backward compatibility (SVG now inline in HTML) */

/* Spinner for form submit */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: rgba(255,255,255,0.9);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Disabled CTA appearance while action occurs */
.cta[aria-busy="true"] {
    opacity: 0.7;
    pointer-events: none;
}

@media (max-width: 600px) {
    .events-cta .cta {
        width: 100%;
        box-sizing: border-box;
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* Reduce heavy shadows on small screens for performance and clarity */
@media (max-width: 480px) {
    .hero, .box {
        box-shadow: 0 6px 18px rgba(25,0,25,0.12);
    }
    .events-cta .cta {
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    }
}

/* ------------ SERVICES / BUSINESS BOX ------------ */
.services {
    background: linear-gradient(135deg, #FBE4D8 0%, #DFB6B2 100%);
    border: 2px solid #522B5B;
    box-shadow: 0 20px 60px rgba(82, 43, 91, 0.2);
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(251, 228, 216, 0.3) 0%, rgba(223, 182, 178, 0.1) 100%);
    pointer-events: none;
}

.services h2 {
    background: linear-gradient(90deg, #2B124C 0%, #522B5B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #2B124C;
    margin-bottom: 16px;
    font-size: 28px;
    position: relative;
    z-index: 1;
}

.services summary h3 {
    color: #2B124C;
}

.services summary:hover h3 {
    color: #522B5B;
}

.services ul li {
    line-height: 1.7;
    padding: 6px 0;
}

/* ------------ TRANSITIONS & HOVER EFFECTS ------------ */
/* smooth hover for content boxes */
.box {
    transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 280ms ease;
}
.box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(25, 0, 25, 0.25);
}

/* subtle background change for events container */
.events {
    transition: background-color 280ms ease, color 280ms ease;
}
.events:hover {
    background-color: #190019;
}

/* socials: nudge on hover and accessible focus styles */
.socials a {
    transition: transform 180ms ease, color 180ms ease;
}
.socials a:hover {
    transform: translateX(6px);
    color: #FBE4D8;
}
.socials a:focus {
    outline: 3px solid rgba(251, 228, 216, 0.35);
    outline-offset: 4px;
    border-radius: 6px;
}

/* footer icons */
footer img {
    transition: transform 180ms ease, box-shadow 180ms ease;
}
footer img:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

/* Respect reduced motion for the new transitions too */
@media (prefers-reduced-motion: reduce) {
    .box,
    .events,
    .events h2,
    .socials a,
    footer img {
        transition: none !important;
        transform: none !important;
    }

    /* disable CTA motion */
    .cta {
        transition: none !important;
    }
}

/* ------------ FOOTER ------------ */
footer {
    background-color: #2B124C;
    background: linear-gradient(180deg, #2B124C 0%, #190019 100%);
    color: #FBE4D8;
    text-align: center;
    padding: 60px 20px 40px;
    margin-top: 80px;
    box-shadow: 0 -10px 40px rgba(25, 0, 25, 0.2);
    border-top: 1px solid rgba(251, 228, 216, 0.1);
}

footer h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    color: #FBE4D8;
}

footer img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

/* SVG icons in footer */
.socials svg.icon-inline {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    transition: transform 180ms ease;
}

/* ------------ RTL / Arabic adjustments ------------ */
html[dir="rtl"] {
    direction: rtl;
}

/* flip list indentation for RTL */
html[dir="rtl"] .box details ul {
    margin-left: 0;
    margin-right: 24px;
}

/* reverse the summary hover nudge in RTL */
html[dir="rtl"] .box summary:hover {
    transform: translateX(-4px);
}

/* adjust secondary CTA spacing for RTL */
html[dir="rtl"] .cta-secondary {
    margin-left: 0;
    margin-right: 12px;
}

/* small style for the language toggle button */
.lang-toggle {
    background: transparent;
    color: #FBE4D8;
    border: 1px solid rgba(251,228,216,0.15);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    margin-left: 12px;
}

/* when in RTL, keep toggle aligned visually */
html[dir="rtl"] .lang-toggle {
    margin-left: 0;
    margin-right: 12px;
}

.socials {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.socials a {
    color: #FBE4D8;
    text-decoration: none;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dev {
    font-size: 14px;
    margin-top: 20px;
    font-weight: 500;
    color: #DFB6B2;
}

.cpr {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 12px;
    color: #DFB6B2;
}

/* Loading animation for page */
@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

body {
    animation: pageLoad 0.6s ease-out;
}

/* Smooth scroll indicator */
@keyframes scrollIndicator {
    0%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

/* Form input focus animations */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Floating buttons animation (hidden for professional look) */
#floating-buttons-container {
    display: none !important;
    visibility: hidden;
    animation: floatButtonsIn 0.8s ease-out 1s both;
}

@keyframes floatButtonsIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form slide-in animation */
.join-form-box.expanded,
.services-form-box.expanded {
    animation: formSlideDown 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes formSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ------------ RESPONSIVE FOR MOBILE DEVICES ------------ */
/* Small phones */
@media (max-width: 480px) {
    body {
        min-height: 100vh;
        font-size: 14px;
    }
    
    /* Reduce animations on mobile for better performance */
    .box,
    .hero,
    .cta {
        animation-duration: 0.4s !important;
        transition-duration: 0.3s !important;
    }
    
    .box:hover {
        transform: translateY(-6px) scale(1.01);
        animation: none;
    }

    .hero {
        padding: 30px 12px 40px;
        border-radius: 0 0 25px 25px;
    }

    .hero h1 {
        font-size: 22px;
        letter-spacing: 0.5px;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .hero h1 span {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .hero-sub {
        font-size: 14px;
        margin-top: 4px;
        line-height: 1.4;
    }

    .hero-logo {
        max-width: 100px;
        margin: 0 auto 12px;
    }

    .box {
        padding: 18px;
        font-size: 14px;
        border-radius: 15px;
        margin: 0 8px;
    }

    .box h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .box p {
        font-size: 13px;
        line-height: 1.5;
    }

    .cta {
        width: 100%;
        padding: 16px 20px;
        font-size: 15px;
        min-height: 52px; /* Better touch target */
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    
    /* Remove hover animations on mobile */
    .cta:hover {
        transform: none;
        animation: none;
    }
    
    .cta:active {
        transform: scale(0.97);
        background: linear-gradient(90deg, #754F6C 0%, #CFB6B2 100%);
    }

    main {
        padding: 20px 12px;
        gap: 24px;
    }
    
    /* Better spacing for mobile */
    .box {
        margin: 0 4px;
    }
    
    /* Improve touch targets */
    .box summary {
        min-height: 48px;
        padding: 14px 0;
        display: flex;
        align-items: center;
    }
    
    .socials a {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .form-close {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
        font-size: 28px;
    }

    footer {
        padding: 25px 12px 18px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px; /* Better touch target (Apple recommends 44px+) */
        padding: 14px 16px;
        border-radius: 10px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    /* Better mobile form styling */
    .form-group select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232B124C' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
        padding-right: 40px;
    }

    .form-submit {
        min-height: 48px;
        font-size: 15px;
    }
}

/* Medium phones and small tablets */
@media (max-width: 600px) {
    body {
        min-height: 100vh;
    }

    .hero {
        padding: 40px 15px 50px;
        border-radius: 0 0 30px 30px;
    }

    .hero h1 {
        font-size: 26px;
        letter-spacing: 1px;
        margin-bottom: 8px;
    }

    .hero h1 span {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .hero-sub {
        font-size: 16px;
        margin-top: 6px;
    }

    .hero-logo {
        max-width: 120px;
        margin: 0 auto 15px;
    }

    .box {
        padding: 20px;
        font-size: 15px;
        border-radius: 15px;
        margin: 0 10px;
    }

    .box h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .box p {
        font-size: 14px;
        line-height: 1.6;
    }

    .socials a {
        font-size: 16px;
        min-height: 44px; /* Better touch target */
        padding: 8px 12px;
    }

    /* Stack CTA buttons on mobile */
    .cta-group {
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
        width: 100%;
    }

    .cta-secondary {
        margin-left: 0;
    }

    .cta {
        width: 100%;
        text-align: center;
        padding: 16px 24px;
        font-size: 15px;
        margin-top: 0;
        min-height: 52px; /* Better touch target */
        font-weight: 600;
    }
    
    /* Remove hover effects on touch devices */
    @media (hover: none) {
        .cta:hover,
        .box:hover {
            transform: none;
            animation: none;
        }
    }

    main {
        padding: 25px 15px;
        gap: 25px;
    }

    .events {
        margin: 0 10px;
    }

    .events h2 {
        font-size: 20px;
    }

    footer {
        padding: 30px 15px 20px;
        margin-top: 30px;
    }

    footer h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .box details ul {
        margin-left: 16px;
        font-size: 13px;
    }

    .box summary h3 {
        font-size: 16px;
    }

    .box summary {
        min-height: 48px; /* Better touch target */
        padding: 14px 0;
        display: flex;
        align-items: center;
    }
    
    /* Improve form spacing on mobile */
    .join-form,
    .services-form-box form {
        gap: 20px;
    }
    
    .form-group {
        gap: 8px;
    }
    
    /* Better section headers on mobile */
    .services-form-box h3 {
        font-size: 18px;
        margin: 24px 0 12px 0;
        padding-bottom: 8px;
    }

    .lang-toggle {
        margin-left: 8px;
        padding: 8px 10px;
        font-size: 14px;
        min-height: 40px;
        min-width: 40px;
    }

    .dev {
        font-size: 12px;
    }

    .cpr {
        font-size: 11px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* Better touch target */
    }

    .join-form {
        gap: 16px;
    }

    .form-close {
        min-width: 44px;
        min-height: 44px;
        font-size: 28px;
    }

    /* Floating buttons - hide on very small screens or make smaller */
    #floating-buttons-container {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }

    #floating-join,
    #floating-services {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 44px;
    }
}

/* Tablet portrait */
@media (min-width: 601px) and (max-width: 768px) {
    .box {
        max-width: 90%;
        padding: 25px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .cta {
        padding: 14px 26px;
    }
}

/* ------------ FORM VALIDATION STYLES ------------ */
.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: #d32f2f;
    background-color: #ffebee;
    animation: shake 300ms ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: #4caf50;
}

/* Character counter */
.char-counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-weight: 500;
}

.char-counter.warning {
    color: #d32f2f;
}

/* Enhanced form message animations */
@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutMessage {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.form-message {
    animation: slideInMessage 300ms ease;
}

/* Loading state for forms */
.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Focus improvements */
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
    outline: 3px solid rgba(133, 79, 108, 0.3);
    outline-offset: 2px;
}
