/* ========================================
   GALAXIES CODERS - MAIN STYLESHEET
   Professional CSS with Full Mobile Responsiveness
======================================== */

/* ========================================
   CSS VARIABLES (Brand Colors & Settings)
======================================== */
:root {
    --primary-cyan: #00f0ff;
    --primary-blue: #0080ff;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --text-light-gray: #e0e0e0;
    --accent-gradient: linear-gradient(135deg, #00f0ff, #0080ff);
    --shadow-glow: 0 4px 20px rgba(0, 240, 255, 0.3);
    --transition-speed: 0.3s;
    --max-width: 1200px;
}

/* ========================================
   RESET & BASE STYLES
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========================================
   UTILITY CLASSES
======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   HEADER & NAVIGATION
======================================== */
header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-glow);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

/* Logo Image Version (uncomment to use image instead of text) */
.logo-image {
    height: 50px;
    width: auto;
    display: block;
}

.logo-image img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all var(--transition-speed);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-speed);
}

.nav-menu a:hover::after {
    width: 80%;
}

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

.cta-nav {
    background: var(--accent-gradient);
    color: var(--dark-bg);
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    transition: all var(--transition-speed);
}

.cta-nav:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.cta-nav::after {
    display: none;
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--primary-cyan);
    border-radius: 3px;
    transition: all var(--transition-speed);
}

.menu-toggle {
    display: none;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
    margin-top: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.95) 0%, rgba(26, 26, 46, 0.95) 50%, rgba(10, 10, 10, 0.95) 100%), 
                url('../images/hero-bg.jpg') center/cover no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

/* Fallback if no background image */
.hero:not([style*="background-image"]) {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 0.5; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2); 
        opacity: 0.8; 
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: 2px;
}

.hero .tagline {
    font-size: 1.8rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    letter-spacing: 5px;
    font-weight: 300;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light-gray);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero {
    margin-top: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

/* Dark overlay for better text visibility */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent-gradient);
    color: var(--dark-bg);
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    transition: all var(--transition-speed);
    margin: 0.5rem;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.cta-button-outline {
    background: transparent;
    color: var(--primary-cyan);
    border: 2px solid var(--primary-cyan);
}

.cta-button-outline:hover {
    background: var(--accent-gradient);
    color: var(--dark-bg);
    border-color: transparent;
}

/* ========================================
   CARDS & GRID LAYOUTS
======================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    transition: all var(--transition-speed);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-glow);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.card p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* ========================================
   STATS SECTION
======================================== */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.stat-box {
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* ========================================
   CLIENT LOGOS WITH IMAGES
======================================== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    align-items: center;
    justify-items: center;
    margin-top: 3rem;
}

.client-logo {
    width: 150px;
    height: 80px;
    background: var(--card-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all var(--transition-speed);
    border: 1px solid transparent;
}

.client-logo:hover {
    border-color: var(--primary-cyan);
    transform: scale(1.05);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(1.5);
    transition: filter var(--transition-speed);
}

.client-logo:hover img {
    filter: grayscale(0%) brightness(1);
}

/* ========================================
   TESTIMONIALS
======================================== */
.testimonial {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--primary-cyan);
    margin-bottom: 2rem;
}

.testimonial-text {
    color: var(--text-light-gray);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.testimonial-author {
    color: var(--primary-cyan);
    font-weight: bold;
}

.testimonial-company {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ========================================
   CONTACT FORM
======================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light-gray);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background: var(--dark-bg);
    border: 1px solid var(--text-gray);
    border-radius: 5px;
    color: var(--text-white);
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    color: var(--dark-bg);
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-box {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-cyan);
}

.info-box h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-cyan);
}

.info-box p {
    color: var(--text-gray);
}

/* ========================================
   FOOTER
======================================== */
footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    padding: 3rem 0 1rem;
    margin-top: 5rem;
    border-top: 1px solid var(--primary-cyan);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-cyan);
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-gray);
    transition: color var(--transition-speed);
}

