/* Apply to section headings */
h1, h2, h3 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
}

/* Apply to buttons */
.btn, button, .read-more-btn {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
}

:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #212529;
    --text-secondary: #495057;
    --accent: RGB(0,125,182);
    --accent-hover: #005d85;
    --border:RGB(0,125,182);
    --card-bg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --header-bg: #101820; /* RGB 16,24,32 - consistent header background */
    --divider-color: #c0c0c0; /* Light grey for section dividers */
}

.dark {
    --bg-primary: #121212;
    --bg-secondary: #101820; /* RGB 16,24,32 */
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --accent: RGB(0,125,182);
    --accent-hover:  #005d85;
    --border: RGB(0,125,182);
    --card-bg: #2d2d2d;
    --shadow: rgba(0, 0, 0, 0.3);
    --header-bg: #101820; /* RGB 16,24,32 - consistent header background */
    --divider-color: #808080; /* Slightly darker grey for dark theme dividers */
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s, color 0.3s;
}

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

/* Header */
header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

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

/* Logo positioning */
.logo {
    flex: 0 0 auto;
    padding-left: 20px;
}

.logo img {
    width: auto;
    height: 100%;
    vertical-align: middle;
    margin-top: -12px;
    margin-bottom: -12px;
    transition: height 0.3s ease;
    min-height: 70px;
}

nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 15px;
}

nav ul li a {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background-color: var(--bg-secondary);
    box-shadow: 0 2px 4px var(--shadow);
    display: inline-block;
}

nav ul li a:hover {
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
    border-color: var(--accent);
}

nav ul li a:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px var(--shadow);
}

/* Theme toggle positioning */
#theme-toggle {
    flex: 0 0 auto;
    padding-right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.sun-icon, .moon-icon {
    display: inline-block;
}

html.dark .sun-icon {
    display: inline-block;
}

html.dark .moon-icon {
    display: none;
}

html:not(.dark) .sun-icon {
    display: none;
}

html:not(.dark) .moon-icon {
    display: inline-block;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #f8f9fa; /* Light color for better visibility in both modes */
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
    position: relative; /* Keep it within header flow */
    z-index: 101; /* Above header but below modal */
}

@media (max-width: 768px) {
    header .container {
        position: relative; /* Ensure the absolute positioning works correctly */
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo img {
        height: 40px; /* Scale down logo on mobile, but not below min-height */
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none; /* Hide navigation by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px var(--shadow);
        z-index: 99; /* Below header but above content */
    }
    
    nav ul.active {
        display: flex; /* Show navigation when active class is added */
    }
    
    nav ul li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        width: 80%;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 40px; /* Keep logo at this size even on smaller devices */
    }
}

/* Update nav buttons to work with dark header in light mode */
html:not(.dark) nav ul li a {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f8f9fa;
}

html:not(.dark) nav ul li a:hover {
    color: var(--accent);
}

/* Light theme - make only headings and labels light grey */
html:not(.dark) section h1,
html:not(.dark) section h2,
html:not(.dark) section h3 {
    color: #e9ecef;
}

/* Light theme - exclude contact form labels from forced light color */
html:not(.dark) section label:not(.contact-card label) {
    color: #e9ecef;
}

/* About Us card styling */
.about-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    position: relative;
    z-index: 2;
}

/* About Us text follows theme colors like other sections */
.about-card p {
    color: var(--text-primary);
}

/* Sections */
section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Section borders - 1cm from browser edges */
section:not(#hero) {
    border: 2px solid #7f92a5 !important;
    border-radius: 8px !important;
    margin: 20px 37.8px 20px 37.8px !important; /* 1cm = 37.8px approximately */
    padding: 40px 0 !important;
    box-sizing: border-box !important;
}

#hero {
    position: relative;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    padding: 40px 0;
    height: 940px;
}

/* Particles.js background for hero section */
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #000000;
    pointer-events: none;
}

#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Section borders - exclude hero section */
section:not(#hero) {
    border: 2px solid var(--border);
    border-radius: 10px;
    margin: 20px 0;
}

