/* ==========================================================================
   GRM Solution - Custom Styles
   ========================================================================== */

/* Root Variables */
:root {
    --primary-green: #10b981;
    --primary-blue: #3b82f6;
    --primary-red: #ef4444;
    --dark-gray: #1f2937;
    --light-gray: #f9fafb;
    --text-gray: #6b7280;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles */
nav {
    transition: var(--transition);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98) !important;
}

nav.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo-container img {
    transition: transform 0.3s ease;
    border-radius: 8px;
    padding: 4px;
    background: white;
}

.logo-container:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: var(--transition);
}

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

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

/* Mobile Menu Animation */
.mobile-menu {
    transform-origin: top;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: scaleY(0);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,133.3C960,128,1056,96,1152,96C1248,96,1344,128,1392,144L1440,160L1440,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"></path></svg>') no-repeat bottom;
    animation: wave 20s linear infinite;
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(50%);
    }
}

/* Animated Gradient Background */
.hero-section .absolute.inset-0 {
    background: linear-gradient(-45deg, #10b981, #3b82f6, #8b5cf6, #ec4899);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Button Styles */
.btn-primary, .btn-secondary {
    display: inline-block;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

.btn-primary:hover::before, .btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* Service Cards */
.service-card {
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::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;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-card:hover .fa-handshake,
.service-card:hover .fa-lightbulb,
.service-card:hover .fa-project-diagram,
.service-card:hover .fa-chart-bar,
.service-card:hover .fa-graduation-cap,
.service-card:hover .fa-shield-alt {
    animation: bounce 0.5s ease;
}

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

/* Team Member Cards */
.team-member {
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.team-member .rounded-full {
    transition: var(--transition);
}

.team-member:hover .rounded-full {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Value Cards */
.value-card {
    transition: var(--transition);
}

.value-card:hover {
    transform: translateX(10px);
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Form Styles */
input, select, textarea {
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Contact Form */
#contact-form button[type="submit"] {
    position: relative;
    overflow: hidden;
}

#contact-form button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(25, 25);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

#contact-form button[type="submit"]:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    transform: translateX(5px);
}

/* Back to Top Button */
#back-to-top {
    transition: var(--transition);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    border-top-color: #10b981;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error Messages */
.success-message {
    background: #10b981;
    color: white;
    padding: 15px;
    border-radius: 8px;
    animation: slideInRight 0.5s ease;
}

.error-message {
    background: #ef4444;
    color: white;
    padding: 15px;
    border-radius: 8px;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scroll Animations */
.fade-in {
    animation: fadeIn 1s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .team-member {
        margin-bottom: 2rem;
    }
    
    .value-card {
        margin-bottom: 1rem;
    }
    
    footer .grid {
        text-align: center;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #059669, #2563eb);
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover Effects for Social Icons */
.fa-linkedin-in:hover,
.fa-twitter:hover,
.fa-envelope:hover {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* Newsletter Input */
#newsletter-form input {
    transition: var(--transition);
}

#newsletter-form input:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Print Styles */
@media print {
    nav, #back-to-top, footer {
        display: none;
    }
    
    .hero-section {
        background: white;
        color: black;
    }
}