/* Global Styles */
:root {
    --primary-color: #66cc99;
    --secondary-color: #00a0a0;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --dark-text: #333333;
    --light-text: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --gradient: linear-gradient(135deg, #66cc99 0%, #00a0a0 100%);
    --animation-duration: 0.8s;
    --animation-delay: 0.2s;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.hero-image .logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse 3s infinite ease-in-out;
    width: 100%;
}

.hero-image .hero-logo {
    max-width: 100%;
    height: auto;
    display: block;
    animation: rotate 20s infinite linear;
}

section {
    padding: 80px 0;
}

/* Reusable Subheading Card */
.subheading-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 16px 0 24px;
}

.subheading-card h3 {
    margin-bottom: 10px;
}

.subheading-card p {
    color: var(--light-text);
    margin: 0;
}

.section-subtitle {
    color: var(--light-text);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Animation Classes */
.animated-element {
    animation-duration: var(--animation-duration);
    animation-fill-mode: both;
}

.fade-in {
    animation-name: fadeIn;
}

.slide-left {
    animation-name: slideInLeft;
}

.slide-right {
    animation-name: slideInRight;
}

.slide-up {
    animation-name: slideInUp;
}

.pulse {
    animation-name: pulse;
    animation-iteration-count: infinite;
    animation-duration: 2s;
}

.rotate {
    animation-name: rotate;
    animation-iteration-count: infinite;
    animation-duration: 10s;
    animation-timing-function: linear;
}

.delay-1 {
    animation-delay: calc(var(--animation-delay) * 1);
}

.delay-2 {
    animation-delay: calc(var(--animation-delay) * 2);
}

.delay-3 {
    animation-delay: calc(var(--animation-delay) * 3);
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    animation: slideInUp 0.5s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--dark-text);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    position: relative;
    margin-left: 25px;
}

.nav-menu a {
    color: var(--dark-text);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

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

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
    min-width: 200px;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 10px 20px;
    display: block;
    color: var(--dark-text);
}

.dropdown-menu a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-text);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    background-color: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--light-text);
}

.hero-image {
    flex: 1;
    text-align: right;
}

.circuit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/circuit-pattern.svg');
    background-size: cover;
    opacity: 0.05;
    z-index: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(102, 204, 153, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 7px 20px rgba(102, 204, 153, 0.5);
    transform: translateY(-2px);
    color: var(--white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Fallback spacing if gap is not applied by the browser */
.cta-buttons > * {
    margin-right: 12px;
}
.cta-buttons > *:last-child {
    margin-right: 0;
}

/* Extra robust spacing for anchors/buttons inside CTA groups */
.cta-buttons .btn + .btn,
.cta-buttons a + a {
    margin-left: 12px;
}

/* Featured Services */
.featured-services h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient);
    transition: all 0.3s ease;
}

.service-card:hover::before {
    width: 100%;
    opacity: 0.1;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--gradient);
    color: var(--white);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--light-text);
    margin-bottom: 20px;
}

.learn-more {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.learn-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.learn-more:hover i {
    transform: translateX(5px);
}

/* Threat Counter */
.threat-counter {
    background: var(--gradient);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.counter-content h2 {
    margin-bottom: 10px;
}

.counters {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 40px;
}

.counter-item {
    padding: 0 20px;
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.counter-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Testimonials */
.testimonials {
    background-color: var(--light-bg);
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 40px;
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-slide {
    padding: 20px;
}

.testimonial-content {
    background-color: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    position: relative;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 20px;
}

.client-info {
    display: flex;
    align-items: center;
}

.client-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.client-info h4 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.client-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--light-text);
}

.slider-controls {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.prev-btn, .next-btn {
    background-color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 5px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Partners */
.partners {
    text-align: center;
}

.partners h2 {
    margin-bottom: 40px;
}

.partner-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

.partner-logos img {
    height: 60px;
    margin: 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.partner-logos img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: var(--white);
    padding: 70px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 15px;
}

.footer-logo h3 {
    margin-bottom: 10px;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.footer-column {
    min-width: 160px;
    margin-bottom: 30px;
}

.footer-column h4 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.footer-column a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
}

.contact-info i {
    margin-right: 10px;
    margin-top: 5px;
}

.social-icons {
    display: flex;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin-bottom: 10px;
}

.footer-bottom ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.footer-bottom ul li {
    margin-left: 20px;
    margin-bottom: 10px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
    
    .services-grid, .team-grid, .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero {
        padding: 140px 0 60px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-content, .hero-image {
        flex: 1;
    }
    
    .contact-grid, .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-form {
        margin-top: 40px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 10px 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        width: 100%;
        display: none;
    }
    
    .dropdown:hover .dropdown-menu {
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 40px;
    }
    
    .cta-buttons {
        justify-content: center;
        gap: 12px; /* ensure gap on mobile */
    }

    /* Fallback vertical spacing if gap is overridden/unsupported on mobile */
    .cta-buttons > * {
        margin-bottom: 12px;
    }
    .cta-buttons > *:last-child {
        margin-bottom: 0;
    }
    
    .counters {
        flex-direction: column;
    }
    
    .counter-item {
        margin-bottom: 30px;
    }
    
    .services-grid, .team-grid, .blog-grid, .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo {
        text-align: center;
        margin-bottom: 40px;
    }
    
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-column {
        text-align: center;
    }
    
    .contact-info li {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-bottom ul {
        justify-content: center;
        margin-top: 10px;
    }
    
    .footer-bottom ul li {
        margin: 0 10px 10px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .client-grid {
        grid-template-columns: 1fr;
    }
    
    .partners-logos {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .partners-logos img {
        margin: 15px;
    }
    
    .service-card, .team-card, .blog-card {
        padding: 20px;
    }
}