/* DoorHan dealer - Clopay-inspired palette */

:root {
  --cassiopeia-color-primary: #222222;
  --cassiopeia-color-link: #222222;
  --cassiopeia-color-hover: #fdd561;
}

/* Top bar with contacts */
.container-topbar {
  background-color: #222 !important;
  padding: 5px 0;
}

/* Header */
.container-header {
  background-color: #1a1a1a !important;
  padding: 10px 0;
}
.container-header a,
.site-title a {
  color: #fff !important;
  text-decoration: none;
}

/* Navigation - DoorHan Red */
.container-nav {
  background-color: #3a3a3a !important;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.container-nav .mod-menu a,
.container-nav .nav-link {
  color: #fff !important;
  font-weight: 500;
  padding: 12px 16px !important;
}
.container-nav .mod-menu a:hover,
.container-nav .nav-link:hover,
.container-nav .active > a,
.container-nav .current > a {
  background-color: rgba(253,213,97,0.15) !important;
}

/* Main content */
.container-component {
  padding: 20px 0;
}

/* Article images responsive */
.com-content-article img,
.com-content-category img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Category blog layout */
.com-content-category-blog .items-leading .item-content,
.blog-items .item {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}

/* Headings */
h1, h2 { color: #1a1a1a; }
h3, h4 { color: #333; }

/* Footer */
.container-footer {
  background-color: #1a1a1a !important;
  color: #fff !important;
  padding: 30px 0 10px;
}
.container-footer a {
  color: #fff !important;
}
.container-footer h4 {
  color: #fff !important;
  font-size: 16px;
}

/* Buttons */
.btn-primary,
a.btn-primary {
  background-color: #3a3a3a !important;
  border-color: #3a3a3a !important;
  color: #fff !important;
}
.btn-primary:hover {
  background-color: #fdd561 !important;
  border-color: #fdd561 !important;
  color: #222 !important;
}

/* Hide article info block completely */
.article-info,
.com-content-article .article-info,
dd.createdby,
dd.category-name,
dd.published,
dd.hits,
dl.article-info {
  display: none !important;
}

/* Pagination */
.pagination .page-link {
  color: #222222;
}
.pagination .active .page-link {
  background-color: #222222;
  border-color: #222222;
}

/* Contact form */
.com-contact .contact-form .btn {
  background-color: #222222;
  border-color: #222222;
  color: #fff;
}

/* Remove Joomla branding link in footer if desired */
.container-footer .mod-footer {
  text-align: center;
  opacity: 0.5;
  font-size: 12px;
}

/* === Breadcrumbs === */
.container-breadcrumbs {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 0;
}
.mod-breadcrumbs__wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem;
}
.mod-breadcrumbs.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 12px 0;
    font-size: 0.9em;
    flex-wrap: wrap;
    align-items: center;
}
.mod-breadcrumbs .breadcrumb-item a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}
.mod-breadcrumbs .breadcrumb-item a:hover {
    color: #fdd561;
    text-decoration: underline;
}
.mod-breadcrumbs .breadcrumb-item.active {
    color: #495057;
    font-weight: 600;
}
.mod-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #adb5bd;
    font-size: 1.2em;
    font-weight: bold;
    padding: 0 8px;
}
.mod-breadcrumbs .icon-location {
    display: none;
}
.mod-breadcrumbs__divider {
    display: none;
}
.mod-breadcrumbs .breadcrumb-item:first-child a::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: -2px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fdd561'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* === End Breadcrumbs === */

/* === WhatsApp Float === */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    z-index: 9999;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: wa-pulse 2s infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37,211,102,0.6);
}
@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 25px rgba(37,211,102,0.7); }
}
/* === End WhatsApp === */

/* === CTA Header === */
.btn-cta-header:hover {
    background: #e8c050 !important;
}
@media (max-width: 576px) {
    .btn-cta-header { padding: 6px 14px !important; font-size: 12px !important; }
}
/* === End CTA Header === */

