/* ======== CSS RESET & VINTAGE RETRO BASE ======== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  height: 100%;
  font-size: 16px;
  scroll-behavior: smooth;
  background: #FAF6E9;
}
body {
  min-height: 100vh;
  font-family: 'Open Sans', Arial, sans-serif;
  background: #FAF6E9;
  color: #40382d;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6em;
}
img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border: none;
}
a {
  color: #1C2934;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #E56B3C;
  outline: none;
}
ul, ol {
  margin: 0 0 1em 1.7em;
  padding: 0;
}
li {
  margin-bottom: 0.6em;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  color: #1C2934;
  margin-bottom: 0.7em;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0.01em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }
h4, h5, h6 { font-size: 1.1rem; }
p {
  margin-bottom: 1em;
  font-size: 1rem;
  color: #40382d;
}
strong { color: #1C2934; font-weight: 700; }

/* Vintage fonts fallback */
@import url('https://fonts.googleapis.com/css?family=Montserrat:700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap');

/* ======== RETRO COLOR PALETTE (Brand + Retro Tones) ======== */
:root {
  --color-primary: #1C2934; /* Brand deep navy */
  --color-primary-light: #2B4257;
  --color-secondary: #31917C; /* Brand green */
  --color-accent: #F4D35E; /* Brand yellow */
  --color-bg: #FAF6E9; /* Pale sepia paper */
  --color-bg-alt: #EDE4C7; /* Lighter beige */
  --color-border: #D5BDAF; /* Retro tan border */
  --color-orange: #E56B3C; /* Retro orange */
  --color-red: #BC4749; /* Vintage red */
  --color-blue: #457B9D;
  --color-green: #8A9A5B;
  --color-brown: #81613C;
  --color-dark-text: #40382d;
  --color-light: #fff efefe7;
  --color-shadow: rgba(108,68,37,0.08);
}

/* ======== MAIN STRUCTURE & LAYOUT (Flex Only) ======== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
  width: 100%;
}
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;
  margin-top: 30px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-bg-alt);
  border-radius: 26px;
  box-shadow: 0 6px 20px 0 var(--color-shadow);
  border: 2px solid var(--color-border);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-light);
  border: 2px solid var(--color-border);
  border-radius: 22px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px 0 var(--color-shadow);
  padding: 28px 18px;
  position: relative;
  min-width: 240px;
  flex: 1 1 220px;
  transition: transform 0.21s cubic-bezier(.33,1,.68,1.11), box-shadow 0.24s;
}
.card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px 0 rgba(189,143,88,0.15);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  background: #FFF7D7;
  border: 2px solid var(--color-border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px #F4D35E22;
  color: #1C2934;
}
.testimonial-card p {
  color: #40382d;
  font-style: italic;
  font-size: 1.1rem;
}
.testimonial-card strong {
  font-size: 1rem;
  color: #B88929;
  letter-spacing: 0.05em;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 24px;
}

/* Additional sections for project & profile cards */
.freelancer-profile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 22px 0;
}
.profile-card {
  background: #FFF;
  border: 2px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 1.5px 8px 0 var(--color-shadow);
  min-width: 220px;
  flex: 1 1 200px;
  padding: 22px 16px;
  margin-bottom: 20px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.profile-card:hover {
  box-shadow: 0 4px 18px 0 #F4D35E33;
  transform: translateY(-3px) scale(1.02);
}
.profile-card h3 {
  font-size: 1.15rem;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.profile-card .badge {
  background: var(--color-accent);
  color: var(--color-primary);
  border-radius: 14px;
  font-size: 0.89rem;
  font-weight: 700;
  padding: 3px 16px;
  display: inline-block;
  margin-top: 8px;
  letter-spacing: 1.1px;
  box-shadow: 0 0.5px 3px #F4D35E77;
}

.projects-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 18px 0;
}
.project-card {
  flex: 1 1 260px;
  background: #FFF3E5;
  border: 2px solid #EFB08C;
  border-radius: 18px;
  margin-bottom: 20px;
  padding: 18px 15px 16px 18px;
  color: #3F2C16;
  box-shadow: 0 1px 6px #E56B3C13;
  position: relative;
  transition: background-color 0.18s, box-shadow 0.18s;
}
.project-card:hover {
  background: #FFE5C0;
  box-shadow: 0 5px 22px #E56B3C22;
}
.project-card h3 {
  color: #E56B3C;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-size: 1.09rem;
  margin-bottom: 7px;
  font-weight: 700;
}

/* Search Bar & Filter */
.search-bar, .project-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 20px 0;
}
.search-bar input, .search-bar select, .project-filter select {
  padding: 0.46em 1em;
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  background: #FFF;
  font-family: inherit;
  color: #40382d;
  outline: none;
  margin-bottom: 0;
  transition: border 0.18s;
}
.search-bar input:focus, .search-bar select:focus, .project-filter select:focus {
  border-color: #F4D35E;
}
.search-bar button, .project-filter button {
  background: var(--color-primary);
  color: #fffbe4;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 14px;
  padding: 0.46em 1.6em;
  transition: background 0.18s, color 0.12s;
  cursor: pointer;
}
.search-bar button:hover, .project-filter button:hover {
  background: var(--color-accent);
  color: var(--color-dark-text);
}


