/*
 * Tipografia Aníbal – Website Stylesheet
 *
 * A simple, responsive stylesheet for rebuilding the Tipografia Aníbal
 * corporate website. The design stays true to the existing look and feel
 * (strong blues and reds) while modernising the layout for a clean,
 * contemporary user experience. Sections are clearly delineated with
 * generous spacing, subtle drop‑shadows and crisp typography. Media
 * queries adjust column layouts on smaller screens so that the site
 * remains usable on tablets and mobile devices. Feel free to tweak
 * colours in the :root variables below if you need to better match
 * the exact brand palette.
 */

/* Colour palette */
:root {
  --primary-color: #003b8e;        /* deep blue taken from the logo */
  --secondary-color: #e31d25;      /* vibrant red taken from the logo */
  --accent-color: #006bb6;         /* lighter blue for accents */
  --text-dark: #222222;            /* nearly black for body copy */
  --text-light: #ffffff;           /* white for dark backgrounds */
  --background-light: #f5f5f5;     /* very light grey for page background */
  --background-dark: #0a192f;      /* very dark navy for footer */
  --border-radius: 4px;
  --transition-speed: 0.3s;
}

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

html, body {
  height: 100%;
  width: 100%;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background-color: var(--background-light);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

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

/* Top contact bar */
.top-bar {
  background-color: var(--primary-color);
  color: var(--text-light);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.top-bar .contact-info {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.top-bar .contact-info span {
  display: flex;
  align-items: center;
}

.top-bar .contact-info span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.35rem;
  background-size: contain;
  background-repeat: no-repeat;
  filter: invert(1);
}

.top-bar .contact-info .phone::before { background-image: url('../img/icon_phone.svg'); }
.top-bar .contact-info .email::before { background-image: url('../img/icon_email.svg'); }
.top-bar .contact-info .address::before { background-image: url('../img/icon_location.svg'); }

.top-bar .cta {
  background-color: var(--secondary-color);
  padding: 0.3rem 0.8rem;
  border-radius: var(--border-radius);
  color: var(--text-light);
  font-weight: 600;
  transition: background-color var(--transition-speed);
}

.top-bar .cta:hover {
  background-color: var(--accent-color);
}

/* Navigation bar */
nav {
  /* Use a light background so the logo stands out */
  background-color: var(--text-light);
  color: var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

nav .logo {
  display: flex;
  align-items: center;
}

nav .logo img {
  /* Increase the logo size for better visibility */
  height: 100px;
  width: auto;
}

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

nav ul li a {
  /* With the light nav background, use primary colour for links */
  color: var(--primary-color);
  font-weight: 500;
  padding: 0.4rem 0.2rem;
  position: relative;
}

nav ul li a::after {
  content: "";
  display: block;
  height: 2px;
  width: 0;
  background-color: var(--secondary-color);
  transition: width var(--transition-speed);
  position: absolute;
  bottom: -3px;
  left: 0;
}

nav ul li a:hover::after {
  width: 100%;
}

/* Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Hero section */
.hero {
  position: relative;
  background-image: url('../img/hero.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.hero .btn {
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color var(--transition-speed);
}

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

/* Section headings */
section {
  padding: 4rem 0;
}

section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  position: relative;
}

section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 0.75rem auto 0;
}

/* Feature cards (Quality, Years, Technical advice) */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--transition-speed);
}

.feature:hover {
  transform: translateY(-4px);
}

.feature img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

.feature h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.feature p {
  font-size: 0.95rem;
  color: var(--gray-color);
}

/* Why choose us section */
.why {
  background-color: #ffffff;
}

.why .container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.why .text {
  flex: 1 1 300px;
}

.why h2 {
  text-align: left;
}

.why ul {
  margin-top: 1rem;
  list-style: none;
}

.why ul li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.why ul li::before {
  content: "\2714";
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: 0.5rem;
  margin-top: 0.2rem;
}

.why .image {
  flex: 1 1 300px;
  text-align: center;
}

.why .image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Card grids used for products and services */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform var(--transition-speed);
  display: flex;
  flex-direction: column;
}

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

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card .card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card .card-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card .card-text {
  font-size: 0.95rem;
  color: var(--gray-color);
  flex: 1;
}

.card .card-link {
  margin-top: 0.75rem;
  color: var(--secondary-color);
  font-weight: 600;
  align-self: flex-start;
}

.card .card-link:hover {
  color: var(--accent-color);
}

/* Footer */
footer {
  background-color: var(--background-dark);
  color: var(--text-light);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

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

footer h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

footer ul {
  list-style: none;
}

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

footer ul li a {
  color: var(--text-light);
  font-size: 0.95rem;
  transition: color var(--transition-speed);
}

footer ul li a:hover {
  color: var(--secondary-color);
}

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

footer .social a img {
  width: 24px;
  height: 24px;
  filter: invert(1);
  transition: opacity var(--transition-speed);
}

footer .social a img:hover {
  opacity: 0.7;
}

footer .copyright {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #a7a7a7;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .why .container {
    flex-direction: column;
  }
}