section:not(#hero) .container {
    padding: 40px 20px;
}

#hero .container {
    position: relative;
    z-index: 10;
    width: 100%;
}

#hero h1 {
    margin-top: 350px;
    margin-bottom: 30px;
    font-size: 3.5rem;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 100px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
}

/* Global static background */
body {
    background-image: url('/images/wallpaper.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}



/* Ensure all content appears above global video */
/* Header positioning is already set above - keep it fixed */

section {
    position: relative;
    z-index: 1;
}

section .container {
    position: relative;
    z-index: 1;
}

/* Ensure contact form stands out from background */
.contact-card {
    position: relative;
    z-index: 2;
}

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

.service-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s;
    position: relative;
    z-index: 2;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--accent) !important;
}

/* Team */
.team-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.team-member {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
}

.member-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.member-photo {
    width: 300px;
    height: 500px;
    border-radius: 5%;
    overflow: hidden;
    flex-shrink: 0;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto; /* Default rendering */
    filter: none; /* Remove any filters */
}

.member-info {
    flex-grow: 1;
}

.member-info h3 {
    margin-bottom: 5px;
    color: var(--accent) !important;
}

.member-title {
    font-weight: bold;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.member-bio {
    line-height: 1.6;
}

/* Responsive adjustments for team section */
@media (max-width: 768px) {
    .member-content {
        flex-direction: column;
        text-align: center;
    }

    .member-photo {
        margin: 0 auto 20px;
        width: 200px;
        height: 300px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .member-photo {
        width: 150px;
        height: 225px;
    }
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: transform 0.3s;
    position: relative;
    z-index: 2;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    color: var(--text-primary);
}

.testimonial-text::before {
    content: '"';
    font-size: 2rem;
    color: var(--accent);
    line-height: 1;
}

.testimonial-text::after {
    content: '"';
    font-size: 2rem;
    color: var(--accent);
    line-height: 1;
}

.testimonial-author {
    margin-top: auto;
    padding-top: 15px;
    border-top: 2px solid var(--accent);
}

.testimonial-author h4 {
    margin: 0 0 5px 0;
    color: var(--accent);
    font-size: 1.1rem;
}

.author-title {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Video Testimonials */
.video-testimonial {
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    height: 250px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}

.video-testimonial:hover {
    transform: translateY(-5px) scale(1.02);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0,125,182,0.8), rgba(0,93,133,0.9));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    transition: all 0.3s ease;
    z-index: 3;
}

.video-testimonial:hover .play-button {
    background-color: white;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
    padding: 30px 20px 20px;
    text-align: center;
}

.video-overlay h4 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    color: white !important;
}

.video-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.video-modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--accent);
    color: white;
}

.video-modal-header h3 {
    margin: 0;
    color: white !important;
}

.video-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.video-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    background-color: #000;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
}

/* Video loading indicator */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

.video-loading p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Contact */
.contact-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    position: relative;
    z-index: 2;
}

/* Contact form labels follow theme colors */
.contact-card label {
    color: var(--text-primary);
}

/* Center the contact form submit button */
.contact-card .btn {
    display: block;
    margin: 0 auto;
}

/* Center the reCAPTCHA widget */
.recaptcha-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
    overflow: hidden;
}

/* Ensure reCAPTCHA is responsive on mobile */
.recaptcha-container > div {
    max-width: 100%;
    transform-origin: 0 0;
}

/* Mobile reCAPTCHA scaling */
@media (max-width: 480px) {
    .recaptcha-container > div {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--accent-hover);
}

/* Spinner animation for button */
.spinner {
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

/* Form message styles */
.form-message {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.form-message-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    position: relative;
}

.form-message-icon {
    font-size: 18px;
    margin-right: 12px;
    font-weight: bold;
}

.form-message-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.form-message-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.form-message-close:hover {
    opacity: 1;
}

/* Message type styles */
.form-message-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.form-message-error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.form-message-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.form-message-info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* Dark theme message styles */
.dark .form-message-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #4caf50;
}

