/* ------------- Base/General ------------- */
html, body {
  font-family: 'Open Sans', sans-serif;
  -webkit-font-smoothing: antialiased !important;
  text-rendering: optimizeLegibility !important;
  color: #777;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  padding: 0;
}

h1 { font-weight: 700; }
h1 strong { font-weight: 900; }
h2 { text-transform: uppercase; line-height: 20px; font-weight: 600; margin: 0; color: #555; }
h3 { font-size: 16px; font-weight: 700; color: #555; }
h4 { font-weight: 500; color: #555; }
h5 { text-transform: uppercase; font-weight: 700; line-height: 20px; }
p { font-size: 14px; margin: 0 0 1em 0; }
a { color: #754747; text-decoration: none; }
a:hover, a:focus { color: #b8202d; text-decoration: none; }

ul, ol { list-style: none; padding: 0; margin: 0; }
.clearfix { display: block; }
.clearfix:after {
  content: " ";
  display: block;
  clear: both;
  visibility: hidden;
  height: 0;
  font-size: 0;
}

/* ------------- Preloader ------------- */
#preloader { position: fixed; top:0; left:0; right:0; bottom:0; background:#ddd; z-index:99999; height:100%; }
#status { position: absolute; left:50%; top:50%; width:64px; height:64px; margin:-32px 0 0 -32px; padding:0; }

/* ------------- Horizontal Rule Accent ------------- */
hr { height:4px; width:70px; background:#b8202d; margin:0 auto 30px; border:0; }

/* ------------- Navbar ------------- */
.navbar-custom {
  padding: 0;
  border-bottom: 0;
  letter-spacing: 1px;
  background: #333;
  text-transform: uppercase;
}
.navbar-custom .navbar-brand { font-weight: 600; }
.navbar-custom .navbar-brand i.fa { color: #b8202d; }
.navbar-custom .navbar-toggle { color:#eee; font-size:18px; border-radius:2px; padding:0 4px; }
.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus { background-color:#b8202d; color:#fff; }
.navbar-custom a { color:#fff; }
.navbar-custom .nav li a {
    color: #fff; /* default white */
    transition: color 0.3s ease-in-out;
}

.navbar-custom .nav li a:hover,
.navbar-custom .nav li a:focus,
.navbar-custom .nav li.active a {
    color: #b8202d; /* red on hover or active */
    background-color: transparent;
}
/* Navbar brand: logo + text side by side */
.navbar-custom .navbar-brand {
    display: flex;               /* flex layout */
    align-items: center;         /* vertically center text with logo */
}

.navbar-custom .navbar-brand img {
    height: 40px;                /* adjust logo height */
    margin-right: 10px;          /* space between logo and text */
}

@media (min-width: 992px) {      /* desktop */
    .navbar-custom .navbar-brand img {
        height: 60px;            /* bigger logo on desktop */
    }
}

@media (max-width: 768px) {      /* mobile */
    .navbar-custom .navbar-brand img {
        height: 35px;            /* smaller on mobile */
    }
}
/* ------------- Intro / Header (HOME) ------------- */
#intro {
  display: table;
  width: 100%;
  height: auto;
  padding: 100px 0;
  text-align: center;
  color: #fff;
  background: url(../img/intro-bg.jpg) no-repeat center center fixed;
  background-color: #000;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  background-size: cover;
  -o-background-size: cover;
}

#intro .intro-body { 
  display: table-cell; 
  vertical-align: middle; 
}

#intro .intro-body h1 { 
  font-size: 76px; 
  font-weight:700; 
  color:#b8202d; 
  text-transform:uppercase; 
  font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif; 
  margin:0; 
}

#intro .intro-body .brand-heading2 { 
  color:#b8202d; 
  text-shadow:0 2px #231f20; 
}

#intro .intro-body .brand-heading { 
  color:#333333; 
  text-shadow:0 2px #231f20; 
  font-weight:700; 
}

#intro .intro-body .intro-text { 
  font-size:18px; 
  color: #ffffff; 
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7); 
}

@media (min-width: 768px) {
  #intro { 
    height: 100%; 
    padding: 0; 
  }
  #intro .intro-body .intro-text { 
    font-size:18px; 
    letter-spacing:1px; 
    margin-bottom:100px; 
  }
}

@media (max-width: 768px) {
  #intro {
    padding: 60px 0;
    background-image: url("../img/intro-bg.jpg") !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
    background-size: cover !important;
    background-attachment: scroll !important;
  }
  #intro .intro-body h1 { 
    font-size: calc(8vw + 12px); 
  }
}

