/* =========================================
   IoT Case Specific Styles
   Theme: Dark Tech, Connectivity, Intelligence
   ========================================= */

:root {
    --iot-primary: #00f2ff;
    --iot-secondary: #2d7af7;
    --iot-dark: #050a14;
    --iot-light-bg: #f0f6ff;
    --iot-card-bg: rgba(255, 255, 255, 0.05);
    --iot-card-bg-light: #ffffff;
    --iot-text-muted: #8b9bb4;
    --iot-text-dark: #333333;
    --iot-text-dark-muted: #666666;
}

/* Page Navigation (Right Side Dots) */
#fp-nav {
    position: fixed;
    z-index: 100;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#fp-nav li {
    position: relative;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

#fp-nav li a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    outline: none;
}

#fp-nav li span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* Dark dot for light sections - handled by JS or contextual CSS if possible. 
   For now, we keep dots visible on both backgrounds or add a mix-blend-mode.
*/
#fp-nav li span {
    box-shadow: 0 0 2px rgba(0,0,0,0.3); /* Ensure visibility on light bg */
}

#fp-nav li.active span,
#fp-nav li:hover span {
    background: var(--iot-primary);
    box-shadow: 0 0 10px var(--iot-primary);
}

#fp-nav li .fp-tooltip {
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.5);
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
}

#fp-nav li:hover .fp-tooltip {
    opacity: 1;
    right: 30px;
}

/* General Section Styles */
.iot-section {
    position: relative;
    background-color: var(--iot-dark);
    color: #fff;
    overflow: hidden;
    transition: background-color 0.5s ease;
}

/* Light Mode Section Override */
.iot-section.light-mode {
    background-color: var(--iot-light-bg);
    color: var(--iot-text-dark);
}

.iot-section .section-title { color: #fff; }
.iot-section.light-mode .section-title { color: var(--iot-text-dark); }

.iot-section.light-mode .section-desc {
    color: var(--iot-text-dark-muted);
}

.iot-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
    opacity: 0.3;
}

.iot-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
}

