/* Modern CSS for GESCOUD Portal */

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

:root {
    --primary: #1e3a8a;
    --secondary: #3b82f6;
    --accent: #60a5fa;
    --dark: #0f172a;
    --light: #ffffff;
    --gray: #f1f5f9;
    --text: #1e293b;
    --text-light: #64748b;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(55, 119, 176, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(44, 95, 141, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(96, 165, 250, 0.05) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite, backgroundMove 20s ease-in-out infinite alternate;
    z-index: -2;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

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

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.particles::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(4px 4px at 20px 30px, rgba(55, 119, 176, 0.8), transparent),
        radial-gradient(4px 4px at 40px 70px, rgba(44, 95, 141, 0.7), transparent),
        radial-gradient(3px 3px at 90px 40px, rgba(96, 165, 250, 0.8), transparent),
        radial-gradient(4px 4px at 130px 80px, rgba(55, 119, 176, 0.7), transparent),
        radial-gradient(3px 3px at 160px 120px, rgba(44, 95, 141, 0.8), transparent),
        radial-gradient(4px 4px at 200px 50px, rgba(96, 165, 250, 0.6), transparent),
        radial-gradient(3px 3px at 250px 160px, rgba(55, 119, 176, 0.7), transparent),
        radial-gradient(4px 4px at 300px 90px, rgba(44, 95, 141, 0.8), transparent),
        radial-gradient(3px 3px at 350px 130px, rgba(96, 165, 250, 0.6), transparent),
        radial-gradient(4px 4px at 400px 60px, rgba(55, 119, 176, 0.7), transparent);
    background-repeat: repeat;
    animation: particleFloat 30s linear infinite;
}

.particles::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(5px 5px at 50px 100px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(4px 4px at 150px 200px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(5px 5px at 250px 50px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(4px 4px at 350px 150px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(5px 5px at 450px 250px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(4px 4px at 550px 100px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(5px 5px at 650px 200px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(4px 4px at 750px 50px, rgba(255, 255, 255, 0.5), transparent);
    background-repeat: repeat;
    animation: particleFloatReverse 25s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-25%) translateX(2%);
    }
    100% {
        transform: translateY(-50%) translateX(0);
    }
}

@keyframes particleFloatReverse {
    0% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-25%) translateX(-2%);
    }
    100% {
        transform: translateY(-50%) translateX(0);
    }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    height: 60px;
    animation: slideDown 0.8s ease-out, headerGlow 3s ease-in-out infinite;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

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

@keyframes headerGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(55, 119, 176, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(55, 119, 176, 0.3), 0 0 30px rgba(44, 95, 141, 0.2);
    }
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Main Content */
.main-content {
    padding: 40px 0 60px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(55, 119, 176, 0.3);
    }
    50% {
        text-shadow: 0 0 40px rgba(55, 119, 176, 0.6), 0 0 60px rgba(44, 95, 141, 0.4);
    }
}

.title-line {
    display: block;
    color: var(--text-light);
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.title-highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientMove 3s ease infinite;
}

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

.hero-subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    animation: statFade 1s ease-out 0.6s both;
}

@keyframes statFade {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.service-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(55, 119, 176, 0.3);
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    animation: cardEntrance 0.6s ease-out both, cardFloat 6s ease-in-out infinite;
}

.service-card:nth-child(1) { animation-delay: 0.1s, 0s; }
.service-card:nth-child(2) { animation-delay: 0.2s, 0.5s; }
.service-card:nth-child(3) { animation-delay: 0.3s, 1s; }
.service-card:nth-child(4) { animation-delay: 0.4s, 1.5s; }
.service-card:nth-child(5) { animation-delay: 0.5s, 2s; }
.service-card:nth-child(6) { animation-delay: 0.6s, 2.5s; }
.service-card:nth-child(7) { animation-delay: 0.7s, 3s; }
.service-card:nth-child(8) { animation-delay: 0.8s, 3.5s; }
.service-card:nth-child(9) { animation-delay: 0.9s, 4s; }
.service-card:nth-child(10) { animation-delay: 1s, 4.5s; }
.service-card:nth-child(11) { animation-delay: 1.1s, 5s; }
.service-card:nth-child(12) { animation-delay: 1.2s, 5.5s; }
.service-card:nth-child(13) { animation-delay: 1.3s, 6s; }
.service-card:nth-child(14) { animation-delay: 1.4s, 6.5s; }
.service-card:nth-child(15) { animation-delay: 1.5s, 7s; }
.service-card:nth-child(16) { animation-delay: 1.6s, 7.5s; }

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

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 20px 40px rgba(55, 119, 176, 0.3);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transition: all 0.4s ease;
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(55, 119, 176, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(55, 119, 176, 0.2);
    }
}

.service-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(55, 119, 176, 0.4);
    animation: iconSpin 0.6s ease-in-out;
}

@keyframes iconSpin {
    0% {
        transform: scale(1.1) rotate(5deg);
    }
    50% {
        transform: scale(1.2) rotate(-5deg);
    }
    100% {
        transform: scale(1.1) rotate(5deg);
    }
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1e3a8a;
}

.card-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-arrow {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
    animation: arrowBounce 2s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

.service-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
    animation: arrowSpin 1s ease-in-out infinite;
}

@keyframes arrowSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.service-card:hover .card-arrow:hover {
    background: var(--primary);
    color: white;
}

.coming-soon-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px 5px rgba(96, 165, 250, 0.2);
    }
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
}

.footer p {
    color: var(--text-light);
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

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

.modal-content {
    background: linear-gradient(135deg, var(--dark), #16213e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    animation: modalSlideUp 0.4s ease;
    position: relative;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-body p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        height: auto;
        min-height: 60px;
        padding: 10px 0;
    }
    
    .logo-section {
        gap: 10px;
    }
    
    .logo-icon img {
        width: 120px;
        height: 120px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .title-line {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 25px;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .card-title {
        font-size: 20px;
    }
    
    .card-description {
        font-size: 13px;
    }
    
    .footer {
        padding: 20px 0;
    }
    
    .footer p {
        font-size: 12px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    .modal-header h3 {
        font-size: 20px;
    }
    
    .modal-body p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header {
        padding: 8px 0;
    }
    
    .logo-icon img {
        width: 100px;
        height: 100px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .title-line {
        font-size: 18px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-section {
        margin-bottom: 30px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .card-description {
        font-size: 12px;
    }
    
    .card-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .coming-soon-badge {
        font-size: 10px;
        padding: 4px 12px;
    }
    
    .modal-content {
        padding: 25px 15px;
        width: 95%;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-body p {
        font-size: 13px;
    }
}