/* ======== NAVBAR & HEADER ======== */
header {
  background: #E8D4B7;
  border-bottom: 3px solid var(--color-accent);
  box-shadow: 0 4px 12px #F4D35E11;
  position: relative;
  z-index: 29;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 18px 13px 18px;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  background: none;
}
.main-nav a {
  color: #BC4749;
  letter-spacing: 0.03em;
  padding: 5px 10px;
  border-radius: 7px;
  transition: background .13s linear, color .18s linear;
}
.main-nav a:hover:not(.btn-primary), .main-nav a:focus:not(.btn-primary) {
  background: #F4D35E;
  color: #1C2934;
}
.main-nav img {
  height: 39px;
  width: auto;
  margin-right: 12px;
  background: none;
}
.main-nav .btn-primary {
  margin-left: 14px;
}

/* ======== BUTTONS (RETRO VIBES) ======== */
.btn-primary, button, input[type="submit"] {
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  color: #222;
  font-weight: 700;
  background: linear-gradient(180deg, #F4D35E 96%, #fff7cc 100%);
  border-radius: 18px;
  font-size: 1.1rem;
  padding: 0.6em 2em;
  border: 2px solid #E56B3C;
  box-shadow: 0 0.5px 5px 0 #F4D35E55;
  text-shadow: 1px 1px 0 #fffbe4;
  letter-spacing: 0.08em;
  cursor: pointer;
  margin: 10px 0 4px 0;
  transition: background .18s, color .14s, box-shadow .18s, border .18s;
  position: relative;
  z-index: 2;
  outline: none;
}
.btn-primary:hover, .btn-primary:focus, button:hover, input[type="submit"]:hover {
  background: #FFE5C0;
  color: #E56B3C;
  border-color: #F4D35E;
  box-shadow: 0 3.5px 14px 0 #F4D35E70;
}

/* ======== BADGES, SPANS, ICONS ======== */
.badge {
  background: #ebae36;
  color: #fff;
  font-size: 0.8rem;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  border-radius: 12px;
  padding: 2px 12px;
  display: inline-block;
}

/* ======== FOOTER ======== */
footer {
  padding: 30px 0 24px 0;
  background: #D9C6AC;
  font-size: 1rem;
  color: #443713;
  box-shadow: 0 -2px 16px #F4D35E11;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-start;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-size: 0.96rem;
  margin-bottom: 7px;
}
.footer-nav a {
  color: #7C4F18;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 7px;
  transition: background .14s;
}
.footer-nav a:hover {
  background: #F4D35E;
  color: #1C2934;
}
.contact-info {
  font-size: 1rem;
  color: #543712;
  line-height: 1.4em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 9px;
}
.contact-info img {
  height: 20px;
  width: 20px;
  vertical-align: middle;
  margin-right: 5px;
}

/* ======== MOBILE MENU STYLING ======== */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  right: 22px;
  top: 18px;
  z-index: 61;
  background: #1C2934;
  color: #fff;
  font-size: 2.1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #F4D35E;
  cursor: pointer;
  box-shadow: 0 0.5px 9px #81613C33;
  transition: background 0.14s, transform 0.13s;
  align-items: center;
  justify-content: center;
}
.mobile-menu-toggle:active {
  background: #B88929;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: #1C2934ee;
  z-index: 99;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(.73,.13,.67,1.48);
  box-shadow: 7px 0 36px 0 #1C293444;
}
.mobile-menu.active {
  display: flex;
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2rem;
  background: none;
  border: none;
  color: #F4D35E;
  margin: 18px 24px 6px 0;
  cursor: pointer;
  transition: color 0.2s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: #E56B3C;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  margin: 36px 0 0 35px;
}
.mobile-nav a {
  color: #fffbe4 !important;
  font-size: 1.26rem;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.15s, color 0.18s;
  margin-bottom: 4px;
  width: 100%;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #F4D35E;
  color: #1C2934 !important;
}

