/* ============================================
   Super Shades South Africa - Modern Styles
   Replaces: normalize.css, skeleton.css,
   typography.css, layout.css, shortcodes.css,
   elements.css, ie.css
   ============================================ */

/* CSS Custom Properties */
:root {
    --color-body-bg: #2D2D2D;
    --color-header-bg: #2D2D2D;
    --color-content-bg: #ffffff;
    --color-footer-bg: #353535;
    --color-footer-text: #dddddd;
    --color-footer-bottom: #bbbbbb;
    --color-text: #303030;
    --color-heading: #282828;
    --color-accent-blue: #1D7DC1;
    --color-accent-yellow: #FFD002;
    --color-nav-active: #2CA2FE;
    --color-tagline: #BFBFBF;
    --color-border: #dddddd;
    --color-trust: #C0C0C0;
    --font-main: 'Open Sans', Arial, Helvetica, sans-serif;
    --container-max: 1024px;
    --container-padding: 20px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-body-bg);
    background-image: url('assets/img/bg/square_bg.png');
    -webkit-font-smoothing: antialiased;
}

@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi),
       only screen and (min-resolution: 2dppx) {
    body {
        background-size: 200px 200px;
        background-image: url('assets/img/bg/square_bg_@2X.png');
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    margin: 0 0 20px;
    line-height: 1.2;
    font-weight: 600;
    font-family: inherit;
}

h1 { font-size: 15px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 15px; }
h5 { font-size: 14px; margin-bottom: 0.25em; }
h6 { font-size: 13px; margin-bottom: 0.25em; }

p {
    margin: 0 0 20px;
}

a {
    color: #ef5c2c;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover, a:focus {
    color: #787878;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border: 0;
}

strong, b {
    font-weight: 600;
}

ul, ol {
    padding: 0;
    line-height: 2;
    margin: 0 0 20px 25px;
}

ul { list-style: square; }

/* Layout Container */
.container {
    max-width: var(--container-max);
    min-width: 320px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.site-wrapper {
    max-width: var(--container-max);
    min-width: 320px;
    margin: 0 auto;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background-color: var(--color-header-bg);
    border-bottom: 1px solid #e6e6e6;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 130px;
    gap: 20px;
}

.brand {
    flex-shrink: 0;
}

.brand .logo {
    display: inline-block;
    vertical-align: middle;
}

.brand .logo img {
    max-height: 110px;
    max-width: 300px;
    width: auto;
}

.brand .tagline {
    display: block;
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.0;
    color: var(--color-tagline);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
}

.main-nav a {
    display: block;
    color: #ffffff;
    font-size: 16px;
    line-height: 20px;
    padding: 6px 0;
    position: relative;
    outline: none;
}

.main-nav a:hover,
.main-nav a:focus {
    color: #ffffff;
}

.main-nav li.active a {
    color: #ffffff;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
}

.mobile-menu-toggle .bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HIGHLIGHT BAR (homepage only)
   ============================================ */
.highlight-bar {
    background-color: #2D2D2D;
    width: 100%;
    padding: 30px 0;
    border: 1px solid #e0e0e0;
    border-width: 1px 0;
    color: #ffffff;
}

.highlight-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.highlight-text {
    flex: 1;
}

.highlight-text .headline {
    margin: 0 0 4px;
    line-height: 1.5;
    font-size: 16px;
    color: #ffffff;
    font-weight: 600;
}

.highlight-text p {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}

.highlight-text p + p {
    margin-top: 4px;
}

.trust-banner {
    color: var(--color-trust);
    margin-bottom: 8px;
}

.accent-yellow {
    color: var(--color-accent-yellow);
    font-weight: bold;
}

.accent-yellow.underline {
    text-decoration: underline;
}

.highlight-action {
    flex-shrink: 0;
    text-align: right;
}

.whatsapp-btn {
    display: inline-block;
}

.whatsapp-btn img {
    display: block;
}

/* ============================================
   HERO BANNER (homepage only)
   ============================================ */
.hero-banner {
    display: block;
    width: 100%;
    line-height: 0;
    background-color: #ffffff;
}

.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   PAGE HEADER (subpages)
   ============================================ */
.page-header {
    border-bottom: 1px solid #e6e6e6;
    padding: 25px 0;
    background-color: #fefefe;
    background-image: linear-gradient(60deg, #ffffff, #fefefe);
}

.page-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.page-title {
    color: #282828;
    margin: 0;
    font-size: 20px;
    line-height: 1.5;
    font-weight: normal;
}

.page-title > span {
    font-size: 13px;
    color: #888888;
    display: inline;
}

.page-title > span::before {
    content: '/ ';
}

.breadcrumb {
    margin: 0;
    padding: 0;
    line-height: 30px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.breadcrumb > li {
    display: inline;
}

.breadcrumb > li > .divider {
    padding: 0 2px;
    color: #888888;
}

.breadcrumb > .active {
    color: #888888;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.site-content {
    padding-bottom: 40px;
    background-color: var(--color-content-bg);
}

.site-content > .container {
    padding-top: 40px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    margin-bottom: 40px;
}

.content-grid.wide {
    grid-template-columns: 1fr;
}

.content-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

/* Section Title with decorative lines */
.title-section {
    position: relative;
    margin: 0 0 20px;
    clear: both;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-heading);
}

.title-section > span {
    display: inline-block;
    background-color: #ffffff;
    padding-right: 10px;
    position: relative;
    z-index: 1;
}

.title-section::after,
.title-section::before {
    position: absolute;
    content: '';
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px dotted var(--color-border);
}

.title-section::before {
    margin-top: 0;
}

.title-section::after {
    margin-top: -2px;
}

.accent-blue {
    color: var(--color-accent-blue);
}

/* Primary Content */
.primary-content h1 {
    font-size: 15px;
    color: var(--color-heading);
    margin: 20px 0;
}

.primary-content .lead-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-heading);
    margin: 20px 0;
}

.price-heading {
    color: var(--color-accent-blue);
    font-size: 20px;
    margin: 20px 0;
}

.fitting-image {
    margin: 20px 0;
    text-align: center;
}

.fitting-image img {
    display: inline-block;
}

/* Services */
.services-list {
    margin-top: 20px;
}

.service-item {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.service-icon {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
    color: #aaaaaa;
}

.service-icon img {
    display: block;
    margin: 0 auto;
}

.service-body {
    flex: 1;
}

.service-body h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: var(--color-heading);
}

.service-body p {
    margin: 0;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar img {
    display: block;
}

.order-form {
    margin-top: 10px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 20px;
    line-height: 1.5;
    margin: 0 0 20px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    background-color: #fcf8e3;
    border: 1px solid #fbeed5;
    border-radius: 3px;
    color: #c09853;
}

.alert h4 {
    line-height: 1;
    margin: 0 0 5px;
    color: #c09853;
}

.alert-success {
    background-color: #dff0d8;
    border-color: #d6e9c6;
    color: #468847;
}

.alert-success h4 {
    color: #468847;
}

.alert-info {
    background-color: #d9edf7;
    border-color: #bce8f1;
    color: #3a87ad;
}

.alert-info h4 {
    color: #3a87ad;
}

/* ============================================
   FIELDSET / LEGEND
   ============================================ */
fieldset {
    border: 2px solid #B2B2B2;
    margin: 0 0 20px;
    padding: 0.35em 0.625em 0.75em;
}

legend {
    border: 0;
    padding: 0 8px;
    font-weight: 600;
    color: var(--color-heading);
}

/* ============================================
   LABEL LIST
   ============================================ */
.label-list {
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}

.label-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.label-list .label {
    flex-shrink: 0;
    width: 100px;
    font-weight: 600;
    color: var(--color-heading);
}

/* ============================================
   CHECK LIST
   ============================================ */
.check-list {
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}

.check-list li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px;
    line-height: 1.8;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #aaaaaa;
    font-weight: bold;
    font-family: sans-serif;
}

/* ============================================
   PORTFOLIO
   ============================================ */
.portfolio-section {
    margin-bottom: 40px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.portfolio-card {
    margin-bottom: 30px;
}

.portfolio-image {
    margin: 0;
    position: relative;
    overflow: hidden;
    background-color: #dddddd;
    line-height: 0;
}

.portfolio-image img {
    width: 100%;
    height: auto;
    display: block;
}

.portfolio-info {
    border: 1px solid var(--color-border);
    border-top: 0;
    padding: 20px 30px;
    position: relative;
    z-index: 1;
    text-align: center;
    line-height: 1;
    background-color: #ffffff;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}

.portfolio-info::before {
    position: absolute;
    content: '';
    border: 8px solid transparent;
    border-bottom-color: #ffffff;
    bottom: 100%;
    right: 20px;
}

.portfolio-info h4 {
    margin: 0 0 8px;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: var(--color-heading);
}

.portfolio-info p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text);
}

.portfolio-info .location {
    color: #888888;
    font-size: 13px;
    margin: 0;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    padding-top: 20px;
    margin: 0 0 30px;
    border-top: 1px solid #ddd;
    box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.03);
}