#intro .intro-body .brand-heading-red {
    color: #b8202d;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}

#intro .intro-body .brand-heading-grey {
    color: #333333;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}

#intro #main-logo {
    filter: drop-shadow(2px 2px 6px rgba(0,0,0,0.7));
}

/* ------------- Buttons ------------- */
.btn-default {
  background-color: #b8202d;
  color: #fff;
  border: 0;
  padding: 12px 24px;
  margin: 0 8px;
  font-size: 18px;
  transition: all 0.5s;
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active { 
  background-color: #8e1a25; 
  color: #fff; 
}

#contact .btn-default { 
  background-color: #b8202d; 
  color:#fff; 
  border:0; 
  padding:10px 20px; 
  font-size:15px; 
}

#contact .btn-default:hover, 
#contact .btn-default:focus { 
  background-color:#991a28; 
}

#intro .intro-body .btn {
    box-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}

/* ------------- Animated items ------------- */
.animated-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}

.animated-item.visible {
  opacity: 1;
  transform: translateY(0);
}
/* ------------- About ------------- */
#about { 
  padding: 80px 0; 
  background: #f6f6f6; 
}

.section-title h2 { 
  font-size: 32px; 
  margin-bottom: 10px; 
}

/* About section headings */
.about-text h4 {
  color: inherit;        /* match body text color */
  font-weight: 600;      /* bold, but not too heavy */
  font-size: 22px;       /* keeps original size */
  margin-bottom: 15px;   /* spacing below heading */
}

.about-text p { 
  margin-bottom: 20px; 
  line-height: 1.6; 
  font-size: 15px; 
}

/* About list styling */
#about .about-text ul {
    list-style: none;       /* remove default bullets */
    padding-left: 0;        /* remove extra padding */
    margin: 0;
}

#about .about-text ul li {
    position: relative;     /* for custom checkmark positioning */
    margin-bottom: 12px;    
    font-size: 14px;
    padding-left: 28px;     /* space for checkmark */
    line-height: 1.5;
}

#about .about-text ul li:before {
    content: "✓";           /* checkmark symbol */
    position: absolute;
    left: 0;
    top: 0;
    color: #B8202D;         /* red checkmark */
    font-weight: 600;
}

#about .about-text ul li strong {
    color: #B8202D;         /* red bold titles */
}

/* About image styling */
.about-img { 
  width: 100%; 
  border-radius: 10px; 
  box-shadow: 0 8px 20px rgba(0,0,0,0.1); 
  transition: transform 0.3s; 
}

.about-img:hover { 
  transform: scale(1.05); 
}

/* ------------- Services ------------- */
#services { 
  padding: 140px 0; 
  background: url(../img/services-bg.jpg) no-repeat center center; 
  background-size: cover; 
  background-attachment: fixed; 
}

/* Service box padding and hover lift */
#services .service { 
  padding: 20px 10px; 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#services .service:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 8px 20px rgba(0,0,0,0.15); 
}

/* Headings and text color */
#services h2, #services h3 { color: #f6f6f6; }
#services p { color: rgba(255,255,255,0.7); }

/* Font Awesome icons: start red, turn white on hover */
#services i.fa {
  color: #b8202d; /* start red */
  font-size: 48px;
  margin-bottom: 20px;
  transition: color 0.3s ease, transform 0.3s ease;
}

#services .service:hover i.fa {
  color: #fff; /* icon turns white on hover */
  transform: scale(1.2); /* slight pop */
}

/* ------------- Works / Portfolio ------------- */
#works { padding: 120px 0; background: #f6f6f6; }

