/* Minimalist style.css - Alignment Adjustments + Images + Rekago Emphasis */

:root {
    --primary_background: #081b28;
    --primary_accent: #2b93af;
    --text_color: #fff;
    --secondary_text: #9ca3af;
    --border_color: rgba(255, 255, 255, 0.1);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--primary_background);
  color: var(--text_color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-weight: 300;
}

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

/* Typography */
h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  text-align: center; /* Center section titles */
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 20px;
  color: var(--secondary_text);
}

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

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

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary_accent);
  color: var(--text_color);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #54b3c9;
  transform: translateY(-2px);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(8, 27, 40, 0.9);
  z-index: 1000;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.logo {
  font-size: 1.3rem; /* Increased logo font size */
  font-weight: 500; /* Made logo bolder */
}

.nav {
  display: flex;
  align-items: center; /* Vertically align nav items */
  gap: 10px;
}

.nav a {
  display: block;
  padding: 10px 20px;
}

/* Hero Section */
.hero {
  padding: 150px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertically center content */
  align-items: center;       /* Horizontally center content */
    background-image: url("images/Kita Mesra, Cybersouth.jpg"); /* Hero Background Image */
    background-size: cover;
    background-position: center;
    color: #fff;
    position: relative;
}

.hero h1,
.hero p,
.hero a {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Add a dark overlay for better text readability */
    z-index: 0;
}

.hero * {
    z-index: 1; /* Ensure text is above the overlay */
    position: relative;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 30px;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 40px;
}

/* Sections */
section {
  padding: 80px 0;
}

/* About Section */
.about-content {
  display: flex;
  gap: 40px;
  align-items: stretch;
  text-align: left;
    flex-direction: column; /* Stack on smaller screens */
}

.about-text {
    flex: 1; /* Equal width for text */
}

.about-image {
    flex: 1; /* Equal width for image */
    width: 100%; /* Take full width on smaller screens*/
    height: 600px; /* Set fixed height for web view */
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  height: 100%;
}

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

.service-card {
  padding: 20px;
  border: 1px solid var(--border_color);
  border-radius: 8px;
  text-align: center; /* Center service card content */
}

.service-card img {
  width: 100%;
  max-height: 200px; /* Limit image height */
  object-fit: cover;
  margin-bottom: 15px;
  border-radius: 5px;
}

/* Gallery Section */
.gallery {
    background-color: var(--primary_background);
    padding: 80px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 40px 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3/2;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: scale(1);
    cursor: pointer;
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(8, 27, 40, 0) 0%,
        rgba(8, 27, 40, 0.2) 50%,
        rgba(8, 27, 40, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover::before {
    opacity: 1;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    font-size: 0.9rem;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .gallery {
        padding: 40px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px 10px;
    }

    .gallery-item {
        aspect-ratio: 4/3;
    }

    .gallery-caption {
        padding: 15px;
        font-size: 0.8rem;
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-item {
        aspect-ratio: 16/9;
    }
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start; /* Align items to top */
}

.contact-info {
    text-align: left; /* Left align contact info on web */
}

.contact-info p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background-color: var(--primary_background);
  padding: 40px 0;
  text-align: center; /* Center footer content */
  border-top: 1px solid var(--border_color);
  color: var(--secondary_text);
}

.footer p:first-child {
    font-weight: 500; /* Make Rekago Sdn. Bhd. bolder */
}

/* Mobile Navigation */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    color: var(--text_color);
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    h3 {
        font-size: 1.2rem;
    }

    p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    /* Layout */
    .container {
        padding: 0 15px;
    }

    /* Navigation */
    .menu-toggle {
        display: block;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary_background);
        padding: 10px 0;
        border-top: 1px solid var(--border_color);
    }

    .nav.active {
        display: block;
    }

    .nav a {
        display: block;
        padding: 15px 20px;
        text-align: center;
        border-bottom: 1px solid var(--border_color);
    }

    .nav a:last-child {
        border-bottom: none;
    }

    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
        min-height: 60vh;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 15px;
    }

    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 15px;
    }

    .service-card img {
        max-height: 180px;
    }

    /* About Section */
    .about-content {
        gap: 20px;
    }

    .about-image {
        height: 250px;
    }

    /* Gallery Section */
    .gallery {
        padding: 40px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 20px 0;
    }

    .gallery-item {
        aspect-ratio: 1;
        border-radius: 8px;
    }

    .gallery-caption {
        padding: 10px;
        font-size: 0.8rem;
        opacity: 1;
        transform: translateY(0);
    }

    /* Contact Section */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .contact-info {
        text-align: center;
    }

    /* Buttons */
    .btn-primary {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .btn-gallery {
        padding: 12px 24px;
        font-size: 1rem;
        margin-top: 15px;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

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

    .hero {
        padding: 120px 0;
    }
}

@media (min-width: 768px) {
    .about-content {
        flex-direction: row;
    }
}
