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

body {
    font-family: 'Segoe UI', 'Cairo', 'Tajawal', 'Arial', sans-serif;
    background-image: url('img/BG.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    direction: rtl;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0, rgba(255, 255, 255, 0.15) 4px, transparent 5px),
        radial-gradient(circle at 80% 20%, rgba(255, 182, 193, 0.18) 0, rgba(255, 182, 193, 0.18) 3px, transparent 4px),
        radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0.12) 5px, transparent 6px);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.bubbles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bubbles span {
    position: absolute;
    display: block;
    bottom: -150px;
    border-radius: 50%;
    /* opacity: 0.75; */
    animation: bubbleRise linear infinite;
    filter: blur(0.3px);
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
    }
    50% {
        transform: translateY(-50vh) translateX(20px) scale(1.03);
    }
    100% {
        transform: translateY(-110vh) translateX(-20px) scale(1.06);
    }
}

/* 15 bubbles with varied sizes, positions, durations, and colors */
.bubbles span:nth-child(1)  { left: 5%;   width: 12px; height: 12px; background: rgba(255,255,255,0.9); animation-duration: 18s; animation-delay: 0s; }
.bubbles span:nth-child(2)  { left: 12%;  width: 6px;  height: 6px;  background: rgba(255,182,193,0.8); animation-duration: 16s; animation-delay: 2s; }
.bubbles span:nth-child(3)  { left: 20%;  width: 18px; height: 18px; background: rgba(255,255,255,0.85); animation-duration: 22s; animation-delay: 4s; }
.bubbles span:nth-child(4)  { left: 28%;  width: 8px;  height: 8px;  background: rgba(255,182,193,0.7); animation-duration: 14s; animation-delay: 1s; }
.bubbles span:nth-child(5)  { left: 35%;  width: 14px; height: 14px; background: rgba(255,255,255,0.9); animation-duration: 20s; animation-delay: 3s; }
.bubbles span:nth-child(6)  { left: 42%;  width: 7px;  height: 7px;  background: rgba(255,182,193,0.75); animation-duration: 15s; animation-delay: 5s; }
.bubbles span:nth-child(7)  { left: 50%;  width: 22px; height: 22px; background: rgba(255,255,255,0.8); animation-duration: 24s; animation-delay: 0.5s; }
.bubbles span:nth-child(8)  { left: 58%;  width: 10px; height: 10px; background: rgba(255,182,193,0.8); animation-duration: 17s; animation-delay: 2.5s; }
.bubbles span:nth-child(9)  { left: 66%;  width: 16px; height: 16px; background: rgba(255,255,255,0.85); animation-duration: 21s; animation-delay: 1.8s; }
.bubbles span:nth-child(10) { left: 72%;  width: 9px;  height: 9px;  background: rgba(255,182,193,0.7); animation-duration: 13s; animation-delay: 0.8s; }
.bubbles span:nth-child(11) { left: 78%;  width: 20px; height: 20px; background: rgba(255,255,255,0.9); animation-duration: 23s; animation-delay: 3.3s; }
.bubbles span:nth-child(12) { left: 84%;  width: 6px;  height: 6px;  background: rgba(255,182,193,0.75); animation-duration: 16s; animation-delay: 4.1s; }
.bubbles span:nth-child(13) { left: 88%;  width: 15px; height: 15px; background: rgba(255,255,255,0.85); animation-duration: 19s; animation-delay: 2.2s; }
.bubbles span:nth-child(14) { left: 92%;  width: 7px;  height: 7px;  background: rgba(255,182,193,0.8); animation-duration: 15s; animation-delay: 3.8s; }
.bubbles span:nth-child(15) { left: 96%;  width: 11px; height: 11px; background: rgba(255,255,255,0.9); animation-duration: 18s; animation-delay: 1.5s; }

.container {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.header-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(79, 195, 247, 0.35);
    backdrop-filter: blur(10px);
    animation: fadeInDown 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(79, 195, 247, 0.35);
    position: relative;
    overflow: hidden;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.header-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.08));
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4fc3f7 0%, #0288d1 50%, #81d4fa 100%);
}

.header-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(2, 136, 209, 0.35);
}

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

.header-title {
    background: linear-gradient(135deg, #0288d1 0%, #4fc3f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header-subtitle {
    color: #0a6cd9;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.info-paragraph {
    background: #FFFFFF;
    border-radius: 15px;
    padding: 12px 16px;
    color: #333;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(2, 136, 209, 0.08);
    line-height: 1.7;
}

.header-image-wrapper {
    margin: 12px 0;
}

.header-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    display: block;
    box-shadow: 0 4px 18px rgba(2, 136, 209, 0.15);
}

