/* Basic Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Color Palette based on Pyrordia Technologies Logo */
:root {
    --primary-blue: #007bff;
    --dark-blue-text: #002244;
    --light-grey-bg: #f8f9fa;
    --white: #ffffff;
    --dark-grey-text: #333333;
    --medium-grey-shadow: #888888;
    --accent-silver: #c0c0c0;
    --success-green: #28a745;
    --warning-orange: #ffc107;
}

/* Body Styles */
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark-grey-text);
    background-color: var(--light-grey-bg);
    overflow-x: hidden;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-grey-bg);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container for Centering Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Headings */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-blue-text);
    margin-bottom: 20px;
}

h1 {
    font-size: 2.8em;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

h2 {
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
}

/* Links */
a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-blue-text);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
    border: 2px solid var(--primary-blue);
}

.btn-primary:hover {
    background-color: var(--dark-blue-text);
    border-color: var(--dark-blue-text);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* Header */
.main-header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo img {
    height: 50px;
    max-width: 100%;
    transition: height 0.3s ease;
}

.main-header.scrolled .logo img {
    height: 40px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-blue-text);
    margin: 3px 0;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    color: var(--dark-blue-text);
    font-weight: 600;
    font-size: 1.1em;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
    left: 0;
    background: var(--primary-blue);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 34, 68, 0.8), rgba(0, 123, 255, 0.6)), 
                radial-gradient(circle at 50% 50%, rgba(0, 123, 255, 0.3) 0%, transparent 50%);
    color: var(--white);
    padding: 150px 0 100px;
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section h1 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 3.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section .tagline {
    font-size: 1.4em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-section .btn {
    font-size: 1.2em;
    padding: 15px 30px;
    margin: 0 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 123, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0); }
}

/* Stats Section */
.stats-section {
    background: var(--white);
    padding: 60px 0;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    color: var(--dark-grey-text);
    font-weight: 600;
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.services-section h2 {
    margin-bottom: 60px;
    position: relative;
}

.services-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--dark-blue-text));
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.service-item {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.05), transparent);
    transition: left 0.5s;
}

.service-item:hover::before {
    left: 100%;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.service-item .service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue-text));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2em;
    transition: transform 0.3s ease;
}

.service-item:hover .service-icon {
    transform: rotate(360deg) scale(1.1);
}

.service-item h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

.service-item:hover h3 {
    color: var(--dark-blue-text);
}

.service-item p {
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--dark-grey-text);
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--dark-blue-text) 0%, #003366 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.contact-section h2 {
    color: var(--white);
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.contact-section > p {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 2;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.contact-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.contact-item .contact-icon {
    font-size: 2.5em;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.contact-item h3 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.contact-item p {
    margin-bottom: 0;
    font-size: 1em;
    color: var(--white);
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-silver);
    text-decoration: underline;
}

/* Footer */
.main-footer {
    background-color: #1a1a1a;
    color: var(--white);
    padding: 50px 0 20px;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95em;
    line-height: 1.6;
}

.footer-section a:hover {
    color: var(--primary-blue);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--dark-blue-text);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--dark-blue-text);
    transform: translateY(-3px);
}

/* Animations for scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Ripple effect for buttons */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn {
    position: relative;
    overflow: hidden;
}

/* Responsive Design (Media Queries) */

/* Small screens (e.g., phones) */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        padding: 20px 0;
    }

    .main-nav ul li {
        margin: 0;
        text-align: center;
    }

    .main-nav ul li a {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .hero-section {
        padding: 120px 20px 80px;
        min-height: 70vh;
    }

    .hero-section h1 {
        font-size: 2.2em;
    }

    .hero-section .tagline {
        font-size: 1.1em;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    h2 {
        font-size: 1.8em;
    }

    .main-footer .container {
        padding: 0 20px;
    }
}

/* Medium screens (e.g., tablets) */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}/* Logo with company name styling */
.main-header .logo {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between logo and text */
}

.main-header .logo img {
    height: 50px;
    max-width: 100%;
    transition: height 0.3s ease;
}

.company-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--dark-blue-text);
    white-space: nowrap; /* Prevents text wrapping */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .company-name {
        font-size: 1.2em;
    }
    
    .main-header .logo {
        gap: 10px;
    }
    
    .main-header .logo img {
        height: 40px;
    }
}

/* When header scrolls, adjust sizes */
.main-header.scrolled .logo img {
    height: 40px;
}

.main-header.scrolled .company-name {
    font-size: 1.3em;
}