.pagination > ul {
    margin: 0;
    padding: 0;
    line-height: 1;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination > ul li a {
    display: block;
    padding: 5px 12px;
    color: #888888;
    outline: none;
    border: 1px solid #dddddd;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
    transition: all 0.15s ease-in-out;
}

.pagination > ul li.active a,
.pagination > ul li a:hover {
    background-color: #ef5c2c;
    color: #ffffff;
    border-color: #d54e22;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    margin-bottom: 40px;
}

.faq-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: 3px;
    margin-bottom: 10px;
    background-color: #ffffff;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}

.faq-item summary {
    padding: 14px 56px 14px 20px;
    cursor: pointer;
    font-size: 13px;
    line-height: 20px;
    color: #484848;
    font-weight: 600;
    position: relative;
    list-style: none;
    user-select: none;
    outline: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 400;
    color: #000000;
    width: 20px;
    text-align: center;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item[open] summary {
    color: #ef5c2c;
}

.faq-item p {
    padding: 0 20px 14px;
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    font-size: 14px;
    color: var(--color-footer-text);
    background-color: var(--color-footer-bg);
}

.footer-top {
    padding: 17px 0;
}

.footer-delivery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.delivery-item {
    text-align: center;
    margin-bottom: 20px;
}

.delivery-item img {
    display: block;
    margin: 0 auto 10px;
    max-width: 271px;
}

.delivery-item p {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.footer-bottom {
    padding: 18px 0;
    color: var(--color-footer-bottom);
    background-color: var(--color-footer-bg);
    border-top: 1px solid #444;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom p {
    margin: 0;
}

.footer-nav {
    margin: 0;
    padding: 0;
    text-align: right;
    list-style: none;
    line-height: 1.8;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-nav a {
    color: #ffffff;
    transition: color 0.15s ease-in-out;
}

.footer-nav a:hover {
    color: #dddddd;
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

/* Tablet (768px - 959px) */
@media only screen and (max-width: 959px) {
    .main-nav ul {
        gap: 30px;
    }

    .content-grid,
    .content-grid.two-col {
        grid-template-columns: 1fr 280px;
        gap: 30px;
    }

    .portfolio-grid {
        gap: 15px;
    }

    .portfolio-info {
        padding: 15px 20px;
    }
}

/* Mobile (max 767px) */
@media only screen and (max-width: 767px) {
    .site-wrapper {
        box-shadow: none;
    }

    .header-inner {
        height: auto;
        flex-wrap: wrap;
        padding: 20px 0;
        position: relative;
    }

    .brand {
        flex: 1;
    }

    .brand .logo img {
        max-height: 80px;
        max-width: 220px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 15px;
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        background-color: #3a3a3a;
        border-radius: 4px;
        overflow: hidden;
    }

    .main-nav li {
        border-bottom: 1px solid #444;
    }

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

    .main-nav a {
        padding: 12px 16px;
        font-size: 15px;
    }

    .highlight-inner {
        flex-direction: column;
        text-align: center;
    }

    .highlight-action {
        text-align: center;
    }

    .content-grid,
    .content-grid.two-col {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sidebar {
        order: -1;
        align-items: center;
        text-align: center;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-delivery {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
        text-align: center;
    }

    .page-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .breadcrumb {
        display: none;
    }
}

/* Small Mobile (max 480px) */
@media only screen and (max-width: 480px) {
    :root {
        --container-padding: 15px;
    }

    .brand .tagline {
        font-size: 13px;
    }

    .highlight-text p {
        font-size: 14px;
    }

    .service-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .service-icon {
        width: auto;
    }

    .portfolio-info h4 {
        white-space: normal;
    }

    .faq-item summary {
        padding: 12px 40px 12px 15px;
    }

    .page-title > span {
        display: block;
    }

    .page-title > span::before {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================
   THANK YOU PAGES
   ============================================ */
.thankyou-box {
    text-align: center;
    padding: 60px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.thankyou-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #ef5c2c;
    color: #ffffff;
    font-size: 40px;
    line-height: 1;
    margin-bottom: 30px;
}

.thankyou-box h2 {
    font-size: 20px;
    color: var(--color-heading);
    margin-bottom: 15px;
}

.thankyou-box p {
    color: #888888;
    margin: 0;
}


/* ============================================
   FLOATING WHATSAPP BUTTON
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    pointer-events: none;
}

/* Hide on print */
@media print {
    .whatsapp-float {
        display: none !important;
    }
}

/* Adjust for very small screens */
@media only screen and (max-width: 480px) {
    .whatsapp-float {
        width: 54px;
        height: 54px;
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}