/* ======== COOKIE CONSENT BANNER & MODAL ======== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 140;
  background: #FFF7D7;
  border-top: 4px solid #F4D35E;
  box-shadow: 0 -4px 24px #F4D35E28;
  padding: 30px 18px 30px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  font-size: 1rem;
  animation: cookie-in .5s;
}
@keyframes cookie-in { from {transform: translateY(100%);} to {transform: translateY(0);} }
.cookie-banner p {
  color: #40382d;
}
.cookie-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-action-accept, .cookie-action-reject, .cookie-action-settings {
  padding: 0.54em 2em;
  border-radius: 14px;
  border: 2px solid #F4D35E;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background .17s, color .15s, border .17s;
  margin-top: 4px;
}
.cookie-action-accept {
  background: #F4D35E;
  color: #40382d;
}
.cookie-action-accept:hover, .cookie-action-accept:focus {
  background: #E56B3C;
  color: #fff;
  border-color: #E56B3C;
}
.cookie-action-reject {
  background: #FFF;
  color: #31917C;
  border: 2px solid #31917C;
}
.cookie-action-reject:hover, .cookie-action-reject:focus {
  background: #31917C;
  color: #fff;
}
.cookie-action-settings {
  background: transparent;
  border: 2px dashed #BC4749;
  color: #BC4749;
}
.cookie-action-settings:hover, .cookie-action-settings:focus {
  background: #BC4749;
  color: #fff;
  border-style: solid;
}

/* Cookie Preferences Modal */
.cookie-modal-overlay {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 141;
  background: #1C2934cc;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in .24s;
}
@keyframes fade-in { from{opacity:0;} to{opacity:1;} }
.cookie-modal {
  background: #FFFBE7;
  border-radius: 21px;
  border: 3px solid #F4D35E;
  box-shadow: 0 6px 28px #F4D35E44;
  padding: 34px 26px 24px 26px;
  min-width: 340px;
  max-width: 92vw;
  color: #1C2934;
  z-index: 142;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: scale-in .32s cubic-bezier(.5,1.6,.7,1.12);
}
@keyframes scale-in { from {transform: scale(0.87);} to { transform: scale(1); } }
.cookie-modal h2 { font-size: 1.2rem; }
.cookie-modal .modal-close {
  position: absolute;
  right: 18px;
  top: 13px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #E56B3C;
  cursor: pointer;
  z-index: 143;
  transition: color .15s;
}
.cookie-modal .modal-close:hover, .cookie-modal .modal-close:focus {
  color: #B88929;
}
.cookie-options {
  display: flex;
  flex-direction: column;
  gap: 19px;
  margin: 15px 0 8px 0;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #FDF6D9;
  border-radius: 13px;
  border: 2px solid #F4D35E;
  padding: 10px 12px 10px 15px;
}
.cookie-category label {
  font-weight: 700;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  color: #1C2934;
}
.cookie-category .toggle-switch {
  margin-left: auto;
  margin-right: 2px;
}
/* Stylized toggle switch */
.toggle-switch {
  width: 38px;
  height: 20px;
  display: inline-block;
  position: relative;
}
.toggle-switch input {
  opacity: 0;
  width: 38px;
  height: 20px;
  position: absolute;
  left: 0;
  top: 0;
}
.toggle-slider {
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  bottom: 1px;
  background: #f1f1f1;
  border-radius: 11px;
  transition: background 0.13s;
}
.toggle-switch input:checked + .toggle-slider {
  background: #F4D35E;
}
.toggle-slider:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.13s;
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
  background: #E56B3C;
}