.footer-section ul li a:hover {
    color: var(--primary-cyan);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.social-links a:hover {
    background: var(--accent-gradient);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--text-gray);
    color: var(--text-gray);
}

/* ========================================
   PORTFOLIO/PROJECTS WITH IMAGES
======================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: all var(--transition-speed);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--dark-bg);
    position: relative;
    overflow: hidden;
}

/* Portfolio Image with actual screenshots */
.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

/* Image overlay for better text readability */
.portfolio-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

.portfolio-tech {
    color: var(--primary-cyan);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.portfolio-content p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE DESIGN - TABLET
======================================== */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero .tagline {
        font-size: 1.4rem;
        letter-spacing: 3px;
    }

    .section-title {
        font-size: 2rem;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
======================================== */
@media screen and (max-width: 768px) {
    /* Mobile Navigation Drawer */
    .hamburger {
        display: flex;
        z-index: 1002;
    }

    /* Navigation Drawer */
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        flex-direction: column;
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
        width: 280px;
        max-width: 80%;
        text-align: left;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 30px rgba(0, 240, 255, 0.2);
        padding: 5rem 0 2rem 0;
        gap: 0;
        overflow-y: auto;
        z-index: 1001;
    }

    .nav-menu li {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid rgba(176, 176, 176, 0.1);
    }

    .nav-menu a {
        width: 100%;
        display: block;
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }

    .nav-menu a::after {
        display: none;
    }

    /* CTA button in drawer */
    .cta-nav {
        margin: 1rem 2rem;
        text-align: center;
        display: block;
        width: calc(100% - 4rem);
    }

    /* Overlay when drawer is open */
    .menu-toggle:checked ~ .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: -1;
        animation: fadeIn 0.3s;
    }

    /* Open drawer */
    .menu-toggle:checked ~ .nav-menu {
        right: 0;
    }

    /* Hamburger animation to X */
    .menu-toggle:checked ~ .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .menu-toggle:checked ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked ~ .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* Prevent body scroll when drawer is open */
    .menu-toggle:checked ~ body {
        overflow: hidden;
    }

    /* Mobile Typography */
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .tagline {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section {
        padding: 3rem 0;
    }

    /* Mobile Grid Adjustments */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Mobile Buttons */
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* Mobile Form */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ========================================
   RESPONSIVE DESIGN - SMALL MOBILE
======================================== */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .tagline {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .clients-grid {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ========================================
   FAQ DROPDOWN STYLES - IMPROVED READABILITY
======================================== */

.faq-container {
    margin-top: 2rem;
}

.faq-item {
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.faq-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    color: #222;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #222;
    flex: 1;
}

.faq-question:hover {
    background: #f8f9fa;
    border-bottom-color: var(--primary-cyan);
}

.faq-toggle {
    font-size: 1.2rem;
    color: var(--primary-cyan);
    transition: transform 0.3s ease;
    margin-left: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0f8ff;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.faq-answer p {
    margin: 0;
    padding: 1.5rem;
    line-height: 1.6;
    color: #555;
    font-size: 1rem;
    border-top: 1px solid #f0f0f0;
}

/* Active FAQ Item */
.faq-item.active .faq-question {
    background: #f0f8ff;
    border-bottom-color: var(--primary-cyan);
}

.faq-item.active .faq-question h3 {
    color: var(--primary-blue);
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
    background: var(--primary-cyan);
    color: white;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* FAQ numbering (optional visual enhancement) */
.faq-question h3::before {
    content: "Q: ";
    color: var(--primary-cyan);
    font-weight: bold;
    margin-right: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-question {
        padding: 1.2rem;
    }
    
    .faq-question h3 {
        font-size: 1.1rem;
    }
    
    .faq-answer p {
        padding: 1.2rem;
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */
:focus-visible {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}