/* === Hero === */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 12px;
    padding: 50px 40px;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
    color: #ffffff !important;
}
.hero-section *,
.hero-section h1,
.hero-section h2,
.hero-section p,
.hero-section a {
    color: #ffffff !important;
}
.hero-section .hero-btn {
    color: #ffffff !important;
}
.hero-section::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url("/images/stories/doorhan/sekcionnye-promyshlennye_.jpg") center/cover no-repeat;
    opacity: 0.08;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}
.hero-content h1 {
    font-size: 2.2em;
    margin: 0 0 15px;
    line-height: 1.2;
    color: #ffffff !important;
    text-shadow: 0 2px 15px rgba(0,0,0,0.8), 0 0 30px rgba(0,0,0,0.4);
}
.hero-content p {
    font-size: 1.15em;
    line-height: 1.6;
    color: #ffffff !important;
    margin: 0 0 25px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.4);
}
.hero-btn {
    display: inline-block;
    background: #fdd561;
    color: #222 !important;
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(253,213,97,0.4);
}
.hero-btn:hover {
    background: #e8c050;
    transform: translateY(-2px);
    color: #222 !important;
}
@media (max-width: 768px) {
    .hero-section { padding: 30px 20px; }
    .hero-content h1 { font-size: 1.6em; }
}
/* === End Hero === */

/* === Why Us === */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0 40px;
}
.why-us-card {
    text-align: center;
    padding: 25px 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.why-us-card:hover {
    transform: translateY(-3px);
}
.why-us-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
}
.why-us-card h4 {
    color: #222;
    font-size: 1em;
    margin: 0 0 8px;
}
.why-us-card p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
    margin: 0;
}
/* === End Why Us === */

/* === Quote Form === */
.quote-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 40px;
    margin-top: 40px;
    color: #fff;
}
.quote-section h3 {
    color: #fff;
    margin: 0 0 8px;
    font-size: 1.5em;
}
.quote-section .subtitle {
    color: #aaa;
    margin: 0 0 25px;
}
.quote-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.quote-form input, .quote-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1em;
    outline: none;
    transition: border 0.3s;
    box-sizing: border-box;
}
.quote-form input::placeholder { color: rgba(255,255,255,0.5); }
.quote-form select option { color: #333; background: #fff; }
.quote-form input:focus, .quote-form select:focus {
    border-color: #fdd561;
}
.quote-form .full-width {
    grid-column: 1 / -1;
}
.quote-submit {
    grid-column: 1 / -1;
    background: #fdd561;
    color: #222;
    border: none;
    padding: 14px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}
.quote-submit:hover {
    background: #e8c050;
}
.quote-success {
    display: none;
    text-align: center;
    padding: 20px;
    color: #4caf50;
    font-size: 1.2em;
}
@media (max-width: 600px) {
    .quote-form { grid-template-columns: 1fr; }
    .quote-section { padding: 25px 20px; }
}
/* === End Quote Form === */


/* Hide breadcrumbs on homepage */
body.itemid-102 .container-breadcrumbs,
body.itemid-102 nav[aria-label],
body.itemid-102 .mod-breadcrumbs,
body.itemid-102 [class*="breadcrumb"] {
    display: none !important;
}

/* Also hide page heading on homepage */
body.itemid-102 .page-header,
body.itemid-102 h1.page-title,
body.itemid-102 .item-page > h1:first-child,
body.itemid-102 .item-page > h2:first-child,
body.itemid-102 .blog > h1:first-child,
body.itemid-102 .blog > h2:first-child,
body.com-content-featured .page-header {
    display: none !important;
}

/* Logo size */
.brand-logo img {
    max-height: 40px;
    width: auto;
}

/* === Mobile Responsive Fixes === */

/* Topbar mobile */
@media (max-width: 768px) {
    .container-topbar {
        padding: 8px 10px !important;
    }
    #mod-custom111 > div {
        flex-direction: column !important;
        align-items: center !important;
        gap: 6px !important;
    }
    #mod-custom111 > div > div {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }
}