/* ======== RETRO PATTERNED DECORATIVE DETAILS ======== */
body:before {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 54px;
  background: repeating-linear-gradient(135deg,#F4D35E,#F4D35E 14px,#FDE0A0 16px,#FDE0A0 32px);
  opacity: 0.11;
  pointer-events: none;
  z-index: 0;
}

/* ======== TYPOGRAPHY DETAILS ======== */
h1 {
  font-size: 2.4rem;
  letter-spacing: 0.011em;
  text-shadow: 0 2px 6px #FDE0A044;
  color: #BC4749;
}
h2 {
  font-size: 1.8rem;
  color: #B88929;
  letter-spacing: 0.009em;
}
h3 {
  font-size: 1.3rem;
  color: #40382d;
}
h4, h5, h6 {
  font-size: 1.1rem;
  color: #7C6B57;
}

/* ======== FORM ELEMENTS ======== */
input, select, textarea {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  padding: 0.5em 1em;
  border-radius: 10px;
  border: 2px solid var(--color-border);
  background: #fffbe4;
  transition: border 0.17s;
  margin-bottom: 12px;
}
input:focus, select:focus, textarea:focus {
  border-color: #F4D35E;
  outline: none;
}

/* ======== SPACING/MARGIN CONSISTENCY ======== */
.section + .section { margin-top: 0; }
.section:last-child { margin-bottom: 0; }
.card + .card, .profile-card + .profile-card, .project-card + .project-card {
  margin-left: 0;
}
.content-wrapper > *:not(:last-child) {
  margin-bottom: 20px;
}

/* ======== MEDIA QUERIES (MOBILE-FIRST) ======== */
@media (max-width: 1000px) {
  .container {
    max-width: 96vw;
  }
  .main-nav {
    gap: 8px;
    flex-wrap: wrap;
  }
}
@media (max-width: 768px) {
  .container {
    padding-left: 8px; padding-right: 8px;
  }
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .mobile-menu {
    display: flex;
    flex-direction: column;
  }
  .section {
    padding: 26px 5px;
    margin-bottom: 34px;
  }
  .content-grid, .card-container {
    flex-direction: column;
    gap: 18px;
  }
  .card, .profile-card, .project-card {
    min-width: 0;
    max-width: 96vw;
    padding: 15px 11px;
  }
  .freelancer-profile-grid, .projects-list {
    flex-direction: column;
    gap: 12px;
  }
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .footer-nav {
    flex-direction: column;
    gap: 7px;
    font-size: 1.03rem;
    margin-bottom: 7px;
  }
  .contact-info {
    gap: 12px;
    flex-direction: column;
    font-size: 0.97rem;
  }
  .testimonial-card,
  .feature-item {
    flex-direction: column;
    gap: 12px;
  }
  .cookie-modal {
    min-width: unset;
    padding: 24px 10px;
  }
}

@media (max-width: 480px) {
  .main-nav a, .footer-nav a { font-size: 0.95rem; }
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.1rem; }
  .section { padding: 14px 2px; }
  .container { max-width: 99vw; padding: 0 4px; }
}

/* ======== MISC INTERACTIONS & EFFECTS ======== */
.section, .card, .profile-card, .project-card, .testimonial-card {
  transition: box-shadow .18s, background .15s, transform .22s;
}
button:focus, a:focus {
  outline: 2px solid #F4D35E;
  outline-offset: 2px;
}

ul li img {
  height: 19px;
  width: 19px;
  vertical-align: middle;
  margin-right: 7px;
}

/* ======= END ======= */