/* Features card inside the white framed image */
.features-card {
    background-image: url('img/bg-blanc.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 26px;
    padding: 28px 26px;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.features-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 48px;
    align-items: center;
}

.features-col {
    display: grid;
    gap: 26px;
    align-content: center;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.feature-item--right {
    /* text then icon on the far right side */
    flex-direction: row;
    justify-content: flex-end;
    text-align: center;
}
.feature-item--left {
    /* icon then text on the left side */
    flex-direction: row-reverse;
    justify-content: flex-start;
    text-align: center;
}

.feature-icon {
    width: clamp(72px, 10vw, 128px);
    height: clamp(72px, 10vw, 128px);
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    flex: 0 0 auto;
}

.feature-text {
    font-size: clamp(18px, 2.2vw, 28px);
    font-weight: 800;
    color: #0d0d0d;
    white-space: normal;
    line-height: 1.25;
}

/* Wider screens: keep 2 columns (match design) */
@media (min-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.form-wrapper {
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(2, 136, 209, 0.2);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(129, 212, 250, 0.6);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    position: relative;
}

.form-wrapper::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #4fc3f7, #81d4fa, #0288d1);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.1;
}

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

h1 {
    background: linear-gradient(135deg, #0288d1 0%, #4fc3f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease-out 0.4s both;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #4fc3f7 0%, #0288d1 50%, #81d4fa 100%);
    border-radius: 2px;
}

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

.form-group {
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease-out both;
}

.form-group:nth-child(1) { animation-delay: 0.5s; }
.form-group:nth-child(2) { animation-delay: 0.6s; }
.form-group:nth-child(3) { animation-delay: 0.7s; }
.form-group:nth-child(4) { animation-delay: 0.8s; }
.form-group:nth-child(5) { animation-delay: 0.9s; }
.form-group:nth-child(6) { animation-delay: 1s; }

label {
    display: block;
    margin-bottom: 8px;
    color: #0a6cd9;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
}

label:hover {
    color: #0288d1;
}

.required {
    color: #ff6fa8;
    font-weight: 700;
}

input[type="text"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(129, 212, 250, 0.7);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #FFFFFF;
    font-family: 'Segoe UI', 'Cairo', 'Tajawal', 'Arial', sans-serif;
    color: #333;
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    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='%230288d1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-left: 18px;
    padding-right: 45px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

select:hover {
    background-color: #F0F8FF;
    border-color: #81d4fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(2, 136, 209, 0.2);
}

select:focus {
    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='%230288d1' d='M6 3L11 8H1z'/%3E%3C/svg%3E");
}

/* Style pour les options du dropdown */
select option {
    background-color: #FFFFFF;
    color: #333;
    padding: 12px;
    font-size: 16px;
    font-family: 'Segoe UI', 'Cairo', 'Tajawal', 'Arial', sans-serif;
}

select option:hover {
    background-color: #F0F8FF;
}

select option:checked {
    background-color: #0288d1;
    color: white;
}

/* Support pour texte arabe et français */
input[dir="auto"] {
    text-align: right;
}

input[dir="ltr"] {
    text-align: left;
    direction: ltr;
}

input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0288d1;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(2, 136, 209, 0.18);
    transform: translateY(-2px) scale(1.01);
}

input[type="text"]:invalid:not(:placeholder-shown),
input[type="tel"]:invalid:not(:placeholder-shown) {
    border-color: #ff6fa8;
    background-color: #fff5f9;
}

small {
    display: block;
    margin-top: 6px;
    color: #0288d1;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 1.2s both;
}

.submit-btn {
    width: 100%;
    max-width: 400px;
    height: 29px;
    padding: 0 12px;
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 15px auto 0;
    display: block;
    box-shadow: 0 4px 15px rgba(2, 136, 209, 0.35);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #0288d1 0%, #0277bd 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(2, 119, 189, 0.35);
}

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

.submit-btn:disabled {
    background: linear-gradient(135deg, #B0B0B0 0%, #909090 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Décorations subtiles */
.header-section::after {
    content: '✦';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #81d4fa;
    font-size: 20px;
    opacity: 0.3;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 600px) {
    .header-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    .header-content {
        gap: 12px;
    }
    .header-logo {
        width: 54px;
    }

    .header-title {
        font-size: 22px;
    }

    .header-subtitle {
        font-size: 16px;
    }

    .form-wrapper {
        padding: 30px 20px;
    }

    h1 {
        font-size: 26px;
        margin-bottom: 25px;
    }

    input[type="text"],
    input[type="tel"],
    textarea,
    select {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .submit-btn {
        width: 100%;
        max-width: 100%;
        height: 44px;
        font-size: 16px;
        padding: 0 12px;
    }

    .features-card {
        padding: 20px 18px;
        min-height: auto;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 18px 16px;
    }
    .feature-icon {
        width: clamp(64px, 16vw, 96px);
        height: clamp(64px, 16vw, 96px);
        flex-basis: auto;
    }
    .feature-text {
        font-size: clamp(18px, 4.5vw, 22px);
        white-space: normal;
    }
}

@media (max-width: 400px) {
    body {
        padding: 10px;
    }

    .form-wrapper {
        padding: 25px 15px;
    }
}

/* Flying birds animation on submit */
.bird {
    position: fixed;
    width: 100px;
    height: 100px;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.95;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 3px 3px rgba(0,0,0,0.2));
}

/* Simple white bird silhouette (SVG) */
.bird::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path fill='white' d='M6 38c9-7 18-8 26-6-2-3-5-7-10-10 9 2 15 9 19 14 5-1 10-3 17-10-2 8-7 13-12 16 2 2 5 4 11 6-7 1-12-1-16-3-5 2-10 3-17 1-4-1-10-4-18-8z'/></svg>");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.bird-left {
    animation: birdFlyLeft 1.6s ease-out forwards;
}
.bird-right {
    animation: birdFlyRight 1.7s ease-out forwards;
}

@keyframes birdFlyLeft {
    0%   { transform: translate(0, 0) rotate(-5deg) scale(0.9); opacity: 0.95; }
    30%  { transform: translate(-40px, -100px) rotate(-10deg) scale(1.0); }
    60%  { transform: translate(-90px, -200px) rotate(-12deg) scale(1.1); }
    100% { transform: translate(-140px, -320px) rotate(-15deg) scale(1.2); opacity: 0; }
}

@keyframes birdFlyRight {
    0%   { transform: translate(0, 0) rotate(5deg) scale(0.9); opacity: 0.95; }
    30%  { transform: translate(40px, -110px) rotate(10deg) scale(1.0); }
    60%  { transform: translate(100px, -220px) rotate(12deg) scale(1.1); }
    100% { transform: translate(160px, -340px) rotate(15deg) scale(1.2); opacity: 0; }
}

