/* --- 1. GLOBAL SETTINGS & VARIABLES --- */
:root {
    --bg-dark: #0e1525;
    --accent-blue: #37aed9;
    --form-bg: #1a243a;
    --text-light: #ffffff;
    --text-muted: #888;
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

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

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

/* --- 2. NAVIGATION BAR (UPDATED) --- */
.navbar {
    width: 100%;
    height: 120px;
    background: rgba(14, 21, 37, 0.98);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    position: fixed;
    top: 0;
    z-index: 2000;
    border-bottom: 1px solid rgba(55, 174, 217, 0.2);
}

/* New Container for Logo + Text */
.logo-group {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between logo image and text */
}

/* Keep existing logo sizing, but remove margin (handled by group now) */
.main-logo { 
    max-height: 80px; /* Slightly reduced to fit text */
    width: auto; 
}

/* Text Column */
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

/* Main Heading Style */
.company-name {
    font-family: 'Eurostile', 'Eurostile Bold Extended', sans-serif; 
    font-weight: bold;
    color: #FFFFFF;
    font-size: 1.5rem; /* Adjust size as desired */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tagline Style */
.company-tagline {
    font-family: 'Eurostile', 'Eurostile Extended Regular', sans-serif;
    color: #5BC2E7;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Existing Nav Links (Unchanged) */
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { 
    text-decoration: none; 
    color: white; 
    font-weight: bold; 
    text-transform: uppercase; 
    font-size: 0.9rem; 
    transition: 0.3s; 
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-blue); }

/* --- 3. HERO SECTIONS --- */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 140px;
    background: linear-gradient(rgba(14, 21, 37, 0.7), rgba(14, 21, 37, 0.7)), 
                url('../images/hero_bg.jpeg') no-repeat center center/cover;
}

.product-hero {
    min-height: 60vh;
    padding-top: 140px;
}

.hero-content h1 { 
    font-size: 4rem; 
    letter-spacing: 10px; 
    margin-bottom: 20px; 
    text-transform: uppercase;
}

/* --- 4. GRID SYSTEMS --- */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    margin: 40px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
    margin-bottom: 60px;
}

/* Update this existing block */
.card, a.product-card {
    background-color: var(--form-bg);
    border: 1px solid rgba(55, 174, 217, 0.3);
    border-radius: 8px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    
    /* ADD THIS LINE to fix the corners sticking out */
    overflow: hidden; 
}

/* ADD THIS NEW BLOCK to restore the "pop out" effect */
a.product-card:hover {
    transform: translateY(-5px);       /* Moves the card up slightly */
    border-color: var(--accent-blue);  /* Lights up the border */
    box-shadow: 0 10px 20px rgba(0,0,0,0.4); /* Adds a subtle shadow underneath */
}

a.product-card { padding: 0; }
.product-img { width: 100%; height: 220px; object-fit: cover; }
.p-content { padding: 25px; flex-grow: 1; }
.p-content p { min-height: 2.8em; }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 40px 0;
}

.about-grid[style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 2fr 1fr !important;
    align-items: start;
}

.about-img { 
    width: 100%; 
    border-radius: 10px; 
    border: 1px solid rgba(55, 174, 217, 0.2); 
    height: auto;
}

/* --- 5. INFO BOX & ALIGNMENT --- */
.info-box {
    background: rgba(55, 174, 217, 0.05);
    border: 1px solid rgba(55, 174, 217, 0.3);
    padding: 60px 40px;
    border-radius: 8px;
    margin-top: 50px;
    text-align: center; /* Centers title and main text */
}

.info-icons { 
    display: flex; 
    justify-content: center; 
    gap: 40px; 
    flex-wrap: wrap; 
    margin-top: 30px; 
}

.info-item { 
    max-width: 300px; 
    text-align: center; /* Centers emoji, h4, and p within each item */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-item h4 { margin: 10px 0; color: var(--text-light); }

/* --- 6. BUTTONS & FOOTER --- */
.btn-main {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--accent-blue);
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: 0.3s;
}

footer { text-align: center; padding: 60px 0; border-top: 1px solid rgba(255,255,255,0.05); }

/* --- 7. MOBILE OPTIMIZATION (FIXED) --- */
@media (max-width: 992px) {
    /* Fix: Force standard grid to 2 columns on tablets */
    .grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* --- NAVBAR FIXES --- */
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }

    .logo-group {
        flex-direction: row;    /* Keep logo and text side-by-side */
        justify-content: center; /* Center the whole group on screen */
        margin-bottom: 15px;
        width: 100%;
    }

    .main-logo { 
        max-height: 50px; 
        margin-bottom: 0; 
    }
    
    .logo-text {
        align-items: flex-start; 
        text-align: left;
    }
    
    .company-name { font-size: 1.1rem; letter-spacing: 0.5px; }
    .company-tagline { font-size: 0.55rem; letter-spacing: 1px; }

    /* Horizontal Scrollable Nav Links */
    .nav-links {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 20px;
        gap: 20px;
        justify-content: flex-start; 
        -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
        scrollbar-width: none;    /* Hide scrollbar Firefox */
    }
    .nav-links::-webkit-scrollbar { display: none; /* Hide scrollbar Chrome/Safari */ }

    /* --- HERO & TEXT FIXES --- */
    /* Fix: Reduce massive desktop font size so it doesn't stretch off screen */
    .hero-content h1 {
        font-size: 2.2rem; 
        letter-spacing: 3px;
        line-height: 1.2;
    }
    
    .hero p {
        padding: 0 20px; /* Prevent text touching screen edges */
    }

    /* --- GRID & LAYOUT FIXES --- */
    /* Fix: Force ALL grids to 1 column so items don't look "tiny" */
    .grid, .products-grid, .about-grid { 
        grid-template-columns: 1fr !important; 
        gap: 40px;
    }
    
    /* Specific fix for the '2fr 1fr' split on product pages */
    .about-grid[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Ensure images/videos take full width */
    .about-img, video {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    
    /* Fix for Specialist Apps Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
