/* Google Fonts Import (Add this if you want to use Roboto) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

/* Define CSS Variables for colors */
:root {
  --primary-color: #003366; /* Consimo Blue */
  --secondary-color: #00008B; /* Darker Blue for headings */
  --accent-color: #005599; /* Lighter blue for hovers/accents */
  --light-grey: #f9f9f9;
  --text-color: #333;
}

body {
  font-family: 'Roboto', sans-serif; /* Using Roboto from Google Fonts */
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f0f2f5; /* A very light grey background for subtle depth */
  overflow-x: hidden; /* Prevent horizontal scroll due to animations */
}

/* Header and Logo Adjustments */
header {
  background: white;
  padding: 15px 0; /* Reduced vertical padding */
  text-align: center;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.logo {
  max-width: 200px; /* Slightly smaller logo for less visual weight */
  height: auto;
  display: block;
  margin: 0 auto 10px auto; /* Centered with less bottom margin */
}
header h1 {
  font-size: 1.8em; /* Slightly smaller heading */
  color: var(--secondary-color);
  margin: 0; /* Remove default h1 margin */
  padding: 0 20px; /* Add horizontal padding for smaller screens */
}

/* Navigation Bar */
nav {
  background: var(--primary-color);
  padding: 0; /* Remove padding here, will be on nav-links */
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky; /* Make menu sticky on scroll */
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Center navigation links */
  align-items: center;
  padding: 0 20px; /* Horizontal padding for responsiveness */
  min-height: 60px; /* Ensure a consistent height */
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; /* Arrange links horizontally */
  justify-content: center;
  width: 100%; /* Take full width */
}

.nav-links li {
  position: relative; /* For dropdown positioning */
}

.nav-links a {
  color: white;
  padding: 18px 25px; /* Generous padding for clickable area */
  text-decoration: none;
  font-weight: bold;
  display: block; /* Make the whole padding clickable */
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover,
.nav-links li.dropdown:hover > a { /* Highlight parent of open dropdown */
  background-color: var(--accent-color);
  color: white;
}

/* Dropdown specific styles */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--primary-color);
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-top: 3px solid var(--accent-color); /* A subtle border to show it's a dropdown */
  animation: fadeIn 0.3s ease-out; /* Fade in animation */
  /* Ensure dropdown stays within viewport on right side */
  right: 0;
  left: auto; /* Override default left:0 if needed */
}

.dropdown-content a {
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  display: block;
  text-align: left;
  transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
  background-color: var(--accent-color);
}

.nav-links li.dropdown:hover .dropdown-content {
  display: block; /* Show dropdown on hover */
}

.arrow-down {
  border: solid white;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.nav-links li.dropdown:hover .arrow-down {
  transform: rotate(-135deg); /* Arrow points up when dropdown is open */
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger-menu {
  display: none; /* Hide by default */
  cursor: pointer;
  padding: 15px;
}
.hamburger-menu span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%); /* Gradient background */
  padding: 80px 40px; /* More generous padding */
  display: flex;
  align-items: center;
  justify-content: center; /* Center items for visual balance */
  gap: 60px; /* More space between text and image */
  flex-wrap: wrap-reverse; /* Image on top on small screens */
  max-width: 1400px; /* Wider hero section */
  margin: 30px auto; /* Centered with top/bottom margin */
  box-sizing: border-box;
  border-radius: 8px; /* Consistent rounded corners */
  overflow: hidden; /* Important for animations */
  position: relative; /* For potential background elements */
  box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* More prominent shadow for hero */
}

.hero-content {
  flex: 1;
  min-width: 300px;
  max-width: 550px; /* Limit text width for readability */
  text-align: left;
  color: white; /* White text on dark background */
  z-index: 2; /* Ensure text is above background effects */
}

.hero-content h2 {
  font-size: 3em; /* Larger, more impactful heading */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
  /* Initial opacity and transform handled by JS through inline style, then JS animation */
}

.hero-content p {
  font-size: 1.3em; /* Larger paragraph text */
  margin-bottom: 30px;
  /* Initial opacity and transform handled by JS through inline style, then JS animation */
}

/* Keyframes for initial fade-in and slide-up (for hero text and image) */
@keyframes fadeInSlideUp {
  to {
    opacity: 1; /* Fade to full opacity */
    transform: translateY(0); /* Move to its final position */
  }
}

.hero-image {
  flex-shrink: 0;
  max-width: 600px; /* Larger image */
  z-index: 2; /* Ensure image is above background effects */
}

.hero-image img {
  max-width: 100%;
  height: auto;
  display: block;
  /* Initial state set by JS through style property, animation applied after */
}

/* New Keyframes for the automatic zoom-in/zoom-out effect for hero image */
@keyframes autoZoomInOut {
  0% {
    transform: scale(1); /* Start at original size */
  }
  50% {
    transform: scale(1.1); /* Zoom in */
  }
  100% {
    transform: scale(1); /* Zoom back out to original size */
  }
}

/* Background patterns/shapes for "less white space" in hero */
.hero::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  animation: float1 8s ease-in-out infinite alternate;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 150px;
  height: 150px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  animation: float2 10s ease-in-out infinite alternate;
}

@keyframes float1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, 30px) scale(1.05); }
}
@keyframes float2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-20px, -30px) scale(0.95); }
}

/* General Sections */
.section {
  padding: 60px 40px; /* Increased top/bottom padding for separation, but wider content area */
  max-width: 1200px; /* Increased for less white space horizontally */
  margin: 30px auto; /* Centers the section with top/bottom margin */
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Subtle shadow for definition */
  background-color: white; /* Each section distinct on a light background */
  border-radius: 8px; /* Soften edges */
  box-sizing: border-box; /* Include padding in width */
}
.section h2, .section h3 {
  color: var(--primary-color);
  margin-bottom: 25px; /* Spacing below headings */
  text-align: center; /* Center headings */
  font-size: 2.5em; /* Larger section headings */
}
.section h3 {
  font-size: 2em; /* Slightly smaller for sub-sections */
}