.dark .form-message-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #f44336;
}

.dark .form-message-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ff9800;
}

.dark .form-message-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: #2196f3;
}

.dark .form-message-close {
    color: inherit;
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Footer */
footer {
    background-color: var(--bg-secondary);
    padding: 30px 0;
    text-align: center;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    margin: 0 10px;
    color: var(--text-secondary);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    

    #hero {
        padding: 40px 0;
        height: 780px;
    }

    #hero h1 {
        font-size: 2.5rem;
        margin-top: 290px;
        margin-bottom: 20px; /* Reduced to bring button closer */
    }

    /* Ensure hero button looks good on mobile */
    #hero .btn {
        font-size: 1rem;
        padding: 12px 24px;
        margin-top: 20px;
    }

    /* Reduce section border margins on mobile - half the desktop distance */
    section:not(#hero) {
        margin: 20px 18.9px 20px 18.9px !important; /* Half of 37.8px = 18.9px */
    }

    /* Reduce container padding on mobile to stretch cards closer to borders */
    .container {
        padding: 0 5px; /* Further reduced from 10px to 5px */
    }

    section:not(#hero) .container {
        padding: 40px 5px; /* Further reduced horizontal padding from 10px to 5px */
    }

    /* Testimonials mobile adjustments */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-card {
        padding: 20px;
    }

    .testimonial-text {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .testimonial-text::before,
    .testimonial-text::after {
        font-size: 1.5rem;
    }

    /* Video testimonials mobile adjustments */
    .video-testimonial {
        height: 200px;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .video-modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .video-modal-header {
        padding: 15px;
    }

    .video-modal-header h3 {
        font-size: 1.2rem;
    }


}

/* Extra small mobile devices */
@media (max-width: 480px) {
    #hero {
        padding: 40px 0;
        height: 620px;
    }

    #hero h1 {
        font-size: 1.8rem;
        margin-top: 220px;
        margin-bottom: 15px; /* Reduced to bring button closer */
    }

    /* Ensure hero button looks good on extra small mobile */
    #hero .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
        margin-top: 15px;
    }

    /* Keep reduced section border margins on extra small mobile */
    section:not(#hero) {
        margin: 20px 18.9px 20px 18.9px !important; /* Half of 37.8px = 18.9px */
    }

    /* Keep reduced container padding on extra small mobile */
    .container {
        padding: 0 5px; /* Further reduced from 10px to 5px */
    }

    section:not(#hero) .container {
        padding: 40px 5px; /* Further reduced horizontal padding from 10px to 5px */
    }

    /* Testimonials extra small mobile adjustments */
    .testimonial-card {
        padding: 15px;
    }

    .testimonial-text {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    .testimonial-text::before,
    .testimonial-text::after {
        font-size: 1.2rem;
    }

    .testimonial-author h4 {
        font-size: 1rem;
    }

    .author-title {
        font-size: 0.8rem;
    }

    /* Video testimonials extra small mobile adjustments */
    .video-testimonial {
        height: 180px;
    }

    .play-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .video-overlay h4 {
        font-size: 1.1rem;
    }

    .video-overlay p {
        font-size: 0.8rem;
    }

    .video-modal-content {
        margin: 15% auto;
        width: 98%;
    }

    .video-modal-header {
        padding: 10px 15px;
    }

    .video-modal-header h3 {
        font-size: 1rem;
    }

    .video-modal-close {
        font-size: 1.5rem;
        width: 25px;
        height: 25px;
    }


}

@media (max-width: 1200px) {
    .logo {
        padding-left: 0; /* Remove padding on smaller screens */
    }
    
    #theme-toggle {
        padding-right: 0; /* Remove padding on smaller screens */
    }
}

@media (max-width: 768px) {
    .logo {
        padding-left: 10px; /* Less space on mobile */
    }
    
    #theme-toggle {
        padding-right: 10px; /* Less space on mobile */
    }
}