/* Section 1: Intro */
.iot-intro-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.iot-title-badge {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--iot-primary);
    color: var(--iot-primary);
    border-radius: 50px;
    margin-bottom: 24px;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.iot-main-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.iot-intro-desc {
    font-size: 20px;
    color: var(--iot-text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Section 2: Technical Solution */
.tech-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.tech-card {
    background: var(--iot-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* Light Mode Card */
.iot-section.light-mode .tech-card {
    background: var(--iot-card-bg-light);
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.tech-card:hover {
    transform: translateY(-10px);
    border-color: var(--iot-primary);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.1);
}

.iot-section.light-mode .tech-card:hover {
    box-shadow: 0 15px 30px rgba(0, 100, 255, 0.1);
    border-color: var(--iot-secondary);
}

.tech-icon {
    font-size: 40px;
    color: var(--iot-primary);
    margin-bottom: 20px;
}

.iot-section.light-mode .tech-icon {
    color: var(--iot-secondary);
}

.tech-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.tech-card p {
    color: var(--iot-text-muted);
    font-size: 14px;
}

.iot-section.light-mode .tech-card p {
    color: var(--iot-text-dark-muted);
}

/* Section 3: Applicable Industries */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.industry-item {
    position: relative;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

.industry-item:hover img {
    transform: scale(1.1);
}

.industry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.industry-overlay h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #fff; /* Always white over image */
}

/* Section 4: Effect Comparison */
.comparison-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.comp-box {
    flex: 1;
    background: var(--iot-card-bg);
    padding: 40px;
    border-radius: 20px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}

.iot-section.light-mode .comp-box {
    background: var(--iot-card-bg-light);
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.comp-box.before {
    border-right: 4px solid #ff4d4f;
}

.comp-box.after {
    border-left: 4px solid var(--iot-primary);
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.05), transparent);
}

.iot-section.light-mode .comp-box.after {
    border-left-color: var(--iot-secondary);
    background: linear-gradient(135deg, rgba(45, 122, 247, 0.05), #fff);
}

.comp-title {
    font-size: 24px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comp-data {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.iot-section.light-mode .data-row {
    border-bottom-color: #eee;
}

.data-value {
    font-size: 20px;
    font-weight: bold;
}

.value-up { color: var(--iot-primary); }
.iot-section.light-mode .value-up { color: var(--iot-secondary); }
.value-down { color: #ff4d4f; }

/* Section 5: Problems & Solutions */
.problem-solution-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.ps-row {
    display: flex;
    gap: 20px;
}

.ps-card {
    flex: 1;
    padding: 30px;
    border-radius: 12px;
    background: var(--iot-card-bg);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: transform 0.3s;
    border: 1px solid transparent;
}

.iot-section.light-mode .ps-card {
    background: var(--iot-card-bg-light);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.ps-card:hover {
    transform: translateX(10px);
    background: rgba(255,255,255,0.08);
}

.iot-section.light-mode .ps-card:hover {
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.ps-icon {
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.icon-prob { background: rgba(255, 77, 79, 0.1); color: #ff4d4f; }
.icon-sol { background: rgba(0, 242, 255, 0.1); color: var(--iot-primary); }
.iot-section.light-mode .icon-sol { background: rgba(45, 122, 247, 0.1); color: var(--iot-secondary); }

/* Section 6: Advantages */
.adv-hex-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 50px;
}

.adv-hex {
    width: 250px;
    height: 280px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Default Dark Hex SVG */
    background: url("data:image/svg+xml,%3Csvg width='250' height='280' viewBox='0 0 100 115' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0 L100 25 L100 75 L50 100 L0 75 L0 25 Z' fill='rgba(255,255,255,0.05)' stroke='rgba(0,242,255,0.3)' stroke-width='1'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    padding: 20px;
    transition: all 0.3s ease;
}

/* Light Mode Hex - Change Stroke Color via new SVG Data URI */
.iot-section.light-mode .adv-hex {
    background-image: url("data:image/svg+xml,%3Csvg width='250' height='280' viewBox='0 0 100 115' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0 L100 25 L100 75 L50 100 L0 75 L0 25 Z' fill='rgba(255,255,255,0.8)' stroke='rgba(45,122,247,0.2)' stroke-width='1'/%3E%3C/svg%3E");
}

.adv-hex:hover {
    transform: scale(1.05);
    background-image: url("data:image/svg+xml,%3Csvg width='250' height='280' viewBox='0 0 100 115' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0 L100 25 L100 75 L50 100 L0 75 L0 25 Z' fill='rgba(0,242,255,0.1)' stroke='rgba(0,242,255,0.8)' stroke-width='2'/%3E%3C/svg%3E");
}

.iot-section.light-mode .adv-hex:hover {
    background-image: url("data:image/svg+xml,%3Csvg width='250' height='280' viewBox='0 0 100 115' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0 L100 25 L100 75 L50 100 L0 75 L0 25 Z' fill='rgba(45,122,247,0.1)' stroke='rgba(45,122,247,0.8)' stroke-width='2'/%3E%3C/svg%3E");
}

.adv-hex i {
    font-size: 40px;
    color: var(--iot-primary);
    margin-bottom: 15px;
}

.iot-section.light-mode .adv-hex i {
    color: var(--iot-secondary);
}

.adv-hex h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.adv-hex p {
    font-size: 13px;
    color: var(--iot-text-muted);
}

.iot-section.light-mode .adv-hex p {
    color: var(--iot-text-dark-muted);
}

/* Section 7: Architecture */
.arch-visual {
    position: relative;
    width: 100%;
    height: 500px;
    background: rgba(0,0,0,0.2);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 20px;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.arch-layer {
    position: absolute;
    width: 80%;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: all 0.5s ease;
    z-index: 2;
}

.layer-1 { bottom: 10%; background: #2d7af7; color: #fff; width: 90%; }
.layer-2 { bottom: 30%; background: #00f2ff; width: 70%; }
.layer-3 { bottom: 50%; background: #fff; width: 50%; }
.layer-4 { bottom: 70%; background: linear-gradient(90deg, #ff4d4f, #ffbd2e); color: #fff; width: 30%; }

.arch-visual:hover .layer-1 { bottom: 5%; }
.arch-visual:hover .layer-2 { bottom: 25%; }
.arch-visual:hover .layer-3 { bottom: 45%; }
.arch-visual:hover .layer-4 { bottom: 65%; }

.connect-line {
    position: absolute;
    width: 2px;
    background: rgba(255,255,255,0.2);
    z-index: -1;
}

/* Animations - Expanded */
.animate-up, .animate-in, .animate-left, .animate-right, .animate-zoom {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-up { transform: translateY(50px); }
.animate-in { transform: scale(0.9); }
.animate-left { transform: translateX(-50px); }
.animate-right { transform: translateX(50px); }
.animate-zoom { transform: scale(0.5); }

/* Active State Triggers */
.fp-section.active .animate-up { opacity: 1; transform: translateY(0); }
.fp-section.active .animate-in { opacity: 1; transform: scale(1); }
.fp-section.active .animate-left { opacity: 1; transform: translateX(0); }
.fp-section.active .animate-right { opacity: 1; transform: translateX(0); }
.fp-section.active .animate-zoom { opacity: 1; transform: scale(1); }

/* Stagger Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }

/* Responsive */
@media (max-width: 1024px) {
    .tech-cards, .industry-grid, .adv-hex-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .comparison-wrapper { flex-direction: column; }
    #fp-nav { display: none; }
}

@media (max-width: 768px) {
    .tech-cards, .industry-grid, .adv-hex-grid {
        grid-template-columns: 1fr;
    }
    .iot-main-title { font-size: 32px; }
    
    /* On mobile, remove huge offsets to prevent scroll issues, just fade */
    .animate-up, .animate-left, .animate-right { transform: translateY(20px); }
}