/* Animation for elements entering viewport */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Grid Layout for Products/Services */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
  gap: 30px; /* More space between grid items */
  margin-top: 30px;
  padding: 0 20px; /* Add horizontal padding for smaller screens */
}

/* Feature Block styles - wraps card and description */
.feature-block {
  display: flex;
  flex-direction: column;
  /* REMOVED align-items: center; and text-align: center; from here */
  background: white;
  padding: 25px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.feature-block:hover {
  transform: translateY(-10px) scale(1.02); /* Lift and slightly enlarge on hover */
  box-shadow: 0 12px 25px rgba(0,0,0,0.15); /* More prominent shadow on hover */
}

/* Card Styles - adjusted for being inside feature-block */
.card {
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  text-align: center; /* Keep the card's image and text centered */
  width: 100%;
  margin-bottom: 15px;
  background: transparent;
  transition: none;
}

.card img {
  max-width: 240px;
  height: auto;
  margin-bottom: 15px;
  filter: drop-shadow(2px 2px 5px rgba(0,0,0,0.1));
}

.card p {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1.1em;
  margin-top: 0;
  margin-bottom: 0;
}

/* Animations for cards */
/* Moved to .feature-block.animated */

/* Feature Description Styles */
.feature-description {
  text-align: center; /* Changed back to center for consistent centering without bullets */
  list-style: none;
  margin-top: 0;
  margin-bottom: 0;
  padding: 10px 15px;
  max-width: 100%;
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.5;
  border-left: 4px solid var(--accent-color);
  padding-left: 1rem;
  box-sizing: border-box;
  background-color: #f8f8f8;
  border-radius: 5px;
}

/* !!! CRITICAL RULE FOR REMOVING BULLETS AND CENTERING THE LIST !!! */
/* This rule targets the UL specifically within feature-description to ensure it's centered and has no bullets. */
.feature-description ul {
  list-style: none !important; /* Forces removal of bullet points */
  text-align: center !important; /* Forces centering of list items */
  padding: 0 !important; /* Removes any default padding from the UL */
  margin: 0 !important; /* Removes any default margin from the UL */
}

/* Ensure individual list items are also centered */
.feature-description ul li {
  text-align: center !important; /* Ensures the text in each LI is centered */
  margin-bottom: 5px; /* Add a small gap between list items if desired */
}


/* Staggered animation for feature-blocks on load (requires JS adjustment for observer) */
.feature-block.animated {
  animation: fadeInScale 0.6s ease-out forwards;
  opacity: 0;
  transform: scale(0.9);
}

/* Form Styles (Contact Section) */
form {
  display: flex;
  flex-direction: column;
  max-width: 600px; /* Wider form */
  margin: 30px auto; /* Adjust margin */
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  box-sizing: border-box; /* Include padding in width */
}
form input,
form textarea {
  margin-bottom: 20px; /* More vertical space */
  padding: 15px; /* Larger padding for input fields */
  font-size: 1.1em;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
form input:focus,
form textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 85, 153, 0.2); /* Subtle glow on focus */
  outline: none; /* Remove default outline */
}
form button {
  padding: 15px 25px;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 8px;
  font-size: 1.2em;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
form button:hover {
  background: var(--accent-color);
  transform: translateY(-2px); /* Slight lift on hover */
}

/* Footer */
footer {
  background: var(--primary-color);
  color: rgba(255,255,255,0.8); /* Slightly softer white */
  padding: 30px 20px; /* More padding */
  text-align: center;
  margin-top: 30px; /* Space from last section */
}
footer a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}
footer a:hover {
  color: var(--accent-color);
}


/* Media Queries for Responsiveness */
@media (max-width: 992px) {
  .hero {
    gap: 30px;
    padding: 60px 20px;
  }
  .hero-content h2 {
    font-size: 2.5em;
  }
  .hero-content p {
    font-size: 1.1em;
  }
  .section {
    padding: 50px 30px;
  }
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    justify-content: space-between; /* Hamburger left, maybe logo right */
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 60px; /* Below nav bar height */
    left: 0;
    background-color: var(--primary-color);
    display: none; /* Hidden by default for mobile */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease-out; /* Slide down animation */
  }
  .nav-links.active { /* Class added by JS to show nav */
    display: flex;
  }
  .nav-links li {
    width: 100%;
    text-align: center;
  }
  .nav-links a {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1); /* Separator */
  }
  .nav-links li:last-child a {
    border-bottom: none;
  }
  .hamburger-menu {
    display: block; /* Show hamburger on mobile */
  }

  /* Hamburger menu animation for close icon */
  .hamburger-menu.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger-menu.open span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Mobile dropdowns */
  .dropdown-content {
    position: static; /* No absolute positioning in mobile dropdown */
    box-shadow: none;
    border-top: none;
    background-color: rgba(0, 51, 102, 0.9); /* Slightly darker for sub-items */
    width: 100%;
  }
  .dropdown-content a {
    padding-left: 40px; /* Indent sub-items */
  }

  .hero {
    flex-direction: column-reverse; /* Text on top, image below for mobile */
    padding: 40px 20px;
  }
  .hero-content {
    text-align: center; /* Center text on mobile hero */
    max-width: 100%; /* Allow text to take full width */
  }
  .hero-content h2 {
    font-size: 2em;
  }
  .hero-content p {
    font-size: 1em;
  }
  .section {
    padding: 40px 20px;
  }
  .section h2, .section h3 {
    font-size: 2em;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}