/* Portfolio items with isotope animation */
.isotope-item { z-index: 2; }
.isotope-hidden.isotope-item { z-index: 1; }
.isotope, .isotope .isotope-item {
  -webkit-transition-duration: 0.8s;
  -moz-transition-duration: 0.8s;
  transition-duration: 0.8s;
}
.isotope-item { margin-right: -1px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.isotope { -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-transition-property: height, width; -moz-transition-property: height, width; transition-property: height, width; }
.isotope .isotope-item { -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-transition-property: -webkit-transform, opacity; -moz-transition-property: -moz-transform, opacity; transition-property: transform, opacity; }

.portfolio-items { display: flex; flex-wrap: wrap; justify-content: center; margin-left: -15px; margin-right: -15px; }
.portfolio-items .col-xs-6,
.portfolio-items .col-sm-6,
.portfolio-items .col-md-3,
.portfolio-items .col-lg-3 { display: flex; justify-content: center; margin-bottom: 30px; }

.portfolio-item { margin-bottom: 30px; }
.portfolio-item .hover-bg { max-height: 190px; overflow: hidden; position: relative; }
.hover-bg .hover-text {
  position: absolute;
  text-align: center;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.66);
  padding: 25% 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: all 0.5s;
}
.hover-bg:hover .hover-text { opacity: 1; }
.hover-bg .hover-text > h4,
.hover-bg .hover-text > p,
.hover-bg .hover-text > i { color: #fff; }

ol.type li a { color: #777; padding: 8px 16px; border: 1px solid #b8202d; border-radius: 2px; background: transparent; transition: all 0.3s; }
ol.type li a.active,
ol.type li a:hover { color: #fff; background-color: #b8202d; border: 1px solid #b8202d; }

/* Center portfolio tabs */
.categories { text-align:center; margin-bottom:40px; }
.categories ul.cat,
.categories ul.cat li ol.type { display:flex !important; justify-content:center !important; flex-wrap:wrap !important; gap:10px !important; padding:0 !important; margin:0 auto !important; list-style:none; }
.categories ul.cat li ol.type li a { display:inline-block !important; padding:8px 16px !important; font-size:14px !important; white-space:normal !important; box-sizing:border-box; }

/* ------------- Team / Thumbnails ------------- */
#team { 
  padding: 140px 0; 
  background: #e6e6e6; 
  text-align: center;
}

img.img-thumbnail.team-img { 
  width: 200px; 
  height: 200px; 
  border: 0; 
  border-radius: 0; 
  background-color: #f6f6f6; 
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* hover transition */
}

/* Hover effect */
#team .team-img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Remove Bootstrap thumbnail box */
#team .thumbnail {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Caption styling */
#team .thumbnail .caption {
  padding-top: 10px;
  color: #777;
}

/* Flex layout for team members */
#team .meet-the-team {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* centers members if fewer than 4 */
  margin-left: -15px;      /* optional: match Bootstrap gutter */
  margin-right: -15px;
}

#team .team-member {
  flex: 0 0 25%;           /* 4 per row on large screens */
  max-width: 25%;
  padding: 0 15px;         /* gutter spacing */
  box-sizing: border-box;
  margin-bottom: 30px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  #team .team-member {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}

@media (max-width: 767px) {
  #team .team-member {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 479px) {
  #team .team-member {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ------------- Testimonials ------------- */
#testimonials {
  background: url(../img/testimonials-bg2.jpg) no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  color: #fff;
  padding: 140px 0;
}

#testimonials h2 {
  color: #f6f6f6;
  margin-bottom: 40px;
}

#testimonials blockquote {
  margin: 20px 10px;
  border: 0;
  text-align: center;
  color: #fff;
  padding: 20px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

#testimonials blockquote:hover {
  transform: translateY(-5px);
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

#testimonials blockquote i.fa-quote-left {
  font-size: 2em;
  margin-bottom: 15px;
  color: #b8202d;
}

#testimonials .clients-name p {
  margin-top: 15px;
  font-size: 0.9em;
  color: #fff;
}

