/**
 * GreyNED Component Styles
 * Styles specific to individual components
 */

/* Hero Section Styles */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    overflow: hidden;
}

.hero-background {
  background: rgba(0,0,0,0.3); /* semi-transparent overlay */
  z-index: 1;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 2s ease-in-out; /* fade duration */
  opacity: 0;
}

.hero-video video.active {
  opacity: 1;
}

.hero-video::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.1); /* adjust darkness */
  z-index: 1;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.1) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.1;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 1200px;
    padding: 0 20px;
    position: relative;
}

.hero-title {
    font-size: clamp(4rem, 10vw, 12rem);
    font-weight: 900;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: -4px;
    line-height: 0.9;
}

/* Default gradient for GREY */
.hero-title {
    background: linear-gradient(45deg, var(--text-light), var(--primary-color), var(--secondary-color), var(--text-light));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

/* Individual letter colors with subtle glow */
.hero-title .letter-n {
    background: linear-gradient(45deg, #bb1010, #ef4444, #ff4c4c, #bb1010);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: redShift 3s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.5));
}

.hero-title .letter-e {
    background: linear-gradient(45deg, #051f78, #3b82f6, #60a5fa, #051f78);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: blueShift 3.5s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(59, 130, 246, 0.5));
}

.hero-title .letter-d {
    background: linear-gradient(45deg, #896703, #c19a00, #ffd05a, #896703);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: yellowShift 4s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(193, 154, 0, 0.5));
}

.hero-subtitle {
    font-size: 2.0rem;
    color: rgba(255, 255, 255, 0.922);
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: 2px;
    text-shadow: 0 0 6px #000, 0 0 2px #000;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.922);
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    text-shadow: 0 0 6px #000000, 0 0 2px #000;
}

.hero-cta {
    display: inline-flex;
    gap: 30px;
    align-items: center;
}

.cta-button, .secondary-cta {
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.cta-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-dark);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
}

.secondary-cta {
    border: 2px solid var(--glass-border);
    color: var(--text-light);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.secondary-cta:hover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-3px);
}

/* Projects Section Styles */
.projects-section {
  position: relative;
  overflow: hidden;
}

.projects-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.projects-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projects-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8); /* adjust opacity for better readability */
  z-index: 1;
}

.projects-section .section-header,
.projects-section .projects-grid {
  position: relative;
  z-index: 2; /* ensures content sits above video/overlay */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* changed from 450px */
    gap: 40px;
    margin-top: 80px;
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 30px 60px rgba(0, 255, 136, 0.2);
}

.project-tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 255, 136, 0.2);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.project-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-light);
}

.project-card p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 25px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tech-tag {
    padding: 5px 12px;
    background: rgba(0, 136, 255, 0.2);
    color: var(--secondary-color);
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
}

/* Capabilities Section Styles */
.capabilities-section {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    position: relative;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* changed from 350px */
    gap: 40px;
    margin-top: 80px;
}

.capability-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.capability-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bg-dark);
    font-weight: 900;
}

.capability-card:hover {
    transform: translateY(-15px);
    border-color: var(--primary-color);
    box-shadow: 0 25px 50px rgba(0, 255, 136, 0.3);
}

.capability-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-light);
}

.capability-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* TOO much tech to handle */
.interactive-drone-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    position: relative;
}

.drone-container {
    position: relative;
    width: 100%;
    height: 60vh; /* Reduced default height */
    min-height: 400px; /* Reduced minimum height */
    max-height: 800px; /* Add maximum height */
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 50px;
}

#drone-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#drone-canvas:active {
    cursor: grabbing;
}

.drone-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}

@media (max-width: 1024px) {
    .drone-container {
        height: 50vh;
        min-height: 350px;
    }
    
    .control-panel, .drone-info {
        min-width: 200px;
        padding: 15px;
    }
    
    .control-panel h4, .drone-info h4 {
        font-size: 1rem;
    }
    
    .spec-label, .spec-value {
        font-size: 11px;
    }
}

