/* CSS/contact.css */

/* Contact Hero Section */
.contact-hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../Images/pattern-contact.png');
    background-size: 300px;
    opacity: 0.05;
    pointer-events: none;
}

.hero-breadcrumb {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.hero-breadcrumb a:hover {
    color: var(--secondary-color);
}

.hero-breadcrumb span {
    color: var(--secondary-color);
    font-weight: 500;
}

.hero-breadcrumb i {
    font-size: 12px;
    opacity: 0.6;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    max-width: 700px;
    opacity: 0.9;
    margin-bottom: 50px;
}

.contact-quick-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.quick-info-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.quick-info-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-10px);
}

.info-icon {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.info-content h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--white);
}

.info-content a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
}

.info-content a:hover {
    color: var(--secondary-color);
}

.info-content p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.hero-visual {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.contact-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23f8fafc' fill-opacity='1' d='M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,192C672,181,768,139,864,138.7C960,139,1056,181,1152,181.3C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
    animation: waveAnimation 20s linear infinite;
}

@keyframes waveAnimation {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1440px;
    }
}

/* Contact Form Section */
.contact-form-section {
    padding: 100px 0;
    background-color: #f8fafc;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.form-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 50px;
    box-shadow: var(--shadow);
}

.form-header {
    margin-bottom: 40px;
}

.form-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.form-subtitle {
    color: var(--text-light);
    line-height: 1.7;
}

.contact-form {
    margin-top: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group label[required]::after {
    content: ' *';
    color: #e74c3c;
}

.input-with-icon, .textarea-with-icon, .select-with-icon {
    position: relative;
}

.input-with-icon i, .textarea-with-icon i, .select-with-icon i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
    z-index: 2;
}

.textarea-with-icon i {
    top: 25px;
    transform: none;
}

.input-with-icon input, .select-with-icon select {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 2px solid #e0e6ed;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    transition: var(--transition);
    background-color: var(--white);
    color: var(--text-color);
}

.input-with-icon input:focus, .select-with-icon select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(244, 122, 42, 0.1);
}

.textarea-with-icon textarea {
    width: 100%;
    padding: 20px 20px 20px 55px;
    border: 2px solid #e0e6ed;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    transition: var(--transition);
    resize: vertical;
    background-color: var(--white);
    color: var(--text-color);
}

.textarea-with-icon textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(244, 122, 42, 0.1);
}

.select-with-icon select {
    appearance: none;
    cursor: pointer;
}

.select-with-icon::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
    pointer-events: none;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 20px;
}

.form-footer {
    margin-top: 40px;
}

.submit-btn {
    position: relative;
    min-width: 200px;
}

.btn-text {
    display: inline-block;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    display: block;
}

.submit-btn.loading i {
    opacity: 0;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.form-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 15px;
    line-height: 1.6;
}

.form-success {
    display: none;
    text-align: center;
    padding: 50px 30px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background-color: rgba(46, 204, 113, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: #2ecc71;
    font-size: 48px;
}

.form-success h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.form-success p {
    color: var(--text-light);
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto 30px;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.contact-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(38, 62, 81, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    background-color: var(--secondary-color);
    color: var(--white);
}

.contact-content h4 {
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.contact-content a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
    display: block;
    margin-bottom: 8px;
}

.contact-content a:hover {
    color: var(--secondary-color);
}

.contact-note {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
}

.emergency-contact {
    display: flex;
    gap: 20px;
    padding: 25px;
    background-color: rgba(231, 76, 60, 0.05);
    border-radius: var(--border-radius);
    margin-top: 30px;
    border-left: 5px solid #e74c3c;
}

.emergency-icon {
    width: 50px;
    height: 50px;
    background-color: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    flex-shrink: 0;
}

.emergency-content h4 {
    margin-bottom: 10px;
    color: #e74c3c;
    font-size: 1.1rem;
}

.emergency-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.download-card {
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    padding: 40px;
    color: var(--white);
    text-align: center;
}

.download-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 32px;
}

.download-card h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.download-card p {
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.6;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.download-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.download-link i {
    font-size: 20px;
}

/* FAQ Section */
.faq-section {
    padding: 100px 0;
    background-color: var(--white);
}

.faq-container {
    max-width: 800px;
    margin: 50px auto 0;
}

.faq-item {
    border-bottom: 1px solid #e0e6ed;
    margin-bottom: 15px;
}

.faq-question {
    padding: 25px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 30px;
    transition: var(--transition);
}

.faq-question:hover h4 {
    color: var(--secondary-color);
}

.faq-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(38, 62, 81, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 14px;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
}

.faq-toggle i {
    position: absolute;
    transition: var(--transition);
}

.faq-toggle .fa-minus {
    opacity: 0;
    transform: rotate(90deg);
}

.faq-item.active .faq-toggle {
    background-color: var(--secondary-color);
    color: var(--white);
}

.faq-item.active .faq-toggle .fa-plus {
    opacity: 0;
    transform: rotate(90deg);
}

.faq-item.active .faq-toggle .fa-minus {
    opacity: 1;
    transform: rotate(0deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 0 30px;
    color: var(--text-light);
    line-height: 1.7;
}

.faq-cta {
    text-align: center;
    margin-top: 60px;
}

.faq-cta p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Location Section */
.location-section {
    padding: 100px 0;
    background-color: #f8fafc;
}

.location-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-top: 50px;
}

.location-map {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.map-visual {
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: #e8f4f8;
}

.map-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.map-base {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background-color: #c8e6f5;
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
}

.marker-dot {
    width: 20px;
    height: 20px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    animation: pulseMarker 2s infinite;
}

.marker-label {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background-color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: var(--transition);
}

.map-marker:hover .marker-label {
    opacity: 1;
    top: 25px;
}

.marker-casablanca {
    top: 60%;
    left: 30%;
}

.marker-rabat {
    top: 50%;
    left: 35%;
}

.marker-tanger {
    top: 40%;
    left: 25%;
}

.marker-marrakech {
    top: 70%;
    left: 40%;
}

.marker-fes {
    top: 45%;
    left: 50%;
}

@keyframes pulseMarker {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 122, 42, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(244, 122, 42, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(244, 122, 42, 0);
    }
}

.location-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.legend-color.primary {
    background-color: var(--secondary-color);
}

.legend-color.secondary {
    background-color: var(--primary-color);
}

.legend-color.accent {
    background-color: #2a4a6e;
}

.location-info .info-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    height: 100%;
}

.info-card h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 30px;
}

.coverage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.coverage-stat {
    text-align: center;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: var(--border-radius);
}

.coverage-stat .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.coverage-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.location-contact {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.location-contact h5 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.location-contact p {
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Contact CTA */
.contact-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../Images/pattern-light.png');
    background-size: 300px;
    opacity: 0.1;
    pointer-events: none;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Styles for Contact Page */
@media (max-width: 1200px) {
    .location-content {
        grid-template-columns: 1fr;
    }
    
    .map-visual {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .contact-quick-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 150px 0 80px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .contact-quick-info {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 30px;
    }
    
    .info-card, .download-card {
        padding: 30px;
    }
    
    .coverage-stats {
        grid-template-columns: 1fr;
    }
    
    .location-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cta-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .form-title {
        font-size: 1.8rem;
    }
    
    .contact-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-icon {
        align-self: flex-start;
    }
    
    .emergency-contact {
        flex-direction: column;
        gap: 15px;
    }
    
    .emergency-icon {
        align-self: flex-start;
    }
    
    .download-links {
        gap: 10px;
    }
    
    .faq-question h4 {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
}