/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations to elements */
.hero-text {
    animation: fadeInLeft 1s ease-out;
}

.hero-visual {
    animation: fadeInRight 1s ease-out 0.3s both;
}

.service-card {
    animation: fadeInUp 0.8s ease-out;
}

.process-step {
    animation: scaleIn 0.8s ease-out;
}

.testimonial-card {
    animation: fadeInUp 0.8s ease-out;
}

/* Hover effects */
.service-card:hover .service-icon img {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.process-step:hover .step-number {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Navigation animations */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--primary-gradient);
    transition: left 0.3s ease;
}

.nav-link:hover::before {
    left: 0;
}

/* Mobile menu animations */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Button hover effects */
.btn-primary,
.btn-secondary,
.btn-outline {
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before,
.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-outline:hover::before {
    left: 100%;
}

/* Stats counter animation */
.stat-number {
    display: inline-block;
    position: relative;
}

.stat-number::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: width 0.8s ease;
}

.stat-item:hover .stat-number::after {
    width: 100%;
}

/* Social media hover effects */
.social-links a {
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.social-links a:hover::before {
    width: 100%;
    height: 100%;
}

.social-links a:hover img {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Cookie consent animations */
.cookies-consent {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Form focus effects */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 63, 171, 0.1);
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--text-primary);
    color: var(--white);
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Card flip effect */
.flip-card {
    background-color: transparent;
    width: 300px;
    height: 200px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.flip-card-front {
    background: var(--white);
    color: var(--text-primary);
}

.flip-card-back {
    background: var(--primary-gradient);
    color: var(--white);
    transform: rotateY(180deg);
}

/* Parallax effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Gradient text */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Shake animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Bounce animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 1s ease-in-out;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .float,
    .pulse,
    .shake,
    .bounce {
        animation: none;
    }
    
    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
}

/* Focus visible for better accessibility */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-outline:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #000000;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid var(--primary-color);
    }
}

/* Page Hero Styles */
.page-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1E40AF 100%);
    color: var(--white);
    text-align: center;
    margin-top: 70px;
}

.page-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-hero-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.hero-stats .stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Contact Methods */
.contact-methods {
    padding: 5rem 0;
    background: var(--background-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-method {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #4F46E5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.contact-method h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-method p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.contact-detail strong {
    display: block;
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-detail span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Contact Form Section */
.contact-form-section {
    padding: 5rem 0;
    background: var(--white);
}

.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.form-content h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.form-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 63, 171, 0.1);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    margin-top: 0.125rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.info-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Office Location */
.office-location {
    padding: 5rem 0;
    background: var(--background-color);
}

.map-container {
    margin-top: 3rem;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-placeholder {
    position: relative;
    height: 400px;
    background: var(--neutral-color);
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background: var(--white);
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: var(--white);
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--background-color);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 300;
    transition: var(--transition);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--background-color);
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Emergency Contact */
.emergency-contact {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--error-color) 0%, #DC2626 100%);
}

.emergency-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
}

.emergency-content h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.emergency-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.emergency-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* Responsive styles for contact pages */
@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .emergency-card {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .emergency-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 6rem 0 3rem;
    }
    
    .page-hero-content h1 {
        font-size: 2.25rem;
    }
    
    .page-hero-content p {
        font-size: 1.125rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .hero-stats .stat-number {
        font-size: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-method {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .emergency-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .emergency-buttons .btn-primary,
    .emergency-buttons .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-hero-content h1 {
        font-size: 1.875rem;
    }
    
    .contact-methods,
    .contact-form-section,
    .office-location,
    .faq-section,
    .emergency-contact {
        padding: 3rem 0;
    }
    
    .contact-method {
        padding: 1.5rem;
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .contact-icon img {
        width: 30px;
        height: 30px;
    }
    
    .emergency-card {
        padding: 2rem 1.5rem;
    }
    
    .map-placeholder {
        height: 300px;
    }
} 