@media (max-width: 992px) {
  #testimonials .col-md-3 {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  #testimonials .col-sm-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
/* ------------- Contact ------------- */
#contact { padding: 120px 0 40px 0; background: #f6f6f6; }
#contact .contact-item { padding: 10px; margin: 10px; height: 100px; border-radius: 4px; }
#contact h3 { font-size: 20px; font-weight: 400; margin-top: 40px; }
#contact form { padding: 30px 0; }
#contact label { font-size: 12px; font-weight: 400; float: left; }
#contact .form-control { display:block; width:100%; padding:6px 12px; font-size:14px; line-height:1.42857143; color:#555; background:#fff; border:1px solid #ccc; border-radius:2px; box-shadow:none; transition:none; }
#contact .form-control:focus { border-color: inherit; outline: 0; box-shadow: none; }

/* icons */
#services i.fa,
#contact i.fa,
#works i.fa { color: #b8202d; }

/* ------------- Footer ------------- */
#footer { background:#333; color:#777; padding:20px 0; text-align:center; }
#footer a { color:#999; }
#footer a:hover, #footer a:focus { color:#b8202d; }
#footer p { font-size:13px; margin-top:10px; }

/* Footer social icons row */
.social { text-align:center; }
.social h3 { margin-bottom:20px; }
.social ul { list-style:none; padding:0; margin:0 auto; display:flex; justify-content:center; gap:40px; }
.social ul li { display:inline-flex; margin:0; }
.social ul li a i.fa { font-size:20px; color:#b8202d; transition:all 0.3s; }
.social ul li a:hover i.fa { color:#991a28; }

/* ------------- Brand Heading / Logo ------------- */
.brand-heading-container {
  display:flex !important;
  justify-content:center !important;
  align-items:baseline !important;
  flex-wrap:wrap;
  margin-top:20px;
}
.brand-heading-red,
.brand-heading-grey { display:inline-block !important; font-size:20px !important; font-weight:700 !important; margin:0 5px; }
.brand-heading-red { color:#b8202d; }
.brand-heading-grey { color:#333333; }

@media (max-width:768px) {
  .brand-heading-container { flex-direction:column !important; font-size:8vw; }
  .brand-heading-red, .brand-heading-grey { font-size:inherit; margin:0; }
  .hover-bg .hover-text { padding:20%; }
  .categories ul.cat,
  .categories ul.cat li ol.type { flex-direction:column; gap:8px; }
}

/* ------------- Section Titles HR Fix ------------- */
.section-title h2 { margin-bottom:15px !important; }
.section-title hr { margin-top:10px !important; margin-bottom:40px !important; }

/* =========================
   MOBILE SPECIFIC FIXES
========================= */
@media (max-width: 768px) {

  /* ----- Header Logo + Daniel Coelho ----- */
  #main-logo {
      max-width: 150px;       /* limit logo size for mobile */
      height: auto;
      display: block;
      margin: 0 auto 10px auto; /* center and add spacing */
  }

  .brand-heading-container {
      display: flex !important;
      flex-direction: column !important; /* stack words under each other safely */
      align-items: center !important;
      justify-content: center !important;
      text-align: center;
      line-height: 1.1;
      margin-top: 10px;
  }

  .brand-heading-red,
  .brand-heading-grey {
      font-size: 8vw !important; /* responsive size */
      margin: 0 !important;
      display: block !important; /* each word on its own line */
  }

  /* ----- Section Titles Fix ----- */
  .section-title h2 {
      word-break: keep-all; /* prevents wrapping words awkwardly */
      line-height: 1.2 !important;
  }

  .section-title hr {
      margin-top: 10px !important;
      margin-bottom: 20px !important; /* ensure line has spacing under and above */
  }
}
/* ----- Header Logo + Daniel Coelho ----- */
  #main-logo {
      max-width: 150px;       /* limit logo size for mobile */
      height: auto;
      display: block;
      margin: 0 auto 10px auto; /* center and spacing */
  }

  .brand-heading-container {
      display: flex !important;
      flex-direction: row !important; /* keep "Daniel Coelho" on one line */
      align-items: center !important;
      justify-content: center !important;
      text-align: center;
      line-height: 1.1;
      margin-top: 10px;
      flex-wrap: wrap; /* allow text to shrink slightly on small screens */
  }

  .brand-heading-red,
  .brand-heading-grey {
      font-size: 8vw !important; /* responsive size */
      margin: 0 5px !important;  /* spacing between words */
      display: inline-block !important; /* force inline on one line */
  }

  /* ----- Section Titles Fix ----- */
  .section-title h2 {
      word-break: keep-all; /* prevents wrapping words awkwardly */
      line-height: 1.2 !important;
  }
/* ----- Header Logo + Daniel Coelho - Responsive Desktop Fix ----- */
@media (min-width: 769px) {
    #intro .brand-heading-container .brand-heading-red,
    #intro .brand-heading-container .brand-heading-grey {
        font-size: 75px !important; /* proportional to 60px logo */
    }
}
/* Desktop logo */
@media (min-width: 769px) {
    #main-logo {
        max-width: 300px;  /* adjust as needed */
        height: auto;
    }

    /* optional: scale brand heading with logo */
    #intro .brand-heading-container .brand-heading-red,
    #intro .brand-heading-container .brand-heading-grey {
        font-size: 75px !important; /* proportional to new logo */
    }
}
/* ===== MOBILE BACKGROUND IMAGE FIX ===== */
@media (max-width: 768px) {
  #services, #testimonials {
    background-size: auto 100% !important;  /* full height visible, width scales proportionally */
    background-position: center top !important; /* focus on top of image */
    background-attachment: scroll !important;  /* disable fixed background on mobile */
  }
}
/* Force custom button color + hover */
.btn.btn-default {
  background-color: #b8202d !important;
  color: #fff !important;
  border-color: #b8202d !important;
}

.btn.btn-default:hover,
.btn.btn-default:focus {
  background-color: #8e1a25 !important;
  color: #fff !important;
  border-color: #8e1a25 !important;
}