/* Hero mobile */
@media (max-width: 576px) {
    .hero-section {
        padding: 25px 15px !important;
        border-radius: 0 !important;
        margin: 0 -15px 20px !important;
    }
    .hero-content h1 {
        font-size: 1.4em !important;
    }
    .hero-content p {
        font-size: 0.95em !important;
    }
    .hero-btn {
        display: block !important;
        text-align: center !important;
        margin: 8px 0 !important;
        padding: 12px 20px !important;
        font-size: 1em !important;
    }
}

/* Product cards mobile */
@media (max-width: 576px) {
    .item-content > div[style*="grid-template-columns"] {
        gap: 12px !important;
    }
    .item-content > div[style*="grid-template-columns"] > a img {
        height: 160px !important;
    }
}

/* Why Us mobile */
@media (max-width: 576px) {
    .why-us-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        margin: 15px 0 25px !important;
    }
    .why-us-card {
        padding: 15px 10px !important;
    }
    .why-us-card h4 {
        font-size: 0.85em !important;
    }
    .why-us-card p {
        font-size: 0.8em !important;
    }
}
@media (max-width: 360px) {
    .why-us-grid {
        grid-template-columns: 1fr !important;
    }
}

/* General mobile padding */
@media (max-width: 768px) {
    .container-component {
        padding: 10px 15px !important;
    }
    .site-grid {
        margin: 0 !important;
    }
}

/* Nav menu mobile */
@media (max-width: 768px) {
    .container-nav {
        padding: 0 !important;
    }
    .container-nav .mod-menu a {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
}

/* Quote form mobile */
@media (max-width: 576px) {
    .quote-section {
        border-radius: 0 !important;
        margin: 20px -15px 0 !important;
        padding: 25px 15px !important;
    }
}

/* WhatsApp button mobile - smaller, away from edge */
@media (max-width: 576px) {
    .whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
}

/* Footer mobile */
@media (max-width: 768px) {
    .container-footer {
        padding: 20px 15px 10px !important;
        text-align: center;
    }
}

/* Spec tables on product pages - horizontal scroll */
@media (max-width: 576px) {
    .spec-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .spec-table td, .spec-table th {
        white-space: nowrap;
        padding: 6px 8px !important;
        font-size: 13px !important;
    }
}

/* === End Mobile Fixes === */
/* Hide second phone number on small mobile */
@media (max-width: 400px) {
    .topbar-phone2, .topbar-divider { display: none !important; }
}
/* === Lightbox === */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99999;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-overlay img {
    max-width: 85%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    background: #fff;
    padding: 6px;
    animation: lb-pop 0.2s ease;
}
@keyframes lb-pop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.lightbox-close {
    position: absolute;
    top: 10px;
    right: 16px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    z-index: 100000;
}
.lightbox-close:hover {
    background: rgba(0,0,0,0.8);
}
.item-content img,
.com-content-article img {
    cursor: zoom-in;
    transition: transform 0.15s;
}
.item-content img:hover,
.com-content-article img:hover {
    transform: scale(1.02);
}
/* === End Lightbox === */
/* lightbox-mobile */
@media (max-width: 768px) {
    .lightbox-overlay img {
        max-width: 95%;
        max-height: 70vh;
        padding: 4px;
    }
    .lightbox-close {
        width: 44px;
        height: 44px;
        font-size: 28px;
        line-height: 44px;
        top: 12px;
        right: 12px;
        background: rgba(0,0,0,0.7);
    }
}
/* a img cursor - links with images should show pointer */
.item-content a img,
.com-content-article a img,
.com-content-category a img {
    cursor: pointer !important;
}
.item-content a:hover img {
    transform: scale(1.03);
}
/* Scroll to top button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 90px;
  width: 46px;
  height: 46px;
  background: #3a3a3a;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  line-height: 46px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.3s;
  z-index: 9998;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}
.scroll-top-btn:hover {
  background: #fdd561;
  color: #222;
}

.container-footer .footer-contacts a,
.container-footer .footer-col a {
  color: #ccc !important;
}