/* Independent styles for new homepage sections */

.home-ext-section { padding: 64px 0; }
.home-ext-section .ext-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.home-ext-section .ext-header { text-align: center; margin-bottom: 28px; }
.home-ext-section .ext-title { font-size: 28px; font-weight: 700; letter-spacing: 0.5px; color: #0a2a43; }
.home-ext-section .ext-subtitle { font-size: 16px; color: #54748c; margin-top: 8px; }

/* Advantages */
.advantages-section { background: #f6f9fc; }
.advantages-section .ext-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.adv-card { background: #fff; border: 1px solid #e6edf3; border-radius: 10px; padding: 20px; box-shadow: 0 6px 14px rgba(10,42,67,0.06); transition: transform .2s ease, box-shadow .2s ease; }
.adv-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(10,42,67,0.12); }
.adv-card h3 { font-size: 18px; color: #103a5a; margin-bottom: 8px; }
.adv-card p { font-size: 14px; color: #5b6b7b; line-height: 1.7; }

/* Equipment */
.equipment-section { background: #ffffff; }
.equipment-section .ext-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.equip-card { border: 1px solid #e9eef3; border-radius: 10px; overflow: hidden; background: #fff; }
.equip-card .equip-img { height: 160px; background: #f0f5fa; display: flex; align-items: center; justify-content: center; }
.equip-card .equip-img img { max-width: 100%; max-height: 100%; object-fit: cover; }
.equip-card .equip-body { padding: 16px; }
.equip-card .equip-title { font-size: 16px; color: #103a5a; font-weight: 600; margin-bottom: 6px; }
.equip-card .equip-desc { font-size: 14px; color: #5b6b7b; }

/* Showcase */
.showcase-section { background: #f9fbfd; }
.showcase-section .ext-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.show-card { border: 1px solid #dbe4ee; border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 8px 18px rgba(10,42,67,0.08); transition: transform .2s ease, box-shadow .2s ease; }
.show-card:hover { transform: translateY(-4px); box-shadow: 0 14px 26px rgba(10,42,67,0.12); }
.show-card .show-img { height: 275px; background: #eef4fa; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.show-card .show-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; padding: 6px; }
.show-card:hover .show-img img { transform: scale(1.06); }
.show-card .show-body { padding: 16px; border-top: 1px solid #e9eef3; }
.show-card .show-title { font-size: 16px; color: #103a5a; font-weight: 700; margin-bottom: 8px; }
.show-card .show-desc { font-size: 13px; color: #637789; line-height: 1.6; }
.show-card .show-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.show-card .chip { font-size: 12px; color: #0a2a43; background: #e8f1fb; border: 1px solid #cfe1f7; padding: 4px 8px; border-radius: 16px; }

/* Responsive */
@media (max-width: 992px) {
  .advantages-section .ext-grid { grid-template-columns: repeat(2, 1fr); }
  .equipment-section .ext-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-section .ext-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .advantages-section .ext-grid,
  .equipment-section .ext-grid,
  .showcase-section .ext-grid { grid-template-columns: 1fr; }
  .home-ext-section { padding: 42px 0; }
  .home-ext-section .ext-title { font-size: 22px; }
}

/* Video Modal Styles */
.video-modal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.8);
}

.video-modal-content {
  position: relative;
  background-color: #002b49; /* Match site's dark blue */
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #007bff; /* Match site's blue accent */
  width: 80%;
  max-width: 900px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border-radius: 8px;
}

.video-modal-close {
  color: #fff;
  position: absolute;
  top: -10px;
  right: 5px;
  font-size: 35px;
  font-weight: bold;
  transition: 0.3s;
}

.video-modal-close:hover,
.video-modal-close:focus {
  color: #007bff;
  text-decoration: none;
  cursor: pointer;
}

/* Modal content animation for nicer appearance */
.video-modal-content { animation: modalIn .22s ease; }
@keyframes modalIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* About Us Section - New Design */
.about-us-section {
    background-color: #fcfcfc;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 30px 30px; /* Subtle dot pattern */
    padding: 80px 0;
}

.ext-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.ext-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: #004a99;
    margin: 0 auto;
    border-radius: 2px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Text wider than image */
    gap: 60px;
    align-items: center;
}

/* Text Side */
.about-text {
    padding-right: 20px;
}

.about-heading {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.4;
}

.about-heading a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.about-heading a:hover {
    color: #004a99;
}

.about-desc-wrapper {
    margin-bottom: 35px;
}

.about-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    text-align: justify;
}

.about-desc p {
    margin-bottom: 15px;
}

.about-btn {
    display: inline-block;
    padding: 12px 35px;
    background-color: #004a99;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.about-btn:hover {
    background-color: #003366;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 74, 153, 0.2);
}

/* Media Side (Video/Image) */
.about-media {
    position: relative;
}

.media-frame {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.media-frame:hover {
    transform: translateY(-5px);
}

.video-thumb {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.media-frame:hover .video-thumb {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.media-frame:hover .play-overlay {
    background-color: rgba(0,0,0,0.1);
}

.play-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(255,255,255,0.9);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.play-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #004a99;
}

.media-frame:hover .play-icon {
    transform: scale(1.1);
    background-color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-text {
        padding-right: 0;
        text-align: center;
    }
    
    .about-desc {
        text-align: left;
    }
    
    .title-underline {
        margin: 0 auto;
    }
}

/* Constrain video height around 500px */
#modal-video {
  width: 100%;
  height: auto;
  max-height: 500px;
  background: #000; /* keep black bars consistent */
}

/* Line Card Section */
.line-card-section {
    background: #0f172a; /* Deep dark blue/slate */
    background: linear-gradient(to bottom, #0f172a, #1e293b);
    padding: 80px 0;
    color: #fff;
}

.line-card-section .ext-title {
    color: #fff !important;
}

.line-card-section .title-underline {
    background-color: rgba(255,255,255,0.2);
}

.line-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.brand-card {
    background: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border-color: #004a99;
}

.brand-card img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

@media (max-width: 992px) {
    .line-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .line-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .brand-card {
        height: 100px;
        padding: 10px;
    }
}

/* Applications Section */
.applications-section {
    background-color: #f8f9fa;
    padding: 80px 0;
    text-align: center;
}

.applications-section .ext-subtitle {
    font-size: 16px;
    color: #666;
    margin-top: 15px;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.app-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: #fff;
    cursor: pointer;
}

.app-img-frame {
    position: relative;
    width: 100%;
    padding-bottom: 120%; /* Aspect Ratio */
    overflow: hidden;
}

.app-img-frame img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.app-card:hover .app-img-frame img {
    transform: scale(1.1);
}

.app-body {
    padding: 20px;
    background: #fff;
    text-align: left;
    border-top: 1px solid #f0f0f0;
}

.app-body h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.app-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.app-card:hover .app-body h3 {
    color: #004a99;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

@media (max-width: 992px) {
    .applications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .applications-grid {
        grid-template-columns: 1fr;
    }
    .app-img-frame {
        padding-bottom: 75%; /* More landscape on mobile */
    }
}

/* Inventory Section */
.inventory-section {
    background-color: #fff;
    padding: 80px 0;
}

.inventory-table-wrapper {
    margin-top: 40px;
    overflow-x: auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    border-radius: 8px;
    border: 1px solid #eee;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 800px; /* Ensure horizontal scroll on mobile */
}

.inventory-table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 700;
    padding: 15px 20px;
    text-align: left;
    border-bottom: 2px solid #e9eef3;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.inventory-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 14px;
    vertical-align: middle;
}

.inventory-table tr:last-child td {
    border-bottom: none;
}

.inventory-table tr:hover {
    background-color: #fcfcfc;
}

.part-link {
    color: #004a99;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.part-link:hover {
    color: #003366;
    text-decoration: underline;
}

.inquiry-btn {
    display: inline-block;
    padding: 6px 15px;
    background-color: #004a99;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.inquiry-btn:hover {
    background-color: #003366;
    color: #fff;
}

/* News Section */
.news-section {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.news-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.news-img-frame {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img-frame img {
    transform: scale(1.1);
}

.news-date-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 74, 153, 0.9);
    color: #fff;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.news-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-heading {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-more {
    font-size: 14px;
    font-weight: 600;
    color: #004a99;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.news-card:hover .news-heading {
    color: #004a99;
}

.news-card:hover .news-more {
    color: #003366;
    padding-left: 5px; /* Subtle arrow movement hint */
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-img-frame {
        height: 200px;
    }
}

/* Responsive tweaks for smaller screens */
@media (max-width: 992px) {
  .video-modal-content { width: 88%; margin: 12% auto; }
}
@media (max-width: 600px) {
  .video-modal-content { width: 94%; margin: 18% auto; padding: 14px; }
  #modal-video { max-height: 340px; }
}