/* Dr. Muthulakshmi Reddy Memorial Institute - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-teal: #00a39e;
    --secondary-blue: #1a5f7a;
    --accent-coral: #ff6b6b;
    --light-mint: #e8f6f5;
    --white: #ffffff;
    --dark-text: #2c3e50;
    --gray-text: #6c757d;
    --light-gray: #f8f9fa;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-blue));
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}
.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;

    flex: 1;        /* take available space */
    min-width: 0;   /* ⭐ prevents text collapse */
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    padding: 0;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: rotate(360deg);
}

.institute-name {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;

    white-space: normal;
    word-break: break-word;
}

.institute-name small {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-shrink: 0;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Hero/Carousel Section */
.carousel-section {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: linear-gradient(135deg, rgba(0, 163, 158, 0.7), rgba(26, 95, 122, 0.7));*/
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
    animation: slideUp 1s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.carousel-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    width: 40px;
    border-radius: 6px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: var(--primary-teal);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: var(--primary-teal);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 163, 158, 0.3);
}

/* Sections */
.section {
    padding: 5rem 2rem;
}

.section-light {
    background: var(--light-gray);
}

.section-white {
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-blue);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-teal), var(--accent-coral));
    border-radius: 2px;
}

.section-title p {
    color: var(--gray-text);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 2rem;
}

.card h3 {
    color: var(--secondary-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: var(--gray-text);
    line-height: 1.8;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1;
    cursor: pointer;
}

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

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

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

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    background: var(--light-mint);
    padding: 3rem;
    border-radius: 15px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.info-text h4 {
    color: var(--secondary-blue);
    margin-bottom: 0.3rem;
}

.info-text p {
    color: var(--gray-text);
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-teal);
}

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

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-teal));
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    line-height: 2;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: white;
    color: var(--primary-teal);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--secondary-blue);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-menu li {
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .carousel-content h1 {
        font-size: 2rem;
    }

    .carousel-content p {
        font-size: 1rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .institute-name {
        font-size: 1rem;
    }

    .institute-name small {
        font-size: 0.7rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease-in;
}
  @media (max-width: 768px) {
        /* Make all grid layouts single column on mobile */
        .contact-form div[style*="grid-template-columns"] {
            grid-template-columns: 1fr !important;
            gap: 0.5rem !important;
        }
        
        /* Adjust form section headings */
        .contact-form h3 {
            font-size: 1.2rem !important;
            margin: 1.5rem 0 1rem !important;
        }
        
        /* Improve input field sizing */
        .contact-form input,
        .contact-form select,
        .contact-form textarea {
            font-size: 16px !important; /* Prevents zoom on iOS */
        }
        
        /* Adjust declaration box padding */
        .contact-form div[style*="background: var(--light-mint)"] {
            padding: 1rem !important;
            margin: 1.5rem 0 !important;
        }
        
        /* Better button styling */
        .contact-form button[type="submit"] {
            padding: 1rem !important;
            font-size: 1rem !important;
        }
        
        /* Adjust container padding on mobile */
        .section-white .container {
            padding: 2rem 1rem;
        }
    }
    
    @media (max-width: 480px) {
        /* Extra small devices - further adjustments */
        .section-title h2 {
            font-size: 1.5rem !important;
        }
        
        .section-title p {
            font-size: 0.9rem !important;
        }
        
        .contact-form label {
            font-size: 0.95rem !important;
        }
    }
      @media (max-width: 968px) {
        /* Stack contact container vertically on tablets and mobile */
        .contact-container {
            display: block !important;
            grid-template-columns: 1fr !important;
        }
        
        .contact-info,
        .contact-form {
            width: 100% !important;
            max-width: 100% !important;
            margin-bottom: 2rem;
        }
        
        /* Adjust heading sizes */
        .contact-info h3,
        .contact-form h3 {
            font-size: 1.5rem !important;
            margin-bottom: 1.5rem !important;
        }
        
        /* Improve info items layout */
        .info-item {
            margin-bottom: 1.5rem !important;
        }
        
        .info-icon {
            width: 50px !important;
            height: 50px !important;
            font-size: 1.2rem !important;
        }
        
        .info-text h4 {
            font-size: 1.1rem !important;
        }
        
        .info-text p {
            font-size: 0.95rem !important;
        }
        
        /* Social links adjustment */
        .social-links {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .social-icon {
            width: 45px !important;
            height: 45px !important;
            font-size: 1.1rem !important;
        }
    }
    
    @media (max-width: 768px) {
        /* Further adjustments for mobile */
        .contact-info h3,
        .contact-form h3 {
            font-size: 1.3rem !important;
        }
        
        /* Make form inputs mobile-friendly */
        .contact-form input,
        .contact-form select,
        .contact-form textarea {
            font-size: 16px !important; /* Prevents iOS zoom */
        }
        
        .contact-form button {
            padding: 1rem !important;
            font-size: 1rem !important;
        }
        
        /* Adjust info item layout for small screens */
        .info-item {
            display: flex;
            align-items: flex-start;
            gap: 1rem;
        }
        
        .info-icon {
            flex-shrink: 0;
        }
    }
    
    @media (max-width: 480px) {
        /* Extra small devices */
        .contact-info h3,
        .contact-form h3 {
            font-size: 1.2rem !important;
            margin-bottom: 1rem !important;
        }
        
        .info-text h4 {
            font-size: 1rem !important;
            margin-bottom: 0.3rem !important;
        }
        
        .info-text p {
            font-size: 0.9rem !important;
            line-height: 1.6 !important;
        }
        
        /* Smaller social icons on very small screens */
        .social-icon {
            width: 40px !important;
            height: 40px !important;
        }
    }
    .floating-buttons-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.float-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: 0.3s ease;
}

.call-btn {
    background-color: #007bff;
}

.whatsapp-btn {
    background-color: #25D366;
}

.float-btn:hover {
    transform: scale(1.1);
}