/* Mobile devices - hide controls, show only drone */
@media (max-width: 768px) {
    .drone-container {
        height: 50vh;
        min-height: 300px;
        margin-top: 30px;
    }
    
    /* Hide controls on mobile */
    .drone-controls {
        display: none;
    }
    
    /* Show simplified hints */
    .interaction-hints {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 15px;
        pointer-events: none;
    }
    
    .hint {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .hint-icon {
        display: none; /* Hide icons on mobile */
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .drone-container {
        height: 40vh;
        min-height: 250px;
        border-radius: 15px;
        margin-top: 20px;
    }
    
    /* Even simpler hints */
    .interaction-hints {
        flex-direction: row;
        gap: 10px;
        bottom: 5px;
    }
    
    .hint {
        background: rgba(0, 0, 0, 0.6);
        padding: 3px 8px;
        border-radius: 15px;
        font-size: 9px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .drone-container {
        height: 35vh;
        min-height: 200px;
    }
    
    /* Show only one hint */
    .interaction-hints {
        display: block;
        text-align: center;
    }
    
    .hint:not(:first-child) {
        display: none;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .drone-container {
        height: 70vh;
        min-height: 200px;
    }
    
    .drone-controls {
        display: none;
    }
}

/* Ensure canvas fills container properly */
#drone-canvas {
    width: 100% !important;
    height: 100% !important;
    cursor: grab;
    display: block;
}

.control-panel, .drone-info {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    pointer-events: all;
    min-width: 250px;
}

.control-panel h4, .drone-info h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.control-btn {
    padding: 8px 16px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-dark);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.control-btn.active {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
}

.control-slider {
    flex: 1;
    height: 6px;
    background: var(--glass-border);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.control-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.control-row label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    min-width: 80px;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.spec-value {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
}

.interaction-hints {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    pointer-events: none;
}

.hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 10px 20px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.hint-icon {
    font-size: 14px;
}

/* Technology Stack Styles */
.tech-section {
    background: var(--bg-dark);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* changed from 250px */
    gap: 30px;
    margin-top: 80px;
}

.tech-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all var(--transition-fast);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    background: rgba(0, 136, 255, 0.1);
}

.tech-item h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.tech-item p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 14px;
}

/* Contact Section Styles */
.contact-section {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    text-align: center;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.contact-form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.contact-form {
    width: 100%;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 16px;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 255, 136, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.character-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.captcha-group {
    background: rgba(255, 255, 136, 0.05);
    border: 1px solid rgba(255, 255, 136, 0.2);
    border-radius: 10px;
    padding: 20px;
}

.captcha-group label {
    color: var(--text-light);
    font-weight: 600;
}

#captcha-question {
    color: var(--primary-color);
    font-weight: 700;
}

.checkbox-group {
    margin: 30px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-fast);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 12px;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-dark);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-btn .btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-dark);
    border-top: 2px solid transparent;
    border-radius: 50%;
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    display: block;
}

.error-message {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.form-status {
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
}

.form-status.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.form-status.error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
}

.form-status h4 {
    margin-bottom: 10px;
    font-weight: 700;
}

.form-status a {
    color: inherit;
    text-decoration: underline;
}

.contact-info {
    display: grid;
    gap: 30px;
}

.contact-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all var(--transition-fast);
}

.contact-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: rgba(0, 255, 136, 0.05);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.contact-item h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.contact-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

.contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* 3D Canvas Background */
#threejs-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
    
    .capabilities-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 968px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form-container {
        padding: 30px;
    }

    .contact-info {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .drone-controls {
        flex-direction: column;
        gap: 15px;
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin: 20px;
    }

    .control-panel, .drone-info {
        min-width: auto;
        width: 100%;
    }

    .interaction-hints {
        flex-direction: column;
        gap: 10px;
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin: 20px;
        pointer-events: all;
    }
}

@media (max-width: 768px) {
    .projects-grid,
    .capabilities-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
    }

    .drone-container {
        height: 60vh;
        min-height: 400px;
    }

    .contact-form-container {
        padding: 20px;
    }

    .form-header h3 {
        font-size: 1.5rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: -2px;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .project-card,
    .capability-card {
        padding: 25px;
    }
    
    .cta-button,
    .secondary-cta {
        padding: 15px 30px;
        font-size: 14